Sunday, January 23, 2011

How To: Install Doom 3 on Fedora 14 (64-bit)

I have a lot of respect for id software as they are one of the few game developers that have released large budget games with native installers for Linux. Doom 3 was released in 2004 and although the discs only contain a Windows installer, id provided a native Linux installer on their website. The latest version is 1.3.1 build 1304, released 2007 and available here:
ftp://ftp.idsoftware.com/idstuff/doom3/linux/doom3-linux-1.3.1304.x86.run
Unfortunately a 64 bit build was never made but Doom 3 will still run on a 64-bit system providing you have the 32-bit libraries that are required.

This guide will run you through the steps that are needed to install the game on a current Linux distro. I'm using Fedora 14 but the steps should be similar for other systems. You will need root access in order to follow these steps.

Step 1 - Download the required dependencies:

You'll need the following libraries on your system:
  • libX11.so.6
  • libXext.so.6
  • libGL.so.1
  • ld-linux.so.2
In order to find out what package you need to install to get the required file, use yum along with the whatprovides option:
# yum whatprovides libX11.so.6
It will state what package provides the lib file:
libX11-1.3.4-3.fc14.i686 : Core X11 protocol client library
So the next step is to install libX11:
# yum install libX11-1.3.4-3.fc14.i686
Follow this process for the other libraries that are needed:
# yum whatprovides libXext.so.6
Output: libXext-1.1.2-2.fc14.i686 : X.Org X11 libXext runtime library
# yum install libXext-1.1.2-2.fc14.i686
Now for LibGL:
# yum whatprovides libGL.so.1
Output: mesa-libGL-7.9-1.fc14.i686 : Mesa libGL runtime libraries and DRI drivers

So now you install mesa-libGL:
# yum install mesa-libGL-7.9-5.fc14.i686
Then just follow the same procedure for ld-linux
# yum whatprovides ld-linux.so.2
Outputs: glibc-2.12.90-21.i686, so now to install glibc
# yum install glibc-2.12.90-21.i686
Step 2 - Download and run the install file:

Download the install file from id's ftp site using the link provided earlier. The permissions will need to be changed so that the file is executable:
# chmod 644 /path/to/installer/doom3-linux-1.3.1302.x86.run
Now you can run the install file using:
# sh /path/to/installer/doom3-linux-1.3.1302.x86.run
At this point the installer will run through a couple of questions such as where you want to install to. By default Doom 3 installs to: /usr/local/games/doom3

Step 3 - Copy pk4 files from the installation discs:

Now to copy the required 'pk4' files from the install discs. This is the slowest part as it will take a few minutes for each file to be copied over to your hard drive. If you went with the default options during the installation, the files being copied will need to be placed in: /usr/local/games/doom3/base

The files that need to be copied are as follows:

Disc 1:
  • /media/DOOM3_1/Setup/Data/base/pak002.pk4
Disc 2:
  • /media/DOOM3_2/Setup/Data/base/pak000.pk4
  • /media/DOOM3_2/Setup/Data/base/pak001.pk4
Disc 3:
  • /media/DOOM3_3/Setup/Data/base/pak003.pk4
  • /media/DOOM3_3/Setup/Data/base/pak004.pk4

To copy the files use the following commands, changing discs as needed:
# cp /media/DOOM3_1/Setup/Data/base/pak002.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_2/Setup/Data/base/pak000.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_2/Setup/Data/base/pak001.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_3/Setup/Data/base/pak003.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_3/Setup/Data/base/pak004.pk4 /usr/local/games/doom3/base/
If you are also installing the Resurrection of Evil Expansion Pack, you will also need to copy 'd3xp/pak000.pk4' to your d3xp/ directory: /usr/local/games/doom3/d3xp

Once you have copied the files from the discs, listing the contents of the directory will show that the permissions need changing:
ls -l /usr/local/games/doom3/base/
To set them correctly use chmod:
# chmod 644 /usr/local/games/doom3/base/*
Finishing up - Fix audio and resolution problems:

At this point you will have a shortcut in the Aplications menu to run the game but there are some final steps you may need to take. The first problem is that the sound engine in Doom 3 is based on OSS which has been disabled since Fedora 11.

To re-enable OSS you will need to edit /etc/modprobe.d/dist-oss.conf and uncomment the line within the file. Once this is done, reboot so that the changes take effect.

The second issue is the resolution. You may find that you cannot set Doom 3 to use the full native resolution of your monitor. If this is the case then simply edit your DoomConfig.cfg file (Resurrection Of Evil has its own DoomConfig.cfg).
vim .doom3/base/DoomConfig.cfg
The lines you will need to edit are:
seta r_mode "-1"
seta r_customHeight "####"
seta r_customWidth "####"
If r_mode is not set to "-1" the game will ignore your custom settings. (Thanks to hwhq.com for the resolution fix).

That's it! Doom 3 is now ready to go.

If you do have any problems then my advice would be to run Doom 3 with the log file enabled:
/usr/local/games/doom3/doom3 +set developer 1 +set logfile 1
Then to look at the log file use:
tail ~/.doom3/base/qconsole.log
Refer to the Doom 3 GNU/Linux FAQ if you need further information.

No comments: