BUILD.md 2.7 KB

V-Gears V-Gears Building Guide

Install dependencies

If you are runind Debian (or derivates), you can install the required dependencies by running as root

apt install g++ cmake libqt5widgets5 qtbase5-dev zlib1g-dev libarchive-dev libogre-1.12-dev libois-dev libvorbis-dev libboost-dev libboost-program-options-dev libboost-test-dev libboost-filesystem-dev libboost-thread-dev libopenal-dev libtinyxml-dev libluajit-5.1-dev

Deterministic fallbacks

The CMake scripts include an option USE_DETERMINISTIC_FALLBACKS (default ON).

  • When ON, CMake will attempt pragmatic fallbacks to find libraries when find_package/pkg-config do not succeed (SONAME find_library passes, appending common /usr/lib paths, or injecting generic -lboost_* flags).
  • When OFF, CMake will not perform these fallbacks; instead require proper dev packages or explicit hints (recommended for CI and packaging).

Disable fallbacks example:

cmake .. -DUSE_DETERMINISTIC_FALLBACKS=OFF -DCMAKE_BUILD_TYPE=Release

If you see warnings about missing Boost or OgreBites, prefer installing the appropriate -dev packages listed above, or point CMake at your OGRE/Boost installation with -DOGRE_ROOT=... and -DBoost_DIR=.../-DBoost_LIBRARY_DIRS.

Build using CMake

From the project directory, run these commands:

mkdir build;
cd build;
cmake ../;
make;

If you want to speed it up a bit (it can take several minutes, depending on your system), you can add the parameter -j to make to use multiple threads. For instance, make -j3 will use three cores for the compilation.

Once the build process finishes, you u sholh have the following files (from the project directory):

  • build/bin/v-gears, the engine executable.
  • build/bin/v-gears-installer, the data installer.

The engine must be launched from the installation directory (the installer starts it from there for you), so before trying to run it, keep reading.

Run the tests (optional)

The tests are not built by default. To build and run the tests of the installer logic (the option rules, the installation layout, the verifier, the log and the tool finder), which don't need the rest of the engine:

mkdir build-tests;
cd build-tests;
cmake ../ -DBUILD_TESTS=ON;
make v-gears-installer-tests;
./bin/v-gears-installer-tests

Optional programs

To convert the sound effects and the music, the installer uses FFmpeg and TiMidity. They are not needed to build V-Gears, only to install the data. See the data installation guide.

Next steps