Building the project
This file should assist you in compiling and running the game.
openage consists of a pure C++ library,
libopenage, and the
openage python package.
CMake for all our building needs.
CMake with an optional
configure wrapper script.
You can build the project like a regular
For more build system internals, see doc/buildsystem.md.
Dependencies are needed for:
- C = compiling
- R = running
- A = asset conversion
- S = sanity checks (make checkall)
C gcc >=7 or clang >=4 CRA python >=3.4 C cython >=0.25 C cmake >=3.1.0 A numpy A python imaging library (PIL) -> pillow CR opengl >=2.1 CR libepoxy CR libpng R dejavu font CR freetype2 CR fontconfig CR harfbuzz >= 1.0.0 CR nyan (https://github.com/SFTtech/nyan) C jinja2 CR sdl2 CR sdl2_image CR opusfile CRA libopus CRA libogg S pycodestyle (or pep8 (deprecated)) C pygments S pylint CR qt5 >=5.5 (Core, Quick, QuickControls modules) A An installed version of any of the following (wine is your friend). Other versions _might_ work; setup disk support will be added soon: - Age of Empires II: The Conquerors Patch 1.0c - Age of Empires II: Forgotten Empires - Age of Empires II HD
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:
- Ubuntu (>= 18.04)
- Debian Unstable
- Fedora (>= 27)
- openSUSE 13.2
- openSUSE Tumbleweed
- Mac OS X 10.10 Yosemite
- Arch Linux
- Microsoft Windows 10
openage depends on
nyan, which is the
engine configuration language.
nyancan be built and used without installation (-> no "
make install"). Just clone the repo somewhere and follow the
nyanautomatically. This is activated with
./configure --download-nyan ...or
cmake -DDOWNLOAD_NYAN=YES ....
nyan when packaging it. You don't need to clobber your
cmake looks for
nyan in the user package registry
~/.cmake/packages/nyan/) and the system package registry
nyan cannot be found but you know where it is, you can hint the
location of the
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
- Linux etc:
./configure --mode=release --compiler=gcc
- Linux etc:
makegenerates and builds everything
./runlaunches the game. Try
make testruns the built-in tests.
Disclaimer: Use your distribution package of
Your distro package maintainers do all the nasty work for you,
and will provide you with updates!
- Set build mode:
./configure --mode=release --compiler=clang --prefix=/usr/local
make installinstall the game to
- beware, this will add untracked files to your drive
- please use your distribution package instead!
openage, it's in
- Don't use
./configure; instead, handle openage like a regular
cmakeproject. In doubt, have a look at
./configure's cmake invocation.
make install DESTDIR=/tmp/your_temporary_packaging_dir, which will then be packed/installed by your package manager.
I wanna see compiler invocations
PythonInterp/whatever is installed somewhere, but
cmakecan't find it!
cmake-guiin the build directory to see and change config variables.
- You can manually tell
cmakewhere to look. Try something along the lines of
./configure -- -DSDL2IMAGE_INCLUDE_DIRS=/whereever/sdl2_image/include/
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 invoked
cmakedirectly, 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 with
rm -rf build bin .bin.
- This is an issue with
Help, it doesn't work!
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.
- See buildsystem/simple, which does exactly these things, manually (don't use this for production).
- Coincidentally, the exact same question crosses my mind whenever I have to build an
Why don't you
$componentis crap and would be much better then!