Shitty ahh scripts

This commit is contained in:
sneedmaster
2025-12-24 22:12:38 +01:00
commit 7da0f378bc
3 changed files with 135 additions and 0 deletions

13
.gitignore vendored Normal file
View File

@@ -0,0 +1,13 @@
# Downloaded content
/assembly
/base
/patch
/ui
# Output
/dist
higu_script_compile_status.txt
# Game directory
/game
# iToddler
.DS_Store
*.dxvk-cache

105
Makefile Normal file
View File

@@ -0,0 +1,105 @@
# Tools
MSBUILD := xbuild
WINE := wine
# Long reused paths
ASSEMBLY := assembly/bin/Release/Assembly-CSharp.dll
SCRIPT_COMPILER := assembly/bin/ScriptCompiler/HigurashiScriptCompiler.exe
### CODE DOWNLOADS
# Patch repos
patch/onikakushi/.marker:
mkdir -p patch
git clone https://git.czchan.org/higurashi-cs/onikakushi.git patch/onikakushi
touch assembly/.marker
# UI Repo
ui/.marker:
git clone https://git.czchan.org/higurashi-cs/ui-editing-scripts.git ui
touch assembly/.marker
# Assembly repo
assembly/.marker:
git clone https://github.com/07th-mod/higurashi-assembly.git assembly
touch assembly/.marker
### RESOURCE DOWNLOADS
# Bases
base/onikakushi/.marker:
mkdir -p base dist
wget https://github.com/07th-mod/patch-releases/releases/download/onikakushi-v1.0/onikakushi-base.7z -O dist/onikakushi_base.7z
7z x dist/onikakushi_base.7z -y -obase/onikakushi
touch base/onikakushi/.marker
# Vanilla UI
ui/assets/vanilla/.marker: ui/.marker
mkdir -p dist
wget https://github.com/07th-mod/patch-releases/releases/download/developer-v1.0/vanilla.7z -O dist/vanilla_ui.7z
7z x dist/vanilla_ui.7z -y -oui
touch ui/assets/vanilla/.marker
### TOOL DOWNLOADS
# The video plugin
dist/AVProVideo.dll:
mkdir -p dist
wget https://github.com/07th-mod/patch-releases/releases/download/developer-v1.0/AVProVideo.dll -O dist/AVProVideo.dll
# UABE 2.2 (elite ball knowledge)
ui/64bit/AssetBundleExtractor.exe: ui
mkdir -p dist
wget https://github.com/07th-mod/patch-releases/releases/download/developer-v1.0/AssetsBundleExtractor_2.2stabled_64bit_with_VC2010.zip -O dist/UABE2_2.zip
7z x -y dist/UABE2_2.zip -oui
### ASSEMBLY
# Assembly
$(ASSEMBLY): assembly/.marker
$(MSBUILD) /p:Configuration=Release assembly/Assembly-CSharp.csproj
# Script compiler
$(SCRIPT_COMPILER): assembly/.marker
$(MSBUILD) /p:Configuration=ScriptCompiler assembly/Assembly-CSharp.csproj
### PATCH
# Compile scripts
higu_script_compile_status.txt: $(SCRIPT_COMPILER) patch/onikakushi $(wildcard patch/onikakushi/Update/*.txt)
mkdir -p patch/onikakushi/CompiledUpdateScripts
$(WINE) $(SCRIPT_COMPILER) patch/onikakushi/Update patch/onikakushi/CompiledUpdateScripts
# Package patch
dist/patch/onikakushi/.marker: $(ASSEMBLY) higu_script_compile_status.txt dist/AVProVideo.dll
mkdir -p dist/patch/onikakushi/HigurashiEp01_Data/{Managed,Plugins,StreamingAssets}
cp $(ASSEMBLY) dist/patch/onikakushi/HigurashiEp01_Data/Managed/
cp dist/AVProVideo.dll dist/patch/onikakushi/HigurashiEp01_Data/Plugins/
rsync -av patch/onikakushi/{CG,CGAlt,CompiledUpdateScripts,OGSprites,spectrum,Update,voice} dist/patch/onikakushi/HigurashiEp01_Data/StreamingAssets/
7z a dist/patch/onikakushi.7z dist/patch/onikakushi/HigurashiEp01_Data -y
touch dist/patch/onikakushi/.marker
### UI PATCH
# Environment
ui/venv/.marker: ui
cd ui && python3 -m venv venv
cd ui && venv/bin/pip install -r requirements.txt
touch ui/venv/.marker
# Build patch
dist/ui_patch/onikakushi/.marker: ui ui/venv/.marker ui/assets/vanilla/.marker
mkdir -p dist/ui_patch
cd ui && source venv/bin/activate && cargo run onikakushi 5.2.2f1 win
mv ui/output/Onikakushi-UI_5.2.2f1_win.7z dist/ui_patch/onikakushi.7z
7z x dist/ui_patch/onikakushi.7z -y -odist/ui_patch/onikakushi
touch dist/ui_patch/onikakushi/.marker
### INSTALL
game/onikakushi/.marker: base/onikakushi/.marker dist/patch/onikakushi/.marker dist/ui_patch/onikakushi/.marker
rm -rf game/onikakushi/HigurashiEp01_Data/StreamingAssets/{CG,CGAlt}
rsync -av base/onikakushi/HigurashiEp01_Data game/onikakushi/
rsync -av dist/patch/onikakushi/HigurashiEp01_Data game/onikakushi/
rsync -av dist/ui_patch/onikakushi/HigurashiEp01_Data game/onikakushi/
touch game/onikakushi/.marker

17
README.md Normal file
View File

@@ -0,0 +1,17 @@
# higu-make
Makefiles to build Higurashi patches, made to serve as an alternative to 07th-Mod's opaque pipeline. Dependent on just Unix instead of both Unix and Windows for different steps.
These actually suck but I prefer them for local dev work.
They also pull the Czech forks by default and scripts for individual chapters will be added as the Czech patch advances.
These scripts are, however, still built upon and dependent on 07th-Mod's ecosystem and tooling and shouldn't be seen as hostile to the original project.
## Prerequisites
- GNU make (obviosuly)
- Mono (msbuild/xbuild)
- Python 3 and venv
- Cargo
- Wine