Compiling on Linux: Difference between revisions
en>Admin No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
Install cmake, latest version. In general, those included by default in the system packages are not suitable as they tend to be outdated. | Install cmake, latest version. In general, those included by default in the system packages are not suitable as they tend to be outdated. | ||
In case you need to install it on a command line environment, you may also install it with [https://github.com/miurahr/aqtinstall aqt a CLI installer of Qt] | |||
==Compilation Setup== | ==Compilation Setup== | ||
Line 35: | Line 37: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The game will be compiled and installed on the system | The game will be compiled and installed on the system | ||
==Compiling with a custom version of cmake== | |||
You may also pass a custom version of cmake that is not installed on the system, but located in another folder for instance: | |||
<syntaxhighlight lang="bash"> | |||
/home/username/Qt/Tools/CMake/bin/cmake -B build -DCMAKE_PREFIX_PATH="/home/username/Qt/6.4.2/gcc_64/lib/cmake" -DOPENSSL_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu -DOPENSSL_SSL_LIBRARY=/usr/lib/x86_64-linux-gnu/libssl.so.1.1 -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 -DCMAKE_BUILD_TYPE=Debug | |||
</syntaxhighlight> | |||
This will generate a debug build, that outputs extra information, useful to find issues with the compilation or dependencies specific to Linux, causing errors. | |||
==Reporting issues== | ==Reporting issues== | ||
As of now, the issues can be directly reported through the github [https://github.com/Robosturm/Commander_Wars/issues Issues Page] open one up, in case there are glitches or bugs found. | As of now, the issues can be directly reported through the github [https://github.com/Robosturm/Commander_Wars/issues Issues Page] open one up, in case there are glitches or bugs found. | ||
[[Category:Technical]] | [[Category:Technical]] |
Latest revision as of 22:16, 18 October 2023
This compilation guide has been tested with Fedora 35 and Ubuntu 21.10
Setting up the environment
Download and install QT from here QT Installer
Make sure to install the Multimedia components under 'Additional Libraries' in the installer. As of February 2022, there is an Audio Glitch, specific to QT 6.2.2 and bellow, so in order to make Audio work properly, you will have to install 6.2.3 and above.
Once installed, modify your ~/.bashrc to include the following:
LD_LIBRARY_PATH=/home/username/Qt/6.2.3/gcc_64/lib:$LD_LIBRARY_PATH
Modify it so that it matches your installation of Qt
Install cmake, latest version. In general, those included by default in the system packages are not suitable as they tend to be outdated.
In case you need to install it on a command line environment, you may also install it with aqt a CLI installer of Qt
Compilation Setup
git clone the source from the master branch Install the latest version of Vulkan for your distribution. Modify the CMakeLists.txt file, to include the following, such that you change it to match your installation directories:
set(Qt6_DIR "/home/username/Qt/6.2.3/gcc_64/lib/cmake/Qt6")
set(XDG_RUNTIME_DIR "/run/user/1000")
set(XKB_INCLUDE_DIR "/usr/include/xcb")
set(XKB_LIBRARY "/usr/lib/x86_64-linux-gnu/")
set(Vulkan_INCLUDE_DIR "/usr/lib/x86_64-linux-gnu/")
Compiling with CMake
Finally run
cmake .
make
sudo make install
The game will be compiled and installed on the system
Compiling with a custom version of cmake
You may also pass a custom version of cmake that is not installed on the system, but located in another folder for instance:
/home/username/Qt/Tools/CMake/bin/cmake -B build -DCMAKE_PREFIX_PATH="/home/username/Qt/6.4.2/gcc_64/lib/cmake" -DOPENSSL_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu -DOPENSSL_SSL_LIBRARY=/usr/lib/x86_64-linux-gnu/libssl.so.1.1 -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 -DCMAKE_BUILD_TYPE=Debug
This will generate a debug build, that outputs extra information, useful to find issues with the compilation or dependencies specific to Linux, causing errors.
Reporting issues
As of now, the issues can be directly reported through the github Issues Page open one up, in case there are glitches or bugs found.