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
+6 -6
View File
@@ -63,12 +63,12 @@
## 采用方案 A 后的结构
```
extension/src/port/ScriptLib/PythonLauncher.cpp # CPythonLauncher,几乎原样
extension/src/port/EterPythonLib/PythonWindow*.cpp # 窗口树、焦点、命中、事件:逻辑照搬
extension/src/port/UserInterface/*Module.cpp # net/player/chr/... 模块,调用已移植的 CPython* 单例
extension/src/platform/ui/ # 适配层:CGraphicImageInstance/CGraphicTextInstance
src/port/ScriptLib/PythonLauncher.cpp # CPythonLauncher,几乎原样
src/port/EterPythonLib/PythonWindow*.cpp # 窗口树、焦点、命中、事件:逻辑照搬
src/port/UserInterface/*Module.cpp # net/player/chr/... 模块,调用已移植的 CPython* 单例
src/platform/ui/ # 适配层:CGraphicImageInstance/CGraphicTextInstance
# 的绘制 -> Godot RenderingServer/CanvasItem
extension/third_party/cpython-2.7.18/ # 静态库
third_party/cpython-2.7.18/ # 静态库
```
Godot 这边只剩一个宿主 Control:把输入转发给 `CPythonWindowManager`,每帧调用它的 Update/Render。
@@ -96,7 +96,7 @@ Godot 这边只剩一个宿主 Control:把输入转发给 `CPythonWindowManage
## 下一步
1. ~~把 CPython 2.7.18 放进 `extension/third_party/`,共用源码/静态模块清单,但为各平台分别生成或维护
1. ~~把 CPython 2.7.18 放进 `third_party/`,共用源码/静态模块清单,但为各平台分别生成或维护
`pyconfig.h`~~,静态链接进 `libmtgodot`;
源码和三平台配置已完成(2026-09-23,批次 2P step 1):`mtpython` 静态库(`-DMTGODOT_EMBED_PYTHON=ON`)、
`tools/py_embed/gen_pyconfig.sh`、ctest `python.embed`;macOS/Android/iOS 编译通过。