Install Zandronum on Ubuntu: Difference between revisions

From Zandronum Wiki
No edit summary
(Newer versions of Ubuntu have deprecated apt-key in favor of using the trusted.gpg.d keyring directory. Any repos that use the old apt-key store now cause errors when running apt update.)
 
Line 5: Line 5:
* Add the DRDTeam's Debian package repository and apply the GPG key:
* Add the DRDTeam's Debian package repository and apply the GPG key:
  sudo apt-add-repository 'deb <nowiki>http://debian.drdteam.org/</nowiki> stable multiverse'
  sudo apt-add-repository 'deb <nowiki>http://debian.drdteam.org/</nowiki> stable multiverse'
  wget -O - <nowiki>http://debian.drdteam.org/drdteam.gpg</nowiki> | sudo apt-key add -
  sudo wget -O /etc/apt/trusted.gpg.d/drdteam.gpg <nowiki>http://debian.drdteam.org/drdteam.gpg</nowiki>
* Now update the package index by typing:
* Now update the package index by typing:
  sudo apt-get update
  sudo apt-get update

Latest revision as of 21:09, 2 October 2024

Installation with packages

This guide will help Ubuntu users to install Zandronum on their systems. Additionally, this will also include the Doomseeker game server browser. With Doomseeker installed, this will allow the user to quickly connect to an abundance of Zandronum servers.

  • Open the terminal.
  • Add the DRDTeam's Debian package repository and apply the GPG key:
sudo apt-add-repository 'deb http://debian.drdteam.org/ stable multiverse'
sudo wget -O /etc/apt/trusted.gpg.d/drdteam.gpg http://debian.drdteam.org/drdteam.gpg
  • Now update the package index by typing:
sudo apt-get update
  • Type the following command to install Zandronum:
sudo apt-get install zandronum
  • To install Doomseeker for Zandronum:
sudo apt-get install doomseeker-zandronum
  • To be sure that Zandronum was installed within the system, type the following:
zandronum
  • (OPTIONAL) Import all of the IWADs to the .zandronum directory. The IWAD files can be imported within the same exact directory as 'zandronum' binary. To avoid duplications, depending on how the user organizes their filesystem or scenarios, the user can use Zandronum's IWAD search window to locate the IWAD(s). However, if the latter is not plausible for whatever reason, it is possible to manually input where to find the IWAD files within the initialization file. More details regarding this method described here.
  • And that's it! Zandronum has successfully been installed within the system!

Uninstallation

Run the following to remove Zandronum from the system:

sudo apt-get --purge remove zandronum
sudo apt-get --purge remove doomseeker-zandronum
sudo apt-get autoremove

Manual installation

1. Download the Linux base, and the version for your specific architecture.

2. Extract both of those zip files to the same folder, it can be any folder. For me, it's /home/<username>/. If you put it in a place that requires root privileges, you will need to get root access before you add wads to the directory or change anything.

You can also put your IWADs anywhere, just be sure to remember where they are. I recommend /home/<username>/zandronum/iwads/ You could even separate your PWADs; Doomseeker is very flexible, and you'll be running Zandronum with shell commands, so it doesn't matter. You could even categorize your wads by game mode if you wanted.

3. Run Zandronum (to test it)

Command (if in the zandronum directory): ./zandronum

Manual installation (alternative)

Open a terminal and copy and paste the whole code box for each step.

In your user home directory, create zandronum_local/zandronum directories:

mkdir -pv ~/zandronum_local/zandronum

Download the latest version of Zandronum 32-bit or 64-bit and extract files to ~/zandronum_local/zandronum directory:

cd ~/zandronum_local &&
v="$(wget -q -O - http://zandronum.com/download |
sed -n 's/.*The latest version is <strong>\(.*\)<\/strong>.*/\1/p')" &&
if [ "$(uname -m)" = x86_64 ]; then
    z="zandronum"$v"-linux-x86_64.tar.bz2"
else
    z="zandronum"$v"-linux-x86.tar.bz2"
fi &&
wget -nc http://zandronum.com/downloads/"$z" &&
tar -xjvf "$z" -C zandronum

Download FMOD 4.24.16 32-bit or 64-bit and extract libfmodex64-4.24.16.so or libfmodex-4.24.16.so to ~/zandronum_local/zandronum directory:

a='' && [ "$(uname -m)" = x86_64 ] && a=64
cd ~/zandronum_local &&
wget -nc http://zandronum.com/essentials/fmod/fmodapi42416linux"$a".tar.gz &&
tar -xvzf fmodapi42416linux"$a".tar.gz -C zandronum --strip-components=3 \
--show-transformed-names fmodapi42416linux"$a"/api/lib/libfmodex"$a"-4.24.16.so

Continue to Local or System-wide installation

Local installation

In your user home directory, create zandronum script:

printf %s "\
#!/bin/sh
export LD_LIBRARY_PATH=~/zandronum_local/zandronum
exec ~/zandronum_local/zandronum/zandronum \"\$@\"
" > ~/zandronum &&
chmod 755 ~/zandronum

In your user home directory, create zandronum-server script:

printf %s "\
#!/bin/sh
exec ~/zandronum_local/zandronum/zandronum-server \"\$@\"
" > ~/zandronum-server &&
chmod 755 ~/zandronum-server

Now from a terminal you should be able to run ~/zandronum or ~/zandronum-server only from your user account.

System-wide installation

Create /usr/games/zandronum directory:

sudo mkdir -pv /usr/games/zandronum

Copy all files from ~/zandronum_local/zandronum directory to /usr/games/zandronum/:

cd ~/zandronum_local/zandronum &&
sudo cp -v * /usr/games/zandronum/

Create zandronum script:

printf %s "\
#!/bin/sh
export LD_LIBRARY_PATH=/usr/games/zandronum
exec /usr/games/zandronum/zandronum \"\$@\"
" > zandronum.sh &&
chmod 755 zandronum.sh &&
sudo mv -v zandronum.sh /usr/bin/zandronum

Create zandronum-server script:

printf %s "\
#!/bin/sh
exec /usr/games/zandronum/zandronum-server \"\$@\"
" > zandronum-server.sh &&
chmod 755 zandronum-server.sh &&
sudo mv -v zandronum-server.sh /usr/bin/zandronum-server

Now from a terminal you should be able to run zandronum or zandronum-server from any user account.

Remove system-wide installation

Remove /usr/games/zandronum directory and all its files:

sudo rm -rfv /usr/games/zandronum

Remove zandronum script:

sudo rm -fv /usr/bin/zandronum

Remove zandronum-server script:

sudo rm -fv /usr/bin/zandronum-server

Troubleshooting

If you received the error : "zandronum: error while loading shared libraries: libsnes_spc.so: cannot open shared object file: No such file or directory" :

All you need to do is copy this .so file from the zandronum directory to /usr/lib/:

sudo cp libsnes_spc.so /usr/lib

If you receive an error about LibSDL...

sudo apt-get install libsdl-image1.2


If you received the error: "zandronum: error while loading shared libraries: libfmodex32-4.24.16.so: cannot open shared object file: No such file or directory"

or

"zandronum: error while loading shared libraries: libfmodex64-4.24.16.so: cannot open shared object file: No such file or directory":


This means that you need to download and install FMOD manually. From my experience, Zandronum just ignores the .so files provided in the zandronum directory. It's easy to fix.

1. Download FMod 4.24.16 for Linux:

32-bit: http://zandronum.com/essentials/fmod/fmodapi42416linux.tar.gz

64-bit: http://zandronum.com/essentials/fmod/fmodapi42416linux64.tar.gz

2. Extract them somewhere, and navigate to that directory in the command prompt (using cd)

3. When you get to the directory (it should have a file called "Makefile" in it):

sudo make install

4. Change to the directory (within the extracted file) /api/lib/

Zandronum will only work on ubuntu if libfmodex-4.24.16.so (libfmodex64-4.24.16.so for 64 bit linux) is in /usr/lib/

5. Run:

sudo cp libfmodex-4.24.16.so /usr/lib/

Or, for 64-bit:

sudo cp libfmodex64-4.24.16.so /usr/lib/

to copy the lib to /usr/lib/

6. Run ldconfig to update the library cache

sudo ldconfig

If you received the error: "GPG error: http://debian.drdteam.org stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 392203ABAF88540B"

Open a terminal and do the following:

wget -O - http://debian.drdteam.org/drdteam.gpg | sudo apt-key add -
sudo apt-get update


If you received the error: "zandronum: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory"

Open a terminal and do the following:

sudo apt-get install libjpeg62

If you received the error: "zandronum: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory"

Open a terminal and do the following:

sudo apt-get install libjpeg8


If you set FMOD as the default midi device for Zandronum and music or sound is not audible, do the following:

1- Download gm.dls (this file is used by FMOD ex in Windows, located at "Windows/System32/drivers/")

http://www.solidfiles.com/d/765e42ac1c/

2- Put the gm.dls file in your .zandronum folder or to any location.

3- In your .zandronum folder, edit zandronum.ini and go to "snd_midipatchset=" and set the path where your gm.dls file is located, for example:

snd_midipatchset=/home/<your username>/.zandronum/gm.dls

4- Save changes and verify if music or sound is audible.


If you received the error: "bash: /usr/bin/apt-add-repository: No such file or directory" or if the "apt-add-repository" command does not work:

Open a terminal and do the following:

sudo apt-get install python-software-properties

Related Articles

Setting Ubuntu/Ubuntu Server to a Static ip for hosting: http://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/