mirror of
https://github.com/TheBozos/FightingForOnePiece_Recomp.git
synced 2026-12-01 21:33:18 -10:00
scripts/recomp_iop.sh dumps the modules as the IOP loads them (one boot with PS2X_IOP_DUMP_MODULES) and turns each into C++ with tools/iop_recomp.py; all 14 recompile, none left to the interpreter. CMake compiles them outside the unity batches (their kEntries/kModule are per file), with the property set in ps2EntryRunner's directory, and scripts/recomp.sh leaves generated/iop/ alone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
16 lines
906 B
Bash
Executable File
16 lines
906 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Runs ps2_recomp with recomp/ffop.toml into generated/, copying only the files whose content changed.
|
|
source "$(dirname "$0")/common.sh"
|
|
[ -f "$ELF" ] || { echo "missing $ELF, run scripts/extract_iso.sh first"; exit 1; }
|
|
[ -x "$TOOLS_BUILD/ps2xRecomp/ps2_recomp" ] || "$ROOT/scripts/build_tools.sh"
|
|
cd "$ROOT"
|
|
|
|
rm -rf build/recomp-staging
|
|
mkdir -p build/recomp-staging "$GENERATED"
|
|
sed 's|^output = .*|output = "build/recomp-staging/"|' "$CONFIG" > build/recomp-staging.toml
|
|
"$TOOLS_BUILD/ps2xRecomp/ps2_recomp" build/recomp-staging.toml
|
|
|
|
# generated/vu1/ belongs to scripts/compile_vu1.sh, generated/iop/ to scripts/recomp_iop.sh.
|
|
changed=$(rsync -rc --delete --exclude=/vu1/ --exclude=/iop/ --out-format='%n' build/recomp-staging/ "$GENERATED/" | grep -vc '/$' || true)
|
|
echo "Generated $(find "$GENERATED" -maxdepth 1 -name '*.cpp' | wc -l) sources in $GENERATED ($changed changed)"
|