port 2D steps 3-4: strict 40250 asset gate with a provenance manifest
tools/asset_manifest.py records path/size/sha256 of pack/Index, every .eix/.epk and Eternexus/root/*.msm (audit/assets/40250-client.json). The gate script sets MT_ASSETS_STRICT=1, verifies the manifest, runs the native pack/proto tests and four Godot tests, and fails on a missing client, a mismatch or a skip. MT_40250_CLIENT now comes from the environment for the native tests too. remote_player_test accepts both weighted WAIT variants (wait/wait_1). PORT-PLAN §5 records the 2D status. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -349,6 +349,32 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
||||
5. 资源根切换按 2R 第 6 条执行:移植 `EterPack`(`CLZObject`/TEA 已经在第 2 步)和 `EterPackManager`,接上
|
||||
`asset_io` 的 pack 后端,读取方逐个改用 40250 路径,跑严格门禁,更新本节状态。
|
||||
|
||||
状态(2026-09-23):
|
||||
|
||||
| 步骤 | 状态 | 提交 |
|
||||
| --- | --- | --- |
|
||||
| 1. msm 路径 | 完成:`equip_model.gd` 先查 `root/<cls>_<m/w>.msm`,m2dev 的 `root/msm/` 作后备;8 个种族都能从 `Eternexus/root` 找到 | 240d2827 |
|
||||
| 2. proto | 完成:`proto.cpp` 用移植的 `CLZO`/TEA 读 MIPX/MMPT(156 / 255 字节),m2dev 的 XChaCha20 / 236 / 335 读取已删除;名字按 `GetName`/`GetMonsterName` 取 `szLocaleName`(cp1252)。`SMobTable` 暂时在 `proto.cpp` 里放一份 `#pragma pack(1)` 镜像(`static_assert == 255`),2P 移植 `GameLib/PythonNonPlayer` 后改用正式镜像 | 232d0461 |
|
||||
| 3. 严格模式 | 完成(见下) | 本批最后一个提交 |
|
||||
| 4. 门禁脚本 | 完成:`script/run_40250_asset_gate.sh` 在 macOS 上 PASS | 同上 |
|
||||
| 5. 资源根 | 部分完成:pack 后端(`PackInitialize` + `asset_io` 的 `pack://` + `Metin2Pack` 节点)已接入,proto 经 `pack://locale/<lang>/` 读取(5a 1f1004da、5b 5a26e93f)。模型、贴图、地图和 root/locale 文本仍读 m2dev `assets/`,由 2V 切片逐个切换 | |
|
||||
|
||||
环境变量(取代步骤 3 里“两者都透传”的过渡方案):
|
||||
|
||||
- `MT_40250_CLIENT`:40250 的 `Client` 目录(`pack/`、`Eternexus/`)。native 测试(CMake 缓存变量默认读同名环境变量,
|
||||
再退回 `${MT_40250_SOURCE}/../../Client`)、`AssetRoot.client_path()` 和门禁脚本都用它;
|
||||
- `MT_ASSETS`:只表示 m2dev 散文件目录(开发期覆盖);
|
||||
- `M2_ASSETS`:测试不再使用;
|
||||
- `MT_ASSETS_STRICT=1`:native 测试在资源缺失时返回 1(不是 ctest 的跳过码 77),门禁脚本把 Godot 测试输出里的
|
||||
`(skip` 也算失败。
|
||||
|
||||
来源清单:`tools/asset_manifest.py generate|verify <Client>` 记录 `pack/Index`、全部 `.eix/.epk` 和
|
||||
`Eternexus/root/*.msm` 的路径、大小、sha256,结果在 `audit/assets/40250-client.json`(223 个文件,1,407,474,045
|
||||
字节)。文件缺失、内容变化或清单外多出的文件都会让 verify 失败。
|
||||
|
||||
已知问题(不是本批引入的):完整 Android 链接在 API 24 上失败,原因是 `extension/src/net/text_codec.cpp` 用了 iconv;
|
||||
本批的 mtproto、`pack40250_node`、`asset_io`、`proto_node` 都能在 Android 上编译。
|
||||
|
||||
## 6. 进度与 port-map 基线
|
||||
|
||||
实时数字用 `port_map.py status` 查看。
|
||||
@@ -370,6 +396,10 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
||||
| platform | 2091 | 0 | |
|
||||
| 合计 | 10609 | 0 | |
|
||||
|
||||
2D 之后(2026-09-23):logic 46 个 `PORTED`(EterPack、EterPackManager、lzo、tea、Stl),platform 21 个 `ADAPTED`
|
||||
(PackInitialize、FileLoader、MappedFile、FileBase、CRC32)。只标了 proto_test + port_eterpack_test 覆盖率运行实际执行到
|
||||
的函数。
|
||||
|
||||
与基线前的数字(logic 3285、python 4890、platform 2229,共 10404)相比的变化:
|
||||
|
||||
- 函数清单(`port_map.cpp_functions`)用 platform 骨架的 clang 声明逐个对照后修正:
|
||||
|
||||
Reference in New Issue
Block a user