-
Notifications
You must be signed in to change notification settings - Fork 156
Compiling Overview
OpenBOR requires a 64-bit target architecture.
Desktop builds use CMake 3.22 or newer. Android uses its own Gradle/NDK build system.
For more detailed setup information, see COMPILING.md in the OpenBOR repository.
The recommended Windows environment is MSYS2 UCRT64 with GCC, CMake, Ninja, Git, SDL2, zlib, Vorbis, Ogg, libpng, and libvpx installed.
Open an MSYS2 UCRT64 terminal and run from the OpenBOR repository root:
rm -rf build
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_WIN=ON -DTARGET_ARCH=AMD64
cmake --build build --parallelOutput:
engine/releases/WINDOWS/OpenBOR-x64.exe
Install GCC, CMake, Ninja, Git, SDL2, Vorbis, libpng, and libvpx.
rm -rf build
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_LINUX=ON -DTARGET_ARCH=AMD64
cmake --build build --parallelOutput:
engine/releases/LINUX/OpenBOR
On a native ARM64 Linux system:
rm -rf build
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_LINUX=ON -DTARGET_ARCH=ARM64
cmake --build build --parallelOutput:
engine/releases/LINUX/OpenBOR-arm64
Install CMake, Ninja, SDL2, Vorbis, Ogg, and libvpx with Homebrew.
For an ARM64 build:
rm -rf build
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_DARWIN=ON -DTARGET_ARCH=ARM64
cmake --build build --parallelOutput:
engine/releases/DARWIN/OpenBOR.app
Universal ARM64/x86-64 builds are also supported when the required dependency trees are available.
Android builds use the Gradle project under engine/android/ and target arm64-v8a only.
Required tools:
- JDK 17
- Android SDK Platform 35
- Android Build Tools 36.0.0
- Android NDK 21.4.7075529
Install the Android packages:
sdkmanager "platforms;android-35" "build-tools;36.0.0" "ndk;21.4.7075529"Then, from the repository root:
cd engine
bash version.sh
cd android
chmod +x gradlew
./gradlew --no-daemon clean assembleDebugOutput:
engine/android/app/build/outputs/apk/debug/OpenBOR.apk
See engine/android/README for release signing and standalone game packaging.
Docker is optional. The supplied dev container provides cross-compilation environments for:
- Windows AMD64
- Linux AMD64
- Linux ARM64
Build the container:
docker build -t openbor .devcontainerRun all configured desktop builds:
docker run -it --rm -v "$(pwd):/workspace" openbor ./build-all.shAndroid is built separately with Gradle/NDK.
The old engine/Makefile, engine/build.sh, engine/build.bat, platform IDs, and bundled SDK build system are no longer supported.
Git must be available on PATH because OpenBOR uses the repository revision when generating version information.