Files
mtgodot-poc/.gitignore
T
shenleiandClaude Opus 5 ffbb5d48d6 port(2P step 3c): stage python27.zip into the mobile sandbox
CPython opens the stdlib zip with its own stdio, so it needs a real path.
On the desktop res:// is a directory and globalize_path() is enough; in an
exported build res:// is inside the PCK, which nothing outside Godot reads.

  make_stdlib_zip.py now also writes <out>.sha256
  mtpython_stdlib_project copies python27.zip + .sha256 into project/
    (gitignored), and both export presets' include_filter lists them, so
    they enter the PCK — checked with --export-pack
  extension/src/python_stdlib.{h,cpp} (Metin2Python.stdlib_path in
    GDScript): reads the bytes out of the PCK, writes
    user://python27.zip.part, hashes the file as written against the
    shipped digest, then renames. A sandbox copy is reused only when it
    matches, so a first start killed mid-copy and a zip replaced by a new
    build both re-stage instead of feeding zipimport a torn file.
  PythonHost::SetDefaultStdLibPath / DefaultStdLibPath() answer with that
    path ($MT_PYTHON_STDLIB still wins). python_stdlib.cpp is the only unit
    that knows res:// / user://; port_platform stays godot-free.

Also fixes the Windows gate, which step 3b broke: without mtpython the
MinGW build compiled UserInterface/StdAfx.h (it includes ScriptLib/StdAfx.h,
as the original PCH does). port/CMakeLists.txt excludes that header and
PythonPackModule.cpp with ScriptLib, and platform/CMakeLists.txt excludes
platform/ScriptLib/ the same way.

Not done: on-device staging. The macOS test drives the mobile path with
force_stage=true, and nothing in the app boot calls it yet — the
interpreter only starts in the process with 2V0.

gates: python_stdlib_test.gd PASS (in-place path, staging, sha256, bytes
equal res://, no .part, ZIPReader finds encodings/__init__.py, no re-copy
on a second call, corrupted copy re-staged) · macOS ctest 27/27 ·
mingw + android + ios port_platform compile clean · port_map.py check 0
errors · key leak check 8/8 none.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 09:39:33 +09:00

76 lines
2.0 KiB
Plaintext

# Metin2 game assets (project/asset_root.gd). Committed to THIS self-hosted
# private repo for one-clone multi-device builds. Do not publish/redistribute
# — copyrighted Ymir art. MT_ASSETS env var overrides the location.
/assets/asset_index.txt # derived — regen: godot --headless --path project --script bake_asset_index.gd
# build
/build/
# 渲染测试的落图输出(test/rendering 用例自建)
/project/build/
/build-ios/
/build-android/
/build-classic/
/build-port-gate/
/cmake-build-*/
compile_commands.json
# godot
/assets/**/*.import
/assets/**/*.uid
/project/.godot/
/project/bin/*.dylib
/project/bin/*.dSYM/
/project/bin/*.so
/project/bin/*.dll
/project/bin/*.wasm
/project/bin/ios/
/project/bin/android/
# The embedded interpreter's stdlib, copied here from the build tree so the exporter packs it
# (extension/CMakeLists.txt, 批次 2P step 3c). Derived — never committed.
/project/python27.zip
/project/python27.zip.sha256
# Android Gradle build template (~1.2 GB of regenerable Gradle output + Godot
# .aar). Recreate per machine:
# godot --headless --path project --install-android-build-template \
# --export-debug Android build/export/mtgodot-poc.apk
/project/android/
# misc
.DS_Store
*.tmp
*.o
*.a
.env.live-smoke.local
# playable network tests: local scenario/fixture configs, credential files and
# run outputs never enter git. Only scenario.example.json and the static gate
# fixtures in test/playable are committed. Run outputs live under /build/playable.
/test/playable/*.local.json
/test/playable/*.local.txt
/test/playable/runs/
*.credentials
*.credentials.json
.env.*.local
# clangd
/.cache/
# oracle: cross-compiled exe + leaked Granny DLL (size / RAD IP — never commit;
# oracle/build-wine.sh rebuilds). See oracle/README.md.
/oracle/oracle.exe
/oracle/*.dll
/oracle/*.dylib
# vendored-lib test artifacts
/test/oracle_dumps/
/test/*.actual.png
/build-tools/
# libgr2 tool outputs
/fuzz-report.json
/test/m2-numeric.json.tmp
# compare.py render output
/test/compare-shots/
/test/compare-report.json