I now attend Texas State University and have since found myself with a GNU/Linux account as a lowly user. As such, I cannot utilize package managers –rpm in this case– in the normal sense, and most of my desired packages weren’t configured to be relocatable to a spot like the home directory. This left me in a pickle, because the software that was present varied from very old to old. Linux kernel 2.6.18, CentOS 5, Firefox 3.x, OpenOffice 2.x, etc. This post will document how I came to install prboom and DOSBox with full sound, music, and network support. But why? Because as a commuter, I find myself with an amount of time between two classes that is long enough to start homework, but typically not long enough to finish.
While this process worked for me, it is perfectly possible that your situation may find yourself lacking other critical packages that cannot be so easily recompiled to work from a home directory. YMMV.
The single most important piece of software is the Simple Directmedia Layer. Specifically, there are four components we will need:
- SDL — The main component
- SDL_mixer — A support component that enables mixing
- Timidity — a collection of files needed for music in prboom
- SDL_net — A support component that enables networking of games
- SDL_sound — A support component that handles decoding of various audio streams
Installing SDL was a relatively simple matter:
cd ~ mkdir sdl wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz tar -xzvf SDL-1.2.14.tar.gz cd SDL-1.2.14 ./configure --prefix=/home/preston/sdl make make install
Be wary though. Your environment may necessitate the compiling of other software.
Prboom makes use of timidity to run the midis that make up it’s music. So get yourself a copy:
cd ~ wget http://www.libsdl.org/projects/SDL_mixer/timidity/timidity.tar.gz tar -xzvf timidity.tar.gz
And now to obtain SDL_mixer:
cd ~ wget http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.11.tar.gz tar -xzvf SDL_mixer-1.2.11.tar.gz
Prboom looks for the timidity instrument files (the stuff that actually processes the midi’s and such that make up prboom’s music) in a static location. However, this location is not actually specified by prboom itself. Prboom grabs this location from the configuration of SDL_mixer. By default, this path is set by SDL_mixer as /etc/timidity. Obviously, I won’t have access to this directory as a user. I couldn’t find a flag to throw to the configure line to fix this –though that’s not to say it doesn’t exist– and so I decided to hardcode it myself. I found the file that had the setting by running a
grep -i -r '/etc/timidity' .
inside my home directory. This led to me the file below:
./timidity/config.h (where . is the SDL_mixer folder itslef)
#if defined(__WIN32__) || defined(__OS2__) #define DEFAULT_PATH "C:\\TIMIDITY" #else #define DEFAULT_PATH "/etc/timidity" #define DEFAULT_PATH1 "/usr/share/timidity" #define DEFAULT_PATH2 "/usr/local/lib/timidity" #endif
I changed it to the following:
#if defined(__WIN32__) || defined(__OS2__) #define DEFAULT_PATH "C:\\TIMIDITY" #else #define DEFAULT_PATH "/PATH/TO/YOUR/TIMIDITY/FOLDER" #define DEFAULT_PATH1 "/usr/share/timidity" #define DEFAULT_PATH2 "/usr/local/lib/timidity" #endif
I then proceeded to install SDL_mixer:
cd ~/SDL_mixer* ./configure --prefix=/home/preston/sdl make make install
No messiness here, just download, extract, and compile.
cd ~ wget http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.7.tar.gz tar -xzvf SDL_net-1.2.7.tar.gz cd SDL_net* ./configure --prefix=/home/preston/sdl make make install
No fuss here either. Same drill.
cd ~ wget http://icculus.org/SDL_sound/downloads/SDL_sound-1.0.3.tar.gz tar -xzvf SDL_sound-1.0.3.tar.gz cd SDL_sound-1.0.3 ./configure --prefix=/home/preston/sdl make make install
With all the preliminaries in place, installing prboom isn’t too difficult, so long as you pass the right arguments to configure:
cd ~ wget http://downloads.sourceforge.net/project/prboom/prboom%20stable/2.5.0/prboom-2.5.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fprboom%2Ffiles%2Fprboom%2520stable%2F2.5.0%2F&ts=1315801170&use_mirror=softlayer tar -xzvf prboom-2.5.0* mkdir prboom [I make a separate folder for the binaries. Force of habit.] cd prboom-2.5.0 ./configure --prefix=/home/preston/prboom --with-waddir=/home/preston/prboom --with-sdl-prefix=/home/preston/sdl/lib --with-sdl-exec-prefix=/home/preston/sdl make make install
Once you have a WAD file (the file that contains most of the game; a search for “DOOM WAD file” on google will suffice to find you one) you can run the game with the following command:
prboom -iwad DOOM1.WAD [if the WAD is elsewhere, use an appropriate path to it]
Equally painless at this point:
cd ~ wget http://downloads.sourceforge.net/project/dosbox/dosbox/0.74/dosbox-0.74.tar.gz?r=http%3A%2F%2Fwww.dosbox.com%2Fdownload.php%3Fmain%3D1&ts=1315801356&use_mirror=softlayer tar -xzvf dosbox* mkdir dosbox [I make a separate folder for the binaries. Force of habit.] cd dosbox-0.74 ./configure --prefix=/home/preston/dosbox --with-sdl-prefix=/home/preston/sdl make make install
And you’re done! You can play TONS of games, so long as DOSBox can handle them. Happy fragging in the CS Labs 😉