launch.py 446 B

1234567891011121314
  1. """Run the recovered editor against the project resources, backing up map.json."""
  2. from pathlib import Path
  3. import os
  4. import runpy
  5. import sys
  6. HERE = Path(__file__).resolve().parent
  7. ROOT = HERE.parent
  8. if __name__ == "__main__":
  9. sys.path.insert(0, str(ROOT / ".codex_build" / "map_editor_runtime"))
  10. sys.path.insert(0, str(HERE / "source"))
  11. os.chdir(str(ROOT))
  12. runpy.run_path(str(HERE / "source" / "main.py"), run_name="__main__")