From 1375552fa91c7f06c2d8f0453d5c8756a26eda2f Mon Sep 17 00:00:00 2001 From: drojf <1249449+drojf@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:45:15 +1100 Subject: [PATCH] Add initial support for Hou Plus UI --- assets/files-hou-plus/README.md | 2 ++ build.py | 6 ++++++ src/main.rs | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 assets/files-hou-plus/README.md diff --git a/assets/files-hou-plus/README.md b/assets/files-hou-plus/README.md new file mode 100644 index 0000000..050a1eb --- /dev/null +++ b/assets/files-hou-plus/README.md @@ -0,0 +1,2 @@ +This folder will eventually contain the Hou Plus Caret and Fonts +For now leave empty so the Hou Plus UI File can be built, even if these files are missing (the UI file will use the default caret and font). \ No newline at end of file diff --git a/build.py b/build.py index 9c1ccf4..e059ba7 100644 --- a/build.py +++ b/build.py @@ -49,6 +49,7 @@ def findWorkingExecutablePath(executable_paths, flags): "minagoroshi": 7, "matsuribayashi": 8, "rei": 9, + "hou-plus": 10, } class BuildVariant: @@ -156,6 +157,11 @@ def get_translation_sharedassets_name(self) -> str: BuildVariant("GOG-Steam-MG_old", "rei", "2019.4.3", "unix"), BuildVariant("MG", "rei", "2019.4.4", "unix"), ], + + 'hou-plus': [ + BuildVariant("GOG-MG-Steam", "hou-plus", "2019.4.4", "win", translation_default=True), + BuildVariant("GOG-MG-Steam", "hou-plus", "2019.4.4", "unix"), + ], } def is_windows(): diff --git a/src/main.rs b/src/main.rs index e756e3c..50553a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,6 +45,7 @@ fn main() -> ExitCode { chapters.insert("minagoroshi", 7); chapters.insert("matsuribayashi", 8); chapters.insert("rei", 9); + chapters.insert("hou-plus", 10); if !chapters.contains_key(&chapter[..]) { println!("Unknown chapter, should be one of {:?}", chapters.keys()); @@ -129,7 +130,8 @@ fn main() -> ExitCode { 7 => "assets/files-5.6", 8 => "assets/files-2017.2", 9 => "assets/files-2019.4", - _ => panic!("Couldn't folder for text carets with arc {}", arc_number) + 10 => "assets/files-hou-plus", // Both rei and hou-plus are 2019.4, but the rei caret/font doesn't work on hou-plus + _ => panic!("Couldn't determine folder for text carets with arc {}", arc_number) }; copy_files(&caretdir, &directory_assets); println!(); @@ -261,7 +263,7 @@ fn copy_images(from: &str, to: &str) { println!("Path {} not found", from); return } - println!("Copying files from {}", from); + println!("Copying images from {}", from); for entry in fs::read_dir(from).expect("Can't read directory") { let path = entry.unwrap().path(); fs::copy(&path, format!("{}/{}_Texture2D.png", to, path.file_stem().unwrap().to_str().unwrap())).expect("Unable to copy");