Compiling
In order to build Perentie, you will need the following tools in your PATH:
- Meson
- Ninja
- lua and luac, version 5.4
MS-DOS executable
You will need a copy of the DJGPP cross-compiler toolchain. We recommend building one using Andrew Wu's DJGPP build scripts. Sadly the original DOS-native DJGPP is not supported; it's utterly glacial, and not compatible with the build system.
source /path/to/djgpp/setenv
meson setup --cross-file=i586-pc-msdosdjgpp.ini build_dos
cd build_dos
ninja
This will produce the single DOS executable perentie.exe, which can be renamed and shipped with your game.
SDL executable
You will also need:
meson setup build_sdl
cd build_sdl
ninja
This will produce the single executable perentie, which can be renamed and shipped with your game.
For an improved debugging experience, you will want to turn off optimisation and turn on AddressSanitiser.
meson setup -Doptimization=0 -Db_sanitize=address build_sdl
WebAssembly
You will also need:
- Emscripten 4.0.4 or later
meson setup --cross-file=wasm32-emscripten.ini build_wasm
cd build_wasm
ninja
You will need to package your game contents into a prefetch module in order for Perentie to be able to start.
/usr/lib/emscripten/tools/file_packager game.data --js-output=game.js --preload ../example
To test the WebAssembly version locally, the following command will start a Python webserver with the correct COOP/COEP headers set:
ninja webserver
Documentation
You will also need:
meson setup build_sdl
cd build_sdl
ninja doc
ninja guide