#!/usr/bin/env bash # One-command developer check (Windows host). # 1. builds port/build-win/bin/choc3port.exe (bash port/winbuild.sh) # 2. recomputes the MANIFEST counters (python tools/port/manifest_status.py) and fails if a generated header is missing # 3. with --mac: also runs the Apple-header compile check on the MacBook (tools/port/check_mac.sh) # usage: tools/port/check_all.sh [--mac] Exit code 0 only when every step passed. Nothing here runs the game. set -e cd "$(dirname "$0")/../.." mac=0; [ "$1" = "--mac" ] && mac=1 echo "== build (Windows)" bash port/winbuild.sh [ -f port/build-win/bin/choc3port.exe ] || { echo "FAIL: choc3port.exe missing"; exit 1; } echo "== manifest counters" export PATH="$HOME/bin:$PATH" python tools/port/manifest_status.py git diff --stat -- docs/port/MANIFEST.tsv | tail -1 if [ $mac = 1 ]; then echo "== compile check (MacBook)" out="$(bash tools/port/check_mac.sh)"; echo "$out" | tail -20 echo "$out" | grep -q CHECK-OK || { echo "FAIL: Mac compile check"; exit 1; } fi echo "CHECK-ALL-OK"