Install Zandronum on Ubuntu

From Zandronum Wiki
Revision as of 09:52, 21 August 2016 by DrinkyBird (talk | contribs) (Created page with "= Installation with Packages = This guide will help Ubuntu users to install Zandronum on their systems. Additionally, this will also include the Doomseeker game server brows...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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'
wget -O - http://debian.drdteam.org/drdteam.gpg | sudo apt-key add -
  • 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.

Make zandronum_local/zandronum directories:
mkdir -pv $HOME/zandronum_local/zandronum
Download the latest version of Zandronum 32-bit or 64-bit and extract zandronum, zandronum.pk3, skulltag_actors.pk3, liboutput_sdl.so and zandronum-server to zandronum directory:
cd $HOME/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
    a="zandronum"$v"-linux-x86_64.tar.bz2" 
else
    a="zandronum"$v"-linux-x86.tar.bz2"
fi && \
wget -nc http://zandronum.com/downloads/"$a" && \
tar -xjvf "$a" -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 directory:
cd $HOME/zandronum_local && \
if [ "$(uname -m)" = "x86_64" ]; then 
   FMODFOLDER="fmodapi42416linux64"
   FMODFILE="libfmodex64-4.24.16"
else
   FMODFOLDER="fmodapi42416linux"
   FMODFILE="libfmodex-4.24.16"
fi && \
wget -nc http://zandronum.com/essentials/fmod/$FMODFOLDER.tar.gz && \
tar -xvzf $FMODFOLDER.tar.gz -C zandronum --strip-components=3 \
--show-transformed-names $FMODFOLDER/api/lib/$FMODFILE.so

Continue to Local or System-Wide Installation


Local Installation

Make zandronum script, add executable permission and copy it to /home/<your username>:
cd $HOME && \
echo '#!/bin/sh' > zandronum && \
echo >> zandronum && \
echo 'export LD_LIBRARY_PATH="$HOME/zandronum_local/zandronum"' >> zandronum && \
echo 'exec $HOME/zandronum_local/zandronum/zandronum "$@"' >> zandronum && \
chmod 755 zandronum
Make zandronum-server script, add executable permission and copy it to /home/<your username>:
cd $HOME && \
echo '#!/bin/sh' > zandronum-server && \
echo >> zandronum-server && \
echo 'exec $HOME/zandronum_local/zandronum/zandronum-server "$@"' >> zandronum-server && \
chmod 755 zandronum-server
Now from a terminal you should be able to execute ~/zandronum or ~/zandronum-server only from your user account.

System-Wide Installation

Make /usr/games/zandronum directory:
sudo mkdir -pv /usr/games/zandronum
Copy zandronum, zandronum.pk3, skulltag_actors.pk3, liboutput_sdl.so, zandronum-server and libfmodex64-4.24.16.so or libfmodex-4.24.16.so to /usr/games/zandronum:
cd $HOME/zandronum_local/zandronum && \
if [ "$(uname -m)" = "x86_64" ]; then
   FMODFILE="libfmodex64-4.24.16"
else
   FMODFILE="libfmodex-4.24.16"
fi && \
sudo cp -v zandronum zandronum.pk3 skulltag_actors.pk3 \
liboutput_sdl.so zandronum-server $FMODFILE.so /usr/games/zandronum
Make zandronum script, add executable permission and copy it to /usr/bin:
cd /tmp && \
echo '#!/bin/sh' > zandronum && \
echo >> zandronum && \
echo 'export LD_LIBRARY_PATH=/usr/games/zandronum' >> zandronum && \
echo 'exec /usr/games/zandronum/zandronum "$@"' >> zandronum && \
chmod 755 zandronum && \
sudo cp -v zandronum /usr/bin && \
rm -fv zandronum
Make zandronum-server script, add executable permission and copy it to /usr/bin:
cd /tmp && \
echo '#!/bin/sh' > zandronum-server && \
echo >> zandronum-server && \
echo 'exec /usr/games/zandronum/zandronum-server "$@"' >> zandronum-server && \
chmod 755 zandronum-server && \
sudo cp -v zandronum-server /usr/bin && \
rm -fv zandronum-server
Now from a terminal you should be able to execute zandronum or zandronum-server from any user account.

Remove System-Wide Installation

Remove /usr/games/zandronum directory and all its files:
cd /usr/games && \
sudo rm -rfv zandronum
Remove zandronum script:
cd /usr/bin && \
sudo rm -fv zandronum
Remove zandronum-server script:
cd /usr/bin && \
sudo rm -fv 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

How to increase Zandronum/GZDoom OpenGL FPS on Intel Graphics

Prerequisite:

Debian/Ubuntu

  • xserver-xorg-video-intel >= 2.19

Run Zandronum/GZDoom, start a new game, open console and type vid_fps 1, see how many FPS are displayed and exit Zandronum/GZDoom.

Enable SandyBridge's New Acceleration

If your Intel driver version is 2.21.14-1 / 2.21.15-2 or greater, go to the next part.

Intel SNA is useful on all Intel Graphics, not just SandyBridge.

Make 99-intel.conf:

touch 99-intel.conf

Copy and paste the following to 99-intel.conf:

Section "Device"
     Identifier "Intel Graphics"
     Driver "intel"
     Option "AccelMethod" "sna"
EndSection

and save.

Verify if the xorg.conf.d directory already exist:

ls /etc/X11

If it doesn't exist, as root/superuser, make it:

mkdir -pv /etc/X11/xorg.conf.d

As root/superuser, copy 99-intel.conf to /etc/X11/xorg.conf.d:

cp -v 99-intel.conf /etc/X11/xorg.conf.d

and logout and login.

Disable Vertical Synchronization for Zandronum/GZDoom

Open a terminal, go to your user home directory and verify if the .drirc file already exist:

cd $HOME
ls -la

If it doesn't exist; make it:

touch drirc

otherwise add the configurations of the next step to the already existing .drirc file.

Copy and paste the following to drirc:

<driconf>
    <device screen="0" driver="dri2">
        <application name="zandronum" executable="zandronum">
	    <option name="vblank_mode" value="0"/>
	</application>
	<application name="gzdoom" executable="gzdoom">
	    <option name="vblank_mode" value="0"/>
	</application>
    </device>
</driconf>

and save.

Rename drirc to .drirc:

mv drirc .drirc

Run Zandronum/GZDoom, start a new game, open console and type vid_fps 1, see how many FPS are displayed, you should get more FPS than before.

Revert All Changes

Remove .drirc:

cd $HOME
rm -fv .drirc

As root/superuser, remove 99-intel.conf:

cd /etc/X11/xorg.conf.d
rm -fv 99-intel.conf

and logout and login.

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/