mirror of
https://github.com/TheBozos/Steambot_Chronicles_Recomp.git
synced 2026-12-01 21:33:22 -10:00
cmake/bozo_engine.json pins BozoEngine 0.7.0 by version and the SHA-256 of its BozoEngine-0.7.0.tar.gz. cmake/bozo_engine_fetch.cmake (TMB_Recomp's, adapted) downloads it when BozoEngine/.release does not match the pin, checks the hash, and unpacks it into BozoEngine/ (git-ignored). It stops with a message if BozoEngine/ holds something else, such as the old submodule checkout. CMakeLists.txt includes the fetch unless BOZO_ENGINE_DIR names another tree, and reconfigures when the pin changes. scripts/common.sh fetches it too, so the bench and symbol scripts find the engine's tools in a fresh clone; BOZO_ENGINE_DIR selects a local checkout there as well. The submodule and .gitmodules are removed. README and LICENSE updated (LICENSE also named the wrong game). Co-authored-by: Thomas Martin <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
32 lines
1.3 KiB
Bash
32 lines
1.3 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"
|
|
|
|
# BozoEngine's tree: BOZO_ENGINE_DIR (a BozoEngine checkout, for engine work not released yet), else the release
|
|
# cmake/bozo_engine.json pins, in BozoEngine/ (fetched by cmake/bozo_engine_fetch.cmake; nothing is downloaded while its
|
|
# stamp matches the pin).
|
|
if [ -n "${BOZO_ENGINE_DIR:-}" ]; then
|
|
ENGINE="$BOZO_ENGINE_DIR"
|
|
else
|
|
cmake -P "$ROOT/cmake/bozo_engine_fetch.cmake" || { echo "BozoEngine: the pinned release could not be fetched" >&2; exit 1; }
|
|
ENGINE="$ROOT/BozoEngine"
|
|
fi
|
|
|
|
GAME_DIR="$ROOT/game"
|
|
ELF="$GAME_DIR/SLUS_213.44"
|
|
GAME_BUILD="${GAME_BUILD:-$ROOT/build/bozo}"
|
|
JOBS="${JOBS:-$(nproc)}"
|
|
|
|
# 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). The team keeps
|
|
# everything on D:, so a TMP/TEMP on C: (the default user Temp) is replaced too.
|
|
case "${TMP:-}|${TEMP:-}" in [Cc]:*|*"|"[Cc]:*|/c/*|*"|"/c/*) unset TMP TEMP ;; esac
|
|
if [ -z "${TMP:-}" ] || [ -z "${TEMP:-}" ]; then
|
|
mkdir -p "$ROOT/build/tmp"
|
|
export TMP="$ROOT/build/tmp" TEMP="$ROOT/build/tmp"
|
|
fi
|