1:1 source port of the engine and game code; Windows build and system layer; docs. No game files or SDK headers.

This commit is contained in:
CRTkafa 2026-10-22 16:30:40 +08:00
parent c3b032a45a
commit 0ecb47e9cb
3871 changed files with 91080 additions and 1640063 deletions

16
tools/port/check_mac.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
# Step 5 compile check on the MacBook build node (the port needs Apple headers).
# usage: tools/port/check_mac.sh [files...] (default: every port/**/*.cpp)
# Syncs port/ to ~/choc3-check on `ssh mac`, then runs clang -fsyntax-only like docs/port/PORTING.md step 5.
set -e
cd "$(dirname "$0")/../.."
tar cf - port | timeout 120 ssh -o BatchMode=yes mac 'mkdir -p ~/choc3-check && cd ~/choc3-check && rm -rf port && tar xf - 2>/dev/null; [ -e parity-out ] || ln -s ~/Desktop/chocolatier-3-reverse/parity-out parity-out'
FILES="$*"
timeout 600 ssh -o BatchMode=yes mac "setopt sh_word_split; cd ~/choc3-check && P=parity-out/thirdparty; fail=0
files=\"$FILES\"; [ -z \"\$files\" ] && files=\$(find port -name '*.cpp' | sort)
for f in \$files; do
clang++ -std=c++17 -DNDEBUG -DBOOST_NO_AUTO_PTR -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -DGL_SILENCE_DEPRECATION -fsyntax-only \
-Iport/include -Iport/src/core -Iport/src/gl -Iport/src/mac -Iport/game -I\$P/build/lua-5.0.2/src -I\$P/src/libogg-1.0/include \
-I\$P/src/libvorbis-1.0/include -I\$P/build/jpeg-6b -I\$P/src/libpng-1.2.5 -I\$P/src/zlib-1.2.1 \
-I\$P/build/jasper-1.900.1/src/libjasper/include -I\$P/src/libpng-1.2.5/contrib/visupng -Iport/external/openal \$f 2>&1 | grep -E 'error|fatal' | head -5 > /tmp/choc3_chk.\$\$; if [ -s /tmp/choc3_chk.\$\$ ]; then echo \"== \$f\"; cat /tmp/choc3_chk.\$\$; fail=1; fi; rm -f /tmp/choc3_chk.\$\$
done; [ \$fail = 0 ] && echo CHECK-OK || echo CHECK-FAIL"