I recently had a craving to play some of my older Loki games, but I quickly found that games made for Linux distributions from 2001 or so don't work so easily on modern distributions. Here's a quick run down on how to get the SimCity 3000 native Linux port working again.
Be sure to check out my howto for Sid Meier's Alpha Centauri and Kohan: Immortal Sovereigns as well:
You'll need to following files before we get started:
Step 1: Install the game
Insert your game cd and run the following commands, assuming the game is in your first cdrom:
Cancel or press Ctrl-C for the Loki Update and Loki Uninstall setups, then install SimCity 3000 - I installed everything, and I installed to ~/games/SC3U with the symlinks in ~/bin. If you want to install somewhere system wide, you will need to run the install as root with sudo.
linux32 /bin/bash setup.sh
If you see messages like these during the install:
Then you should run the following commands after install to copy over some files that weren't copied. Assuming you installed to ~/games/SC3U:
Unable to find file 'bin/x86/sc3u'
Unable to find file 'bin/x86/lib'
Step 2: Update the game
cp -r /media/cdrom/bin/x86/glibc-2.1 ~/games/SC3U/.
ln -s glibc-2.1/* .
Run the following commands in the directory where you downloaded the game patch and loki_patch to:
Step 3: Install the Loki Compatibility libraries
chmod +x ./sc3u-2.0a-x86.run
_POSIX2_VERSION=199209 ./sc3u-2.0a-x86.run --keep
cp ../../../../loki_patch .
Extract the loki_compat_libs-1.3.tar.bz2 file somewhere - I put it in ~/games/ since I planned to use them for more than one game, and my games are installed in sub directories there.
Step 4: Running the game
tar xvjf /path/to/downloaded/loki_compat_lib-1.3.tar.bz2
You can now run the game by changing to the game's directory, and running the following command:
Step 5: Running the game via a script
LD_LIBRARY_PATH=../Loki_Compat/ SDL_AUDIODRIVER="dsp" SDL_PATH_DSP="/dev/dsp" ../Loki_Compat/ld-linux.so.2 ./sc3u.dynamic
You can automate starting the game by creating the following script in your game directory. I named mine runsc3u.sh:
Remember, if you have Loki_Compat installed somewhere else, you'll need to update the last command of the script.
# A simple shell script to launch SimCity 3000 on a modern Linux distribution
# Step through symlinks to find where the script really is
while [ -L $SCRIPTLOC ]; do
# Get the directory the script is in, then change to it
# Run the game
LD_LIBRARY_PATH=../Loki_Compat/ SDL_AUDIODRIVER="dsp" SDL_PATH_DSP="/dev/dsp" ../Loki_Compat/ld-linux.so.2 ./sc3u.dynamic $*
You should also symlink runsc3u.sh into your PATH somewhere - ~/bin is in my PATH, so I created a symlink there.
Ready to play!
You should now be all set to play by running 'runsc3u.sh'. You may want to create a new entry in your menu to launch this, which you can do under System->Preferences->Menu Editor. You can find an icon to use attached to this post.
Have fun, let me know if you run into any problems following this tutorial.