Building from Source¶
This page shows you how to build the native port from a clone of the repository: on Linux, on macOS, and for Windows by cross-compiling on Linux. The build needs no game data; the port reads your Blood Money PC installation when it runs.
To rebuild the original PlayStation 2 executable and check it byte for byte, see Development.
What you need¶
git, Python 3.12 or later,clangandclang++.- On Linux, the development packages SDL3 builds against. On Ubuntu 24.04 these are the ones
.github/workflows/release.ymlinstalls:sudo apt-get install ninja-build zlib1g-dev \ libasound2-dev libpulse-dev libpipewire-0.3-dev libdbus-1-dev libibus-1.0-dev libudev-dev \ libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \ libxkbcommon-dev libwayland-dev wayland-protocols libdecor-0-dev libdrm-dev libgbm-dev \ libgl1-mesa-dev libegl1-mesa-dev - On macOS, the Xcode command line tools and
ninja(brew install ninja). The build targets Apple silicon and macOS 11.
make port-setup downloads and builds everything else into tools/third_party/port/, at the versions port/port.json pins: SDL3, a minimal LGPL FFmpeg for the movies, Dear ImGui, Lua 5.5 and the shader tools. It uses the system's cmake and ninja when both are installed, and otherwise installs the pinned ones with the uv that make helpers sets up.
Linux and macOS¶
git clone https://github.com/RobiasTheTieper/open-blood-money.git
cd open-blood-money
make port-setup
make port
build/port/cmake/openbloodmoney
make port runs the CMake build, which compiles the 14 levels’ scene scripts from src/scripts/ as native code.
Checks for port changes:
make port-testbuilds the port's test targets and runsctest --output-on-failure(on a headless machine, run withSDL_VIDEO_DRIVER=offscreen).make check-shadersregeneratesport/shaders/generated/shaderssdl_generated.cppinto a scratch directory underbuild/using the pinned DXC and SPIRV-Cross tools (Linux only) and fails if the committed file differs.make port-statuscompiles every game unit with the host compiler, reports failures, and exits non-zero when any unit fails, which helps after a change tosrc/.
Windows¶
The Windows build cross-compiles on Linux with zig for x86_64-windows-gnu, and links SDL3, zlib and FFmpeg statically:
The result is build/port/windows/openbloodmoney.exe. It needs only the system DLLs and the Universal CRT of Windows 10 and later. Pass VERSION=v0.1.0 to make port-windows (or --version v0.1.0 to tools/port/build_port.py --target windows) to set the executable's VERSIONINFO resource fields; without it the resource uses 0,0,0,0 and dev.
Packaging a release¶
python3 tools/port/package_release.py linux --version v0.1.0 (or windows, or macos) writes the same desktop archive the release workflow publishes into build/release/, with LICENSE, LICENSE-SCOPE.md, THIRD-PARTY-NOTICES.md and the licences of SDL3, Dear ImGui, Lua, zlib, minizip, FFmpeg and the Barlow and Inter fonts. python3 tools/port/build_mobile.py android --version v0.1.0 (on Linux with Android NDK) and ios (on macOS with Xcode) build the mobile packages (a signed APK and an unsigned IPA) with the same licence files. Pushing a tag that starts with v builds all desktop and mobile targets on GitHub Actions, writes SHA256SUMS, and publishes the release (CI and Releases).
Running a build¶
build/port/cmake/openbloodmoney opens the launcher like a release does. openbloodmoney "Hitman Blood Money" [Option=Value ...] goes straight into the game, and --no-mods starts without mods. The port's test switches (scripted input, captures, deterministic runs) are described in The SDL3 Port.
Mobile builds¶
Run python3 tools/port/build_mobile.py android with JDK 17, Android SDK 36, NDK r28c, CMake and Ninja. Set ANDROID_HOME to the SDK directory. On macOS with Xcode and Ninja, run python3 tools/port/build_mobile.py ios. Packages are written to build/release/. The APK is signed with apksigner from Android build-tools 35.0.0, using the release key when OB_ANDROID_KEYSTORE, OB_ANDROID_KEYSTORE_PASSWORD and OB_ANDROID_KEY_ALIAS (and OB_ANDROID_KEY_PASSWORD if it differs) are set, and otherwise the local debug key in ~/.android/debug.keystore, which it creates if needed. A debug-signed APK does not install over a release one, so uninstall the release app first.