Command and Conquer: Generals - Zero Hour (Linux focused development fork)
C++
154
507 commits
updated Aug 18, 2026
This repository includes source code for Command & Conquer Generals, and its expansion pack Zero Hour.
It contains adjustments to allow building with modern toolchains, on a wider variety of systems. As such it has been tested on Windows x86, Windows x64, Linux x64 and Linux ARM64.
Focus of the repository is on allowing the game to operate smoothly on Linux-based setups.
The main focus of this repository is NOT backwards compatibility, but feature development, as well as bug fixing.
Cross-play between 64-bit versions of this fork is also a goal. Toolings, such as the WorldBuilder or other build tools are not the focus of this repository.
Patches aside from the focus are still appreciated, but issue reports regarding those, might be left open.
What's working:
What's not working:
To run the game, you need to have the original game files. You can use them from a CD installation or use the Steam version.
LD_LIBRARY_PATH environment variable. This is required for the game to find its shared libraries, such as DXVK or SDL3. (libdxvk_d3d8.so needs to be loadable)
cd [folder-with-RTS-executable]
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/lib
cd [folder-with-game-files] # e.g. ~/.steam/steam/steamapps/common/Command & Conquer Generals - Zero Hour
[path-to-executable]/RTS -win
Omit the -win flag to run the game in fullscreen mode.
To build this project on a Debian or Ubuntu machine, install the following dependencies:
Install the required build tools and libraries by running the following commands:
sudo apt install nasm autoconf automake libtool pkg-config libltdl-dev
sudo apt install ninja-build
sudo apt install python3-jinja2
Make sure to install VCPKG, if you haven't already.
cd [your-workspace]
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
export VCPKG_ROOT=$(pwd)
./bootstrap-vcpkg.sh
export PATH="$PATH:$VCPKG_ROOT"
Make sure to export the PATH variable, each time you need to run vcpkg. This is usually only required during the configuration via CMake.
To use the compiled binaries, you must own the game. The C&C Ultimate Collection is available for purchase on EA App or Steam.
To compile the source code, follow these steps:
git clone https://github.com/Fighter19/CnC_Generals_Zero_Hour.git
cd CnC_Generals_Zero_Hour
From here on, you can use either VSCode with the CMake extension, or the command line.
mkdir build
cd build
cmake --preset=default -DVCPKG_INSTALL_OPTIONS="--allow-unsupported" -DSAGE_USE_SDL3=ON ../
cmake --build . --config Release
You can use the --preset flag to specify a preset defined in the CMakePresets.json file. On our CI we build the Linux package with linux64-deploy and the Windows package with win32-deploy.
Building with Visual Studio Code is straight-forward. Opening the project with the C++ Extension Pack installed, should automatically execute vcpkg to install the dependencies. You can then use the CMake extension to build the project.
This repository is currently accepting contributions (pull requests, issues, etc).
This repository and its contents are licensed under the GPL v3 license, with additional terms applied. Please see LICENSE.md for details.
32 followers · starred Mar 2025
60 followers · starred Apr 2025
C++
96.9%
C
3.0%
Command and Conquer: Generals - Zero Hour (Linux focused development fork)
C++
154
507 commits
updated Aug 18, 2026
This repository includes source code for Command & Conquer Generals, and its expansion pack Zero Hour.
It contains adjustments to allow building with modern toolchains, on a wider variety of systems. As such it has been tested on Windows x86, Windows x64, Linux x64 and Linux ARM64.
Focus of the repository is on allowing the game to operate smoothly on Linux-based setups.
The main focus of this repository is NOT backwards compatibility, but feature development, as well as bug fixing.
Cross-play between 64-bit versions of this fork is also a goal. Toolings, such as the WorldBuilder or other build tools are not the focus of this repository.
Patches aside from the focus are still appreciated, but issue reports regarding those, might be left open.
What's working:
What's not working:
To run the game, you need to have the original game files. You can use them from a CD installation or use the Steam version.
LD_LIBRARY_PATH environment variable. This is required for the game to find its shared libraries, such as DXVK or SDL3. (libdxvk_d3d8.so needs to be loadable)
cd [folder-with-RTS-executable]
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/lib
cd [folder-with-game-files] # e.g. ~/.steam/steam/steamapps/common/Command & Conquer Generals - Zero Hour
[path-to-executable]/RTS -win
Omit the -win flag to run the game in fullscreen mode.
To build this project on a Debian or Ubuntu machine, install the following dependencies:
Install the required build tools and libraries by running the following commands:
sudo apt install nasm autoconf automake libtool pkg-config libltdl-dev
sudo apt install ninja-build
sudo apt install python3-jinja2
Make sure to install VCPKG, if you haven't already.
cd [your-workspace]
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
export VCPKG_ROOT=$(pwd)
./bootstrap-vcpkg.sh
export PATH="$PATH:$VCPKG_ROOT"
Make sure to export the PATH variable, each time you need to run vcpkg. This is usually only required during the configuration via CMake.
To use the compiled binaries, you must own the game. The C&C Ultimate Collection is available for purchase on EA App or Steam.
To compile the source code, follow these steps:
git clone https://github.com/Fighter19/CnC_Generals_Zero_Hour.git
cd CnC_Generals_Zero_Hour
From here on, you can use either VSCode with the CMake extension, or the command line.
mkdir build
cd build
cmake --preset=default -DVCPKG_INSTALL_OPTIONS="--allow-unsupported" -DSAGE_USE_SDL3=ON ../
cmake --build . --config Release
You can use the --preset flag to specify a preset defined in the CMakePresets.json file. On our CI we build the Linux package with linux64-deploy and the Windows package with win32-deploy.
Building with Visual Studio Code is straight-forward. Opening the project with the C++ Extension Pack installed, should automatically execute vcpkg to install the dependencies. You can then use the CMake extension to build the project.
This repository is currently accepting contributions (pull requests, issues, etc).
This repository and its contents are licensed under the GPL v3 license, with additional terms applied. Please see LICENSE.md for details.
32 followers · starred Mar 2025
60 followers · starred Apr 2025
C++
96.9%
C
3.0%