Track editor for the Playstation 1 game Crash Team Racing
- Clone and fetch submodules (pybind11, glfw, etc.):
git submodule update --init --recursive
- Install Python (the editor embeds Python via pybind11) and set
PYTHON_HOMEto your Python install root (the folder that containsinclude/andlibs/).- Example:
PYTHON_HOME=C:\Users\you\AppData\Local\Programs\Python\Python312
- Example:
- (Optional, for smaller bundles) Download the official Python embeddable ZIP and set
PYTHON_EMBED_HOMEto its extracted folder.- Example:
PYTHON_EMBED_HOME=C:\Users\you\Downloads\python-3.12.4-embed-amd64
- Example:
- Open
CrashTeamEditor.slnand buildx64Debug/Release. - If the executable fails to start due to a missing
python3xx.dll, add these to your debugger environmentPATH(or systemPATH):$(PYTHON_HOME)$(PYTHON_HOME)\DLLs
make release(ormake debug)- The Makefile uses
PYTHON_EXECUTABLE(default:python) to detect include/lib paths viasysconfig.
Bindings are implemented with pybind11 (included under third_party/pybind11). The same python_bindings/cte_bindings.cpp file exposes a standalone crashteameditor module and also registers an embedded module that the editor's built-in Python console reuses.
See docs/python_bindings.md for the full list of exposed classes, methods, enums, and constants.
Because the editor links python_bindings/cte_bindings.cpp directly, the build needs access to Python headers and libraries. See the Building section above for platform-specific setup (especially PYTHON_HOME on Windows).
- Configure the bindings build alongside the existing sources:
You may need to set
cmake -S python_bindings -B python_bindings/build
PYTHON_EXECUTABLEif the default interpreter is not the one you intend to use. - Compile the module:
cmake --build python_bindings/build --config Release
- Import the generated
crashteameditormodule from Python scripts in the same interpreter whose headers were used during the build.