This guide is now out of date. An updated post is now available.
For a long time, if you wanted to play Civilization 4 on Linux your only option was to buy Cedega. This was because Wine was lacking DirectX 9 support. Now that Wine is up to the task, you can play Civilization 4 on Linux without purchasing Cedega. In this special jumbo-sized blog post, I will tell you how I set up Civilization 4 on Ubuntu 7.04 with wine-0.9.38, but it should work on any distribution. I have not tried this with the Warlords expansion pack. This guide is targeted at Linux users with some experience with the terminal and with Wine and winecfg. Click the read more link to continue.
1. Get the pieces together:
- Copy your two Civ4 CDs to your wine directory (/home/user/.wine). I put the first CD in a folder called civ4disk1 and the second in civ4disk2.
- Download the Civ4 1.52 patch. I downloaded it from here. This is the latest patch that will work well in Wine.
- Download a Civ4 1.52 no-CD cracked executable. We need this because Wine does not yet support the anti-piracy technology in the executable. Make sure you get the executable for the 1.52 patched version of Civ4 that we are using.
- Download the DLLs that are needed. Get d3dx9_26.dll and msxml3.dll.
2. Start installing:
- Open a terminal and navigate to your directory for the first Civ4 CD.
- Run the installer with wine setup.exe.
- If you see a DirectX installer click cancel on it.
- I unchecked the Windows Firewall Exception box and checked install for all users.
- The installer found the other directory with the other CD by itself.
- Continue once the install is finished.
3. Install the patch:
- Run the patch updater that you downloaded with wine civ4patch1.52.exe.
- Let it install the patch.
- Once it is done, the updater will crash. Press control-C in the terminal window to kill it and close the error message.
4. Add the no-CD executable
- Go to your new Civ4 directory (/home/user/.wine/drive_c/Program Files/Firaxis Games/Sid Meier’s Civilization 4).
- Rename your Civilization4.exe to Civilization4.exe.bak to back it up.
- Move the no-CD executable into the Civ4 directory and make sure its filename is the same as the original executable.
5. Add the native DLLs
- Move the d3dx9_26.dll and msxml3.dll files that you downloaded to your fake Windows directory’s system32 directory (/home/user/.wine/drive_c/windows/system32/).
- If these files are already present, rename the old ones to something else so they are not overwritten.
- At this point I rebooted to make sure the updater that crashed was really killed.
7. Setting up winecfg
- Run winecfg on the terminal.
- Add Civilization4.exe to winecfg so you can configure settings for when it is run.
- With the Civ4 executable selected in winecfg, make the rest of these changes.
- Use the native d3dx9_26.dll and msxml3.dll. (See picture at bottom of post.)
- Vertex shader: None.
- Don’t allow pixel shader.
- Turn off emulating a virtual desktop.
- Use full ALSA acceleration.
8. Run Civ4 for the first time
- At this point you should be able to run Civ4 with wine Civilization4.exe.
- Run it and exit.
- Now the configuration file has been created.
9. Edit the configuation file
- Find your CivilizationIV.ini file. It should be somewhere in /home/user/My Games/.
- Open it in a text editor and make these changes.
- Change EnableVoice = 1 to EnableVoice = 0. This increases sound quality in the game.
- Change ScreenHeight and ScreenWidth to the resolution you want to play at.
- Save the file.
You are done at last! Civilization IV should run with a simple wine Civilization4.exe command on the terminal when you are in the Civ4 directory.
There are a few minor issues, but the game is still perfectly playable.
- In-game movies don’t play well.
- Globe view is messed up.
- Progress bars for cities on the map view don’t work.
- Some trees seem sunken into the ground. This problem is more serious for jungle.
- Cows and pigs don’t show up. You may want to play with the resource indicators on.
- You can’t play online because the latest patch does not work in Wine.
Feel free to leave a comment if you have a question or problem.