Build Guide

Every way to build the game: Linux desktop, the Linux bundle, WebGL 2, Android and Windows, plus tests and CI.

There is one game target, GalaxyEggbertCNA, defined in the root CMakeLists.txt and built on CNA and cna-engine. Every platform uses that same file; only the toolchain and the renderer change. Prerequisites and the sibling checkouts are on Getting Started; every option is on Configuration. Status as of 2026-11-10.

BuildRendererUsual build directoryStatus
Linux desktopOPENGL33 or OPENGLES3build-cna-opengl3/Verified in CI and live
Linux runtime bundle (.tar.gz)as the desktopany Linux treeBuilds launch is a host check, not a CI gate
Web (Emscripten)WEBGL2build-cna-webgl2/Manual verified in headless Chrome, not in CI
Android (Gradle)OPENGLES3android/app/build/Emulator builds and runs, not played on a device
Windows (MinGW)SDLGPU plannedbuild-windows/Not verified
Release packagesLinux archive + Android APKa Release desktop treePublished 0.4.0 on 2026-11-12 (a GitHub release)

Before you configure

Linux desktop

cmake -S . -B build-cna-opengl3 -G Ninja -DCMAKE_BUILD_TYPE=Release \
  -DCNA_GRAPHICS_RENDERER=OPENGL33
cmake --build build-cna-opengl3 --target GalaxyEggbertCNA --parallel 4

GALAXY_EGGBERT_BUILD_CNA is ON by default, so it can be left out. Without CNA_GRAPHICS_RENDERER a native build uses OPENGLES3 (OpenGL ES 3); OPENGL33 is desktop OpenGL 3.3 core. Both belong to CNA's EasyGL family and both are verified on Linux; the other identities are on Platform Support.

After every link a post-build step copies Content/, worlds3d/, textures3d/ and avatars3d/ next to the executable, changed files only (cmake/CopyDirectoryIfDifferent.cmake). That is why the game runs from its build directory (Running the Game).

Useful targets

TargetWhat it builds
GalaxyEggbertCNAThe game, output name GalaxyEggbert.
all (no --target)The game plus every test executable (Verify*, GalaxyEggbertWorldsTests) and the tools.
VerifyShippedWorlds, DumpBlockDefinitions, GenerateSampleWorld3DWorld and registry tools, also used by the tests (Assets & Tools).
packageThe Linux runtime bundle (below).
GalaxyEggbertDocsDoxygen API documentation; exists only when Doxygen is installed.

Without cheats

Typed cheats, F12 and the hidden cheat menu are compiled in by default. For a build without them:

cmake -S . -B build-cna-opengl3 -DGALAXY_EGGBERT_ENABLE_CHEATS=OFF
cmake --build build-cna-opengl3 --target GalaxyEggbertCNA --parallel 4

See Cheats & Diagnostics for what the switch removes.

Linux runtime bundle

The package target (CPack, TGZ) makes a relocatable x86-64 archive, GalaxyEggbert-<version>-linux-x86_64.tar.gz (the version from VERSION.txt, e.g. GalaxyEggbert-0.4.0-linux-x86_64.tar.gz), in the build directory. Configure the tree as Release. README.md does this in a separate build-package directory; the same target in the desktop tree, as below, should work equally but has not been run separately:

cmake -S . -B build-cna-opengl3 -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build-cna-opengl3 --target package --parallel 4
tar -xzf build-cna-opengl3/GalaxyEggbert-0.4.0-linux-x86_64.tar.gz
./GalaxyEggbert-0.4.0-linux-x86_64/run-galaxy-eggbert

The archive holds the executable, the launcher run-galaxy-eggbert (it enters its own directory and starts the game with your arguments), Content/, worlds/, worlds3d/, textures3d/, avatars3d/, the SDL3, SDL3_image and SDL3_mixer shared libraries in lib/ (found through the RPATH $ORIGIN/lib), their licenses in licenses/SDL/, LICENSE, README-Linux.md (from packaging/README-linux-bundle.md), and since 0.1.0 THIRD_PARTY.txt, RELEASE_NOTES.md (both from packaging/) and VERSION.txt.

It is a runtime bundle, not an AppImage: the host still supplies the graphics stack, FFmpeg and the C++ runtime. Turn the target off with -DGALAXY_EGGBERT_ENABLE_LINUX_BUNDLE=OFF; it is never defined for Emscripten, Android or Apple builds. The archive needs the glibc of the system it was built on or newer: built on Debian 13 it needs glibc 2.38. An archive for older systems has to be built on one.

Release packages

tools/release/make_release.sh makes a release's packages in one folder. It needs a configured Release desktop tree (it stops otherwise):

tools/release/make_release.sh build-cna-opengl3 <out-dir>              # Linux archive + Android APK
tools/release/make_release.sh build-cna-opengl3 <out-dir> --no-android # Linux archive only

What the packages need and how to install them: Releases.

Tests

cmake --build build-cna-opengl3 --parallel 4      # everything, tests included
ctest --test-dir build-cna-opengl3 --output-on-failure
ctest --test-dir build-cna-opengl3 -N             # list the tests
ctest --test-dir build-cna-opengl3 -R VerifyShippedWorlds

Golden frames, the movement trace and the autoplay playthroughs are separate, manual checks: Testing.

Web (Emscripten, WebGL 2)

Install and activate the Emscripten SDK, then:

source <emsdk>/emsdk_env.sh
emcmake cmake -S . -B build-cna-webgl2 \
  -DCNA_GRAPHICS_RENDERER=WEBGL2 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
cmake --build build-cna-webgl2 --target GalaxyEggbertCNA --parallel 4

WEBGL2 is also the default under Emscripten. The link uses the page template cmake/web/shell-cna.html (a canvas and a full-screen button), WebGL 2 only, a 256 MB initial heap that may grow, IDBFS for saves, and CNA's Asyncify policy so the blocking Game::Run() yields to the browser between frames.

OutputContents
GalaxyEggbert.htmlThe page to open.
GalaxyEggbert.js, GalaxyEggbert.wasmEmscripten glue and the game.
GalaxyEggbert.dataPreloaded, read-only: Content/icons, Content/backgrounds, Content/sounds, Content/demos, worlds3d, textures3d, avatars3d.
Content/music/Not packed (27 MB): staged beside the page and fetched a track at a time when a world first plays it.

To publish the game, copy the four GalaxyEggbert.* files and the Content/music/ folder; without the folder the game runs silent of music. Serve them over HTTP (a file: URL is not a valid test). Saves and the player's worlds live in /save, an IndexedDB-backed folder. The web build carries only the 1x textures. Running it: Running the Game.

Android (Gradle)

ToolVersion
Android SDKAPI 35 (compile and target); minimum API 24, Android 7.0
NDK29.0.14206865 (ndkVersion in android/app/build.gradle)
CMake (SDK Manager)4.1.2 (pinned in the Gradle file)
JDK17 or 21
cd android
./gradlew assembleDebug                                      # arm64-v8a and x86_64
./gradlew assembleDebug -Pandroid.injected.build.abi=x86_64  # emulator ABI only, faster

Windows (MinGW)

Not verified. An earlier cross-build and packaging run worked with a CNA renderer that has since been retired. The current configuration has not been rebuilt and run in 3D, so Windows is not a supported platform yet. The commands below are what the repository documents.

Native, with a MinGW toolchain such as CLion's bundled one:

cmake -S . -B build-windows -DGALAXY_EGGBERT_BUILD_CNA=ON
cmake --build build-windows --target GalaxyEggbertCNA

Cross-build from Linux with MinGW-w64 (sudo apt install mingw-w64), in a clean directory:

cmake -S . -B build-windows \
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw-w64.cmake \
  -DCNA_GRAPHICS_RENDERER=SDLGPU -DBUILD_TESTING=OFF
cmake --build build-windows --target GalaxyEggbertCNA --parallel 4

Continuous integration

.github/workflows/cna-ci.yml runs on pushes and pull requests to develop and master (changes under web/ alone do not trigger it) and on demand. On ubuntu-latest it checks out the game, cna (with its submodules, not recursive), cna-engine, easy-gl, sharp-runtime and meta-gl at pinned revisions plus the worlds/ folder of mobile-eggbert; installs the packages listed on Getting Started; caches the SDL build and ccache; configures -B build-cna with the ccache launchers; builds everything; and runs ctest --output-on-failure. Every test runs.

Not in CI: golden frames, the movement trace, autoplay playthroughs, the web and Android builds and the bundle. python3 tools/ci_pin_siblings.py moves the pins to your local sibling revisions; --check only reports drift. A second workflow, pages.yml, deploys this website from web/.

Related pages