layout: restructure into src/ tests/ android/ scripts/ tools/

- extension/src/{port,platform,codepage} -> src/; native_render -> src/host
  (+ dxt, shaders/); libgr2 -> src/gr2; extension/third_party -> third_party
- extension/tests -> tests/port, libgr2/tests -> tests/gr2
- android-native -> android (build.sh, push-client.sh moved in)
- script -> scripts; tools/40250 -> tools/server; oracle -> tools/granny-oracle;
  perf tools -> tools/perf
- all build trees under build/ (native, release, android, port-gate)
- xrender:: CMake aliases -> mt::; port-map ledger impl paths rewritten

No code changes. ctest 15/15, port_gate macos+android PASS, port_map check 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-29 19:08:19 +09:00
co-authored by Claude Opus 5.5
parent 70710477cf
commit a46093104c
2817 changed files with 13728 additions and 13744 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# 在 macOS 上用 MinGW-w64 交叉编译 oracle.exe(链泄露 SDK 的 granny2_x64.lib),
# 用 Wine 跑。见 RUNBOOK.md。实测 macOS 26.4 / Apple Silicon / wine-stable 11.0 / Granny 2.9.12.
set -euo pipefail
cd "$(dirname "$0")"
SDK="${GRANNY_SDK:-../../../MobileSource/Cross Platform/Granny-3D-SDK-main}"
[ -f "$SDK/include/granny.h" ] || { echo "找不到 $SDK/include/granny.h(传 GRANNY_SDK=<SDK 根>)"; exit 1; }
CC="${MINGW_CC:-x86_64-w64-mingw32-gcc}"
command -v "$CC" >/dev/null || { echo "没装 MinGW:brew install mingw-w64"; exit 1; }
# 关键:granny.h 在 _WIN64 分支里 `#define GRANNY_64BIT_TYPE __int64`,
# MinGW GCC 默认不认 __int64 关键字 → 用 -D__int64="long long" 顶掉。
"$CC" -O2 -std=gnu11 -fms-extensions -D'__int64=long long' \
-I "$SDK/include" \
oracle.c "$SDK/lib/win64/granny2_x64.lib" \
-o oracle.exe
cp "$SDK/lib/win64/granny2_x64.dll" ./
echo "built: $(pwd)/oracle.exe (+ granny2_x64.dll)"
echo
echo "跑(Wine):"
echo " export WINEPREFIX=\$HOME/.wine-oracle # ⚠ 别放 /tmp:Wine 拒绝在非属主目录建 prefix"
echo " wine wineboot --init # 首次,Rosetta 下较慢"
echo " wine oracle.exe probe 'Z:\\path\\to\\warrior_cheongrin.gr2'"
echo " wine oracle.exe dump 'Z:\\...\\model.gr2' 'Z:\\...\\anim.gr2' <t> -o 'Z:\\...\\out.bin' --mesh N"
echo
echo "对拍:build/tools/oracle_diff <model.gr2> <anim.gr2|-> <out.bin> --mesh N"