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
@@ -3,11 +3,11 @@
stub_constants.py [--check]
The stub modules in extension/src/platform/ScriptLib/GameplayModules.cpp only export names. Their
The stub modules in src/platform/ScriptLib/GameplayModules.cpp only export names. Their
constants are data the root scripts compute with (uiSafebox divides by safebox.SAFEBOX_SLOT_Y_COUNT),
so each stub module gets its 40250 init function's `PyModule_Add{Int,String}Constant` lines verbatim,
with the preprocessor lines around them and the source file's includes, in
extension/src/platform/ScriptLib/GameplayModuleConstants.cpp as `AddStubConstants_<module>(poModule)`.
src/platform/ScriptLib/GameplayModuleConstants.cpp as `AddStubConstants_<module>(poModule)`.
A module that is ported for real drops out of the stub list and out of this file.
The stub functions themselves (`stub_<module>_<Name>` in GameplayModules.cpp) return a zero value of
@@ -26,8 +26,8 @@ import sys
import refroot
REPO = refroot.repo_root()
STUBS = REPO / "extension/src/platform/ScriptLib/GameplayModules.cpp"
OUT = REPO / "extension/src/platform/ScriptLib/GameplayModuleConstants.cpp"
STUBS = REPO / "src/platform/ScriptLib/GameplayModules.cpp"
OUT = REPO / "src/platform/ScriptLib/GameplayModuleConstants.cpp"
INIT = re.compile(r'Py_InitModule\("([A-Za-z_]+)"')
KEEP = re.compile(r'^\s*(PyModule_Add(Int|String)Constant\s*\(|#\s*(if|ifdef|ifndef|elif|else|endif)\b)')
INCLUDE = re.compile(r'^\s*#\s*include\s*"([^"]+)"')
@@ -169,7 +169,7 @@ def generate() -> str:
"// module's init function with the preprocessor lines around them.",
'#include "UserInterface/StdAfx.h"',
]
root = REPO / "extension/src/port"
root = REPO / "src/port"
port = {p.relative_to(root).as_posix().lower(): p.relative_to(root).as_posix() for p in root.rglob("*.h")}
includes, bodies = [], []
for module in modules: