Skip to content

Instantly share code, notes, and snippets.

@sebyx07
Last active January 9, 2026 23:39
Show Gist options
  • Select an option

  • Save sebyx07/e14c94a00d3c94deef964fa4c9efe704 to your computer and use it in GitHub Desktop.

Select an option

Save sebyx07/e14c94a00d3c94deef964fa4c9efe704 to your computer and use it in GitHub Desktop.
Complete Guide: C&C Generals Zero Hour on Linux with Wine + DXVK

C&C Generals Zero Hour on Linux (Wine + DXVK)

Complete guide to running Command & Conquer Generals Zero Hour on Linux with optimal performance.

Download

DODI Repack (~1.2 GB): 1337x Torrent

Prerequisites

# Ubuntu/Debian
sudo apt install wine wine32 wine64 winetricks gamemode

# Fedora
sudo dnf install wine winetricks gamemode

# Arch
sudo pacman -S wine winetricks gamemode

Installation

1. Create Wine Prefix (32-bit required)

export WINEPREFIX="$HOME/.wine-generals"
export WINEARCH=win32
wineboot -u

2. Install DXVK

# Download latest DXVK
cd /tmp
wget https://github.com/doitsujin/dxvk/releases/download/v2.5.3/dxvk-2.5.3.tar.gz
tar -xzf dxvk-2.5.3.tar.gz

# Install to prefix
export WINEPREFIX="$HOME/.wine-generals"
cd dxvk-2.5.3
./setup_dxvk.sh install

3. Run Installer

cd ~/Downloads/Generals\ Zero\ Hour\ \[DODI\ Repack\]/
WINEPREFIX="$HOME/.wine-generals" WINEARCH=win32 wine Setup.exe

Install to: C:\Program Files\DODI-Repacks\Generals Zero Hour

Configuration Files

Launch Script (~/Games/launch-generals.sh)

#!/bin/bash
# C&C Generals Zero Hour - DXVK Optimized

export WINEPREFIX="$HOME/.wine-generals"
export WINEARCH=win32

# DXVK settings
export DXVK_CONFIG_FILE="$WINEPREFIX/dxvk.conf"
export DXVK_STATE_CACHE_PATH="$WINEPREFIX/dxvk-cache"
export DXVK_HUD=fps

# AMD GPU optimizations
export RADV_PERFTEST=gpl
export AMD_VULKAN_ICD=RADV
export mesa_glthread=true

# Performance
export WINE_LARGE_ADDRESS_AWARE=1
export WINEDEBUG=-all
export PULSE_LATENCY_MSEC=60

# Game directory
GAME_DIR="$WINEPREFIX/drive_c/Program Files/DODI-Repacks/Generals Zero Hour"

cd "$GAME_DIR"
gamemoderun wine "CnC Zero Hour - Launcher.exe" "$@"
chmod +x ~/Games/launch-generals.sh

DXVK Config (~/.wine-generals/dxvk.conf)

# DXVK configuration for C&C Generals Zero Hour

# Frame latency
d3d9.maxFrameLatency = 1
d3d8.maxFrameLatency = 1

# Disable VSync (game handles it)
d3d9.presentInterval = 0
d3d8.presentInterval = 0

# Shader cache
dxvk.enableStateCache = True
dxvk.enableGraphicsPipelineLibrary = True

# Performance
d3d9.floatEmulation = strict
d3d8.floatEmulation = strict

Game Options (~/Documents/Command and Conquer Generals Zero Hour Data/Options.ini)

AllHealthBars = yes
AntiAliasing = 0
BuildingOcclusion = yes
DynamicLOD = no
ExtraAnimations = yes
Gamma = 50
HeatEffects = yes
IdealStaticGameLOD = High
MaxParticleCount = 5000
MusicVolume = 50
Resolution = 1920 1080
Retaliation = yes
SFX3DVolume = 70
SFXVolume = 70
ScrollFactor = 50
SendDelay = no
ShowSoftWaterEdge = yes
ShowTrees = yes
StaticGameLOD = High
TextureReduction = 0
UseAlternateMouse = yes
UseCloudMap = yes
UseLightMap = yes
UseShadowDecals = yes
UseShadowVolumes = yes
VoiceVolume = 70

Camera Zoom Patch

Download: Modified min and max zoom (ModDB)

# Download and extract
cd /tmp
wget "https://www.moddb.com/downloads/start/98765/all" -O camera-zoom.zip
unzip camera-zoom.zip

# Copy to game folder
cp -r Data ~/.wine-generals/drive_c/Program\ Files/DODI-Repacks/Generals\ Zero\ Hour/

Or create manually - ~/.wine-generals/drive_c/Program Files/DODI-Repacks/Generals Zero Hour/Data/INI/GameData.ini:

GameData
  CameraPitch = 37.5
  CameraYaw = 0.0
  CameraHeight = 350.0
  MaxCameraHeight = 800.0
  MinCameraHeight = 120.0
End

This allows much better zoom out for widescreen monitors (default MaxCameraHeight is only 310).

Desktop Shortcut (~/.local/share/applications/generals-zh.desktop)

[Desktop Entry]
Name=C&C Generals Zero Hour
Comment=Command & Conquer Generals Zero Hour with DXVK
Exec=/home/YOUR_USERNAME/Games/launch-generals.sh
Icon=/home/YOUR_USERNAME/Games/cnc-zh-icon.png
Terminal=false
Type=Application
Categories=Game;StrategyGame;

Troubleshooting

Black Screen on Launch

  • Ensure 32-bit Wine prefix: WINEARCH=win32
  • Check DXVK is installed: look for fps counter

Alt+Tab Crashes

  • Use GenTool borderless mode (press Home key in-game)
  • Or use gamescope: gamescope -f -- ~/Games/launch-generals.sh

No Sound

WINEPREFIX="$HOME/.wine-generals" winetricks sound=pulse

Performance

Expected FPS with DXVK:

  • AMD RX 580: 30fps (game cap) stable
  • Any modern GPU: 30fps stable

The game is capped at 30fps by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment