Information in here might be outdated, please inform us under this comment about any changes that need to be made to this instructions, so we can update it accordingly.
- First you will need
i. CMake (to generate build files)
ii. A C/C++ compiler (Visual C++ for now. GNU GCC and other options will be expanded according to user feedbacks). For Lightweight development in Visual Studio Code you’ll need Cmake, python and C/C++ plugin. It is probably the most easiest way to get IDE working for openage. It is much easier to switch between Python and C++ compared to Visual Studio.
iii. Python (3.6.x-3.7.x).
- Now you’ll need necessary components for building openage with C++.
For C++ you’ll need:
dirent, eigen3, fontconfig, freetype, harfbuzz, libepoxy, libogg, libpng, opus, opusfile, qt5-base, qt5-declarative, qt5-quickcontrols, sdl2, sdl2-image.
You can use vcpkg for that and it makes the process fairly easier to get location to the necessary libraries and include files. (You can suggest other options if want to. Post will be updated accordingly like said.)
i. This can be done by using vcpkg. vcpkg should be fairly straightforward to build.
ii. After setting vcpkg up then simply run:
vcpkg install dirent eigen3 fontconfig freetype harfbuzz libepoxy libogg libpng opus opusfile qt5-base qt5-declarative qt5-quickcontrols sdl2 sdl2-image
iii. You’ll also win flex-bison and can be downloaded from here.
iv. Additional notes:
a. In vcpkg try to set directory like d:/vcpkg or d:/dependencies/vcpkg, etc. Make sure not to give a space. Otherwise you’ll run into annoying issues.
- You’ll also need python dependencies as well and this might(often) gets complex for Windows users. So pay extra caution.
When installing on Python:
Select the “pip” option enabled. We use pip to install other dependencies,
i. “Precompile standard library” option enabled.
ii. With the “Download debug binaries (…)” option enabled, If in doubt, run the installer again and choose “Modify”.
iii. You are going to need the 64-bit version of python if you are planning to build the 64-bit version of openage, and vice versa.
iv. After everything complete go to
<your python directory>/Scriptsand open command line there or just run command line if you set the PATH to python directory. Install python packages using following command
pip install cython numpy pillow pygments pyreadline Jinja2
v. Additional notes:
a. If you have multiple versions of Python installed then check your pre-existing Python version and the version you are about to install will start conflict. If you messed up your python uninstall and install all versions of Python and check the PATH in environment variables in system settings.
- First fork the repo from here to your Github account.
- Clone the repo using the following comman command code
git clone https://github.com/<your username>/openage.git
- Make a new folder there called build. Can be done
mkdir buildcommand while you are in the command prompt in the openage directory. Type another command
cd buildto go in the build folder.
- Now type command
cmake -DDOWNLOAD_NYAN=YES -DFLEX_EXECUTABLE="<path to win_flex.exe directory>\win_flex.exe" -DCMAKE_TOOLCHAIN_FILE="<path to vcpkg directory>\scripts\buildsystems\vcpkg.cmake" ..
This process downloads nyan automatically. But you can download and build nyan on your own way if want to. You can also add variable like to use the corresponding Visual Studio version like
-G "Visual Studio 15 2017 Win64"or for 2019
-G "Visual Studio 16 2019" -A "x64".
- You can use setup CMake in several ways.
- Use terminal command
cmake --build . --config RelWithDebInfo -- /nologo /m /v:mto build the project finally and everything should go fine.
- Use cmake-gui. Set
CMAKE_INSTALL_PREFIXto your repository folder then press configure. Everytime you configure settings you may face several errors. You can solve your problem easily through this process. Here is an example of working repository:
In future simple
cmake --build .command should do the building job easily or simply build from your projects.
This process isn’t documenting other important stuffs like getting output files working. Those steps are still WIP. This process is fairly simple in other platforms for now but not in Windows unfortunately. So beware and recommend test stuffs around yourself. Here it’s giving a semi-working steps to somehow getting things working:
- Install the DejaVu Book Font.
- Download and extract the latest
ttf/DejaVuSerif*.ttffont files to
- Set the
FONTCONFIG_PATHenvironment variable to
<vcpkg directory>\installed\<relevant config>\tools\fontconfig\fonts\.
- [Optional] Set the
AGE2DIRenvironment variable to the AoE 2 installation directory.
<vcpkg directory>\installed\<relevant config>\qmlor for prebuilt Qt
- Append the following to the environment
<openage directory>\build\libopenage\<config built>(for
- Path to
nyan.dll(depends on the procedure chosen to get nyan)
<vcpkg directory>\installed\<relevant config>\bin
<QT5 directory>\bin(if prebuilt QT5 was installed)
- Now, execute
<openage directory>/run.exeand enjoy!
Additional information you’ll find directly in the repository: