Skip to content

Commit

Permalink
Add initial support for Hou Plus UI
Browse files Browse the repository at this point in the history
  • Loading branch information
drojf committed Jan 26, 2024
1 parent 70d2484 commit 1375552
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assets/files-hou-plus/README.md
Original file line number Diff line number Diff line change
@@ -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).
6 changes: 6 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def findWorkingExecutablePath(executable_paths, flags):
"minagoroshi": 7,
"matsuribayashi": 8,
"rei": 9,
"hou-plus": 10,
}

class BuildVariant:
Expand Down Expand Up @@ -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():
Expand Down
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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!();
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 1375552

Please sign in to comment.