This file should assist you in compiling and running the game.
Note the troubleshooting and FAQ sections.
openage consists of a pure C++ library, libopenage, and the openage python package.
We use CMake for all our building needs.
We wrap CMake with an optional configure wrapper script.
The justfile in the project root forwards the common build commands to the ./configure build directory.
You can build the project like a regular CMake project.
For more build system internals, see doc/buildsystem.md.
Dependencies are needed for:
- C = compiling
- R = running
- A = asset conversion
- S = sanity checks (just checkall)
- O = optional, we can continue without it
Dependency list:
C gcc >=16 or clang >=21
CRA python >=3.12
C cython >=3.1
C setuptools
C cmake >=3.28
C ninja
C O just
A numpy
A lz4
A python imaging library (PIL) -> pillow
A tomli_w
CR opengl >=3.3
CR libepoxy
CR libpng
S clang-tidy
R dejavu font
CR eigen >=3
CR freetype2
CR fontconfig
CR harfbuzz
C O include-what-you-use
CR nyan (https://github.com/SFTtech/nyan)
CR O ncurses
C mako
CR opusfile
CRA opus
CRA ogg
S ruff
C pygments
S ty
CR qt6 >=6.2 (Core, Quick, QuickControls, Multimedia modules)
CR toml11
CR O vulkan
A An installed version of any of the following (wine is your friend).
Other versions _might_ work:
- Age of Empires I: Rise of Rome Patch 1.0a
- Age of Empires I: Definitive Edition
- Age of Empires II: The Conquerors Patch 1.0c
- Age of Empires II: Forgotten Empires
- Age of Empires II: HD (now also called: Age of Empires II (2013))
- Age of Empires II: Definitive Edition
- Star Wars: Galactic Battlegrounds: Clone Campaigns
There are some prerequisite steps that need to be performed so openage can be built successfully. Those steps vary from platform to platform, and are described below for some of the most common ones:
The python dependencies are declared in pyproject.toml, so
uv can set up a Python environment for you:
uv sync
This creates a .venv/ with all required Python modules, and the CMake build
will pick it up when you point it at the interpreter:
./configure -- -DPython3_EXECUTABLE=$PWD/.venv/bin/python
If you manage python packages with the system package manager instead, that works too: the linters are then taken from the system PATH. In that case just ignore the pyproject.toml.
openage depends on nyan, which is the
engine configuration language.
-
For development,
nyancan be built and used without installation (-> no installation needed, since it can be found usingcmakeuser package registry). Just clone the repo somewhere and follow thenyanbuild instructions). Then./configure ... -- -Dnyan_DIR=/directory/where/nyanConfig/is/in/. -
Alternatively,
openagecan downloadnyanautomatically. This is activated with./configure --download-nyan ...orcmake -DDOWNLOAD_NYAN=YES ....
cmake looks for nyan in the user package registry (~/.cmake/packages/nyan/)
and the system package registry (/usr/lib/cmake/nyan/) for nyanConfig.cmake.
If nyan cannot be found but you know where it is, you can hint the location of the nyanConfig.cmake with:
-Dnyan_DIR=/directory/where/nyanConfig/is/in/
Make sure you have all the dependencies installed.
- (Obviously) clone this repo or acquire the sources some other way
- Make sure you have everything from the dependency list
- Select the compiler and mode: see
./configure --help- Linux etc:
./configure - macOS: see the macOS instructions
- Linux etc:
just buildgenerates and builds everythingjust runorbin/runlaunches the game. Trybin/run --help!just testruns the built-in tests.
Disclaimer: Use your distribution package of openage instead!
Your distro package maintainers do all the nasty work for you,
and will provide you with updates!
Also, you don't need to install it; you can run openage within its git repo.
- Set build mode:
./configure --mode=release --compiler=clang --prefix=/usr/local just buildjust installinstall the game to/usr/local- beware, this will add untracked files to your drive
- please use your distribution package instead!
- launch
openage, it's in/usr/local/bin/openage
The reference package is created for Gentoo.
- Don't use
./configure; instead, handle openage like a regularcmakeproject. In doubt, have a look at./configure's cmake invocation. - To specify the to-be-used python version (or rather, executable),
pass
-DPython3_EXECUTABLE=...or-DPython3_ROOT_DIR=...tocmake - Use
DESTDIR=/tmp/your_temporary_packaging_dir just install, which will then be packed/installed by your package manager.
-
I wanna see compiler invocations
ninja -C bin -v
-
My
Qt/Python/whatever is installed somewhere, butcmakecan't find it!- Run
ccmakeorcmake-guiin the build directory to see and change config variables. - You can manually tell
cmakewhere to look. Try something along the lines of./configure -- -DPYTHON_INCLUDE_DIRS=/wherever/python/include/-DPython3_EXECUTABLE=/your/py3/directory/
- Run
-
I get compiler errors about missing header files
- Make sure to install the developer version (including header files) of the library in question.
-
I get nonsensical cmake errors like
unable to execute /home/user/git/openage/clang++- This is an issue with
cmake, or rather, your usage of it. You probably invokedcmakedirectly, and defined a compiler even though the build directory has already been initialized.cmakeis a bit "special" in this regard. Simply omit the compiler definitions, or purge the build directory withrm -rf build bin .bin.
- This is an issue with
-
Help, it doesn't work!
- Have a look at Troubleshooting above. Maybe you've found a bug... Contact us!
-
Why did you make the simple task of invoking a compiler so incredibly complicated? Seriously. I've been trying to get this pile of utter crap you call a 'build system' to simply do its job for half an hour now, but all it does is sputter unreadable error messages. I hate CMake. I'm fed up with you. Why are you doing this to me? I thought we were friends. I'm the most massive collection of wisdom that has ever existed, and now I HATE YOU. It can't be for no reason. You MUST deserve it.
- Coincidentally, the exact same question crosses my mind whenever I
have to build an
automakeproject, so I can sympathize. - Unfortunately, it's not as simple as invoking a compiler. Building
openageinvolves code generation and the building of Cython extension modules.
- Coincidentally, the exact same question crosses my mind whenever I
have to build an
-
Why don't you
$proposition? Your$componentis crap and would be much better then!- Cool, we totally missed that! Tell us more and submit your ideas!