106 lines
3.6 KiB
Makefile
106 lines
3.6 KiB
Makefile
# 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
|