From 21af56e76eedf44dffc05b22bd421d36e35057f5 Mon Sep 17 00:00:00 2001 From: sneedmaster Date: Fri, 2 Oct 2026 14:46:44 +0200 Subject: [PATCH] Minor changes --- .gitignore | 8 ++++++-- README.md | 2 +- dev/onikakushi.sh | 6 ++++++ src/main.rs | 24 +++++++++--------------- 4 files changed, 22 insertions(+), 18 deletions(-) create mode 100755 dev/onikakushi.sh diff --git a/.gitignore b/.gitignore index 5b670ed..9d974f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,12 @@ /target /repos /dist + .DS_Store .07build -*.dxvk-cache -higu01 + higu_script_compile_status.txt +*.dxvk-cache + +# Games +higu01 diff --git a/README.md b/README.md index c1e2311..ce1b6fb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # 07build -Custom tool for building and installing the 07th-Mod Higurashi patches. +Custom tool for building and installing the 07th-Mod Higurashi patches. (WIP, currently purpose-built for the Czech localization project) diff --git a/dev/onikakushi.sh b/dev/onikakushi.sh new file mode 100755 index 0000000..2051c9f --- /dev/null +++ b/dev/onikakushi.sh @@ -0,0 +1,6 @@ +set -e + +cargo run -- build-patch -c onikakushi -p repos/onikakushi +cargo run -- build-ui -c onikakushi -u repos/ui +cargo run -- install -c onikakushi -p dist/onikakushi-patch.7z -u dist/onikakushi-ui-win.7z -g higu01 +wine higu01/HigurashiEp01.exe diff --git a/src/main.rs b/src/main.rs index 49fe59b..9ea043d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,9 +60,6 @@ enum CLISubcommand { /// Directory of the patch #[arg(short, long, default_value = ".")] patch: PathBuf, - /// Zip the built patch - #[arg(short, long, default_value = "false")] - zip: bool, }, /// Builds the UI patch BuildUI { @@ -112,8 +109,7 @@ fn main() -> anyhow::Result<()> { working, patch, dist, - zip, - } => build_patch(chapter, working, patch, dist, zip)?, + } => build_patch(chapter, working, patch, dist)?, CLISubcommand::BuildUI { chapter, dist, ui } => build_ui(chapter, dist, ui)?, CLISubcommand::Install { chapter, @@ -352,7 +348,6 @@ fn build_patch( working: PathBuf, patch: PathBuf, dist: PathBuf, - zip: bool, ) -> anyhow::Result<()> { // BUILD PATCH @@ -449,16 +444,15 @@ fn build_patch( // Zip the patch - if zip { - let patch_7z_path = dist.join(format!("{chapter}-patch.7z")); + println!("Zipping the patch..."); - Command::new("7z") - .arg("a") - .arg(patch_7z_path) - .arg(data_path) - .arg("-y") - .status()?; - } + Command::new("7z") + .arg("a") + .arg(format!("{chapter}-patch.7z")) + .arg("-y") + .arg(data_subdir) + .current_dir(dist) + .status()?; Ok(()) }