Add initial support for Hou Plus UI

This commit is contained in:
drojf
2024-01-26 11:45:15 +11:00
parent 70d2484f1b
commit 1375552fa9
3 changed files with 12 additions and 2 deletions

View File

@@ -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).

View File

@@ -49,6 +49,7 @@ chapter_to_chapter_number = {
"minagoroshi": 7, "minagoroshi": 7,
"matsuribayashi": 8, "matsuribayashi": 8,
"rei": 9, "rei": 9,
"hou-plus": 10,
} }
class BuildVariant: class BuildVariant:
@@ -156,6 +157,11 @@ chapter_to_build_variants = {
BuildVariant("GOG-Steam-MG_old", "rei", "2019.4.3", "unix"), BuildVariant("GOG-Steam-MG_old", "rei", "2019.4.3", "unix"),
BuildVariant("MG", "rei", "2019.4.4", "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(): def is_windows():

View File

@@ -45,6 +45,7 @@ fn main() -> ExitCode {
chapters.insert("minagoroshi", 7); chapters.insert("minagoroshi", 7);
chapters.insert("matsuribayashi", 8); chapters.insert("matsuribayashi", 8);
chapters.insert("rei", 9); chapters.insert("rei", 9);
chapters.insert("hou-plus", 10);
if !chapters.contains_key(&chapter[..]) { if !chapters.contains_key(&chapter[..]) {
println!("Unknown chapter, should be one of {:?}", chapters.keys()); println!("Unknown chapter, should be one of {:?}", chapters.keys());
@@ -129,7 +130,8 @@ fn main() -> ExitCode {
7 => "assets/files-5.6", 7 => "assets/files-5.6",
8 => "assets/files-2017.2", 8 => "assets/files-2017.2",
9 => "assets/files-2019.4", 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); copy_files(&caretdir, &directory_assets);
println!(); println!();
@@ -261,7 +263,7 @@ fn copy_images(from: &str, to: &str) {
println!("Path {} not found", from); println!("Path {} not found", from);
return return
} }
println!("Copying files from {}", from); println!("Copying images from {}", from);
for entry in fs::read_dir(from).expect("Can't read directory") { for entry in fs::read_dir(from).expect("Can't read directory") {
let path = entry.unwrap().path(); let path = entry.unwrap().path();
fs::copy(&path, format!("{}/{}_Texture2D.png", to, path.file_stem().unwrap().to_str().unwrap())).expect("Unable to copy"); fs::copy(&path, format!("{}/{}_Texture2D.png", to, path.file_stem().unwrap().to_str().unwrap())).expect("Unable to copy");