Files
Thomas MartinandClaude Opus 5.5 44e53f9833 Build on BozoEngine's releases instead of the submodule
cmake/bozo_engine.json pins BozoEngine 0.5.0 (the release of c27ce41, the
commit the submodule pinned) and the SHA-256 of its archive, hashed here.
cmake/bozo_engine_fetch.cmake (TMB_Recomp's, as in TMB_Recomp#121)
downloads it into BozoEngine/ once (TLS, hash checked), stamps
BozoEngine/.release, and refuses an unstamped BozoEngine/ (an old
submodule checkout). CMakeLists.txt, launcher/ and
tests/native_lifetime/ include it unless BOZO_ENGINE_DIR /
LAUNCHER_BOZO_DIR name another tree; the pin reconfigures the build.

dc_build fetches it in a git checkout; make_release puts the fetched tree
(with its stamp) in source\BozoEngine and records engine_version; scripts/
and CI fetch it; the pin test replaces the submodule test. The submodule,
.gitmodules and .git/modules/BozoEngine are gone; /BozoEngine/ is ignored.

Proved: a clean clone (no BozoEngine/) built with dc_build, and main's
submodule build, ran 3000 frames headless with the same pad script:
ref_compare identical on every field (ram, scratchpad, calls, draws,
sound, threads, eeCycle).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 00:08:56 +01:00

32 lines
1.2 KiB
Bash

# Sourced by the other scripts. Resolves the repo root and tool paths.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
export PATH="/c/msys64/ucrt64/bin:$HOME/.local/share/mise/shims:$PATH"
GAME_DIR="$ROOT/game"
ELF="$GAME_DIR/SCUS_971.11"
TOOLS_BUILD="${TOOLS_BUILD:-$ROOT/build/bozo-tools}"
GAME_BUILD="${GAME_BUILD:-$ROOT/build/bozo}"
JOBS="${JOBS:-6}"
# Native executables carry .exe on Windows (MSYS2).
EXE=""
case "$(uname -s)" in MINGW*|MSYS*|CYGWIN*) EXE=".exe" ;; esac
# GCC needs a temporary folder; a shell started without TMP/TEMP sends it to C:\Windows (refused).
if [ -z "${TMP:-}" ] || [ -z "${TEMP:-}" ]; then
mkdir -p "$ROOT/build/tmp"
export TMP="$ROOT/build/tmp" TEMP="$ROOT/build/tmp"
fi
# BozoEngine: BOZO_ENGINE_DIR (a checkout, for engine work not released yet), else the release cmake/bozo_engine.json
# pins, fetched into BozoEngine/ (nothing is downloaded while BozoEngine/.release matches the pin).
ENGINE="${BOZO_ENGINE_DIR:-$ROOT/BozoEngine}"
fetch_engine() {
[ -n "${BOZO_ENGINE_DIR:-}" ] || cmake -P "$ROOT/cmake/bozo_engine_fetch.cmake"
}
configure_game() {
cmake -S "$ROOT" -B "$GAME_BUILD" -G Ninja -DCMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}" "$@"
}