Install Zandronum on Ubuntu: Difference between revisions

From Zandronum Wiki
No edit summary
No edit summary
 
Line 1: Line 1:
= Installation with Packages =
= 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.  
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 <abbr title="CTRL + ALT + T">terminal</abbr>.
* Open the <abbr title="CTRL + ALT + T">terminal</abbr>.
Line 19: Line 19:
== Uninstallation ==
== Uninstallation ==
Run the following to remove Zandronum from the system:
Run the following to remove Zandronum from the system:
  sudo apt-get --purge remove zandronum
  sudo apt-get --purge remove zandronum
  sudo apt-get --purge remove doomseeker-zandronum
  sudo apt-get --purge remove doomseeker-zandronum
  sudo apt-get autoremove
  sudo apt-get autoremove


= Manual Installation =
= Manual installation =
1. Download the Linux base, and the version for your specific architecture.
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>/.  
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.''
''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 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.  
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)
3. Run Zandronum (to test it)
Line 37: Line 36:
Command (if in the zandronum directory): ./zandronum
Command (if in the zandronum directory): ./zandronum


= Manual Installation (alternative) =
= Manual installation (alternative) =
'''Open a terminal and copy and paste the whole code box for each step.'''
'''Open a terminal and copy and paste the whole code box for each step.'''


: In your user home directory, make zandronum_local/zandronum directories:
In your user home directory, create zandronum_local/zandronum directories:
  mkdir -pv "$HOME"/zandronum_local/zandronum
  mkdir -pv ~/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_local/zandronum directory:
Download the latest version of Zandronum 32-bit or 64-bit and extract files to ~/zandronum_local/zandronum directory:
  cd "$HOME"/zandronum_local && \
  cd ~/zandronum_local &&
  v=$(wget -q -O - http://zandronum.com/download | \
  v="$(wget -q -O - http://zandronum.com/download |
  sed -n 's/.*The latest version is <nowiki><strong>\(.*\)<\/strong></nowiki>.*/\1/p') && \
  sed -n 's/.*The latest version is <nowiki><strong>\(.*\)<\/strong></nowiki>.*/\1/p')" &&
  if [ "$(uname -m)" = "x86_64" ]; then
  if [ "$(uname -m)" = x86_64 ]; then
     z="zandronum"$v"-linux-x86_64.tar.bz2"  
     z="zandronum"$v"-linux-x86_64.tar.bz2"
  else
  else
     z="zandronum"$v"-linux-x86.tar.bz2"
     z="zandronum"$v"-linux-x86.tar.bz2"
  fi && \
  fi &&
  wget -nc <nowiki>http://zandronum.com/downloads/"$z"</nowiki> && \
  wget -nc <nowiki>http://zandronum.com/downloads/"$z"</nowiki> &&
  tar -xjvf "$z" -C zandronum
  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:
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:
cd "$HOME"/zandronum_local && \
  a=<nowiki>''</nowiki> && [ "$(uname -m)" = x86_64 ] && a=64
  a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \
cd ~/zandronum_local &&
  wget -nc <nowiki>http://zandronum.com/essentials/fmod/fmodapi42416linux"$a".tar.gz</nowiki> && \
  wget -nc <nowiki>http://zandronum.com/essentials/fmod/fmodapi42416linux"$a".tar.gz</nowiki> &&
  tar -xvzf fmodapi42416linux"$a".tar.gz -C zandronum --strip-components=3 \
  tar -xvzf fmodapi42416linux"$a".tar.gz -C zandronum --strip-components=3 \
  --show-transformed-names fmodapi42416linux"$a"/api/lib/libfmodex"$a"-4.24.16.so
  --show-transformed-names fmodapi42416linux"$a"/api/lib/libfmodex"$a"-4.24.16.so


'''Continue to [[#Local Installation|Local]] or [[#System-Wide Installation|System-Wide]] Installation'''
'''Continue to [[#Local installation|Local]] or [[#System-wide installation|System-wide]] installation'''


== Local Installation ==
== Local installation ==
: In your user home directory, make zandronum script and add executable permission to it:
In your user home directory, create zandronum script:
  cd "$HOME" && \
  printf %s "\
  echo '#!/bin/sh' > zandronum && \
  #!/bin/sh
  echo >> zandronum && \
  export LD_LIBRARY_PATH=~/zandronum_local/zandronum
echo 'export LD_LIBRARY_PATH=""$HOME"/zandronum_local/zandronum"' >> zandronum && \
  exec ~/zandronum_local/zandronum/zandronum \"\$@\"
  echo 'exec "$HOME"/zandronum_local/zandronum/zandronum "$@"' >> zandronum && \
" > ~/zandronum &&
  chmod 755 zandronum
  chmod 755 ~/zandronum


: In your user home directory, make zandronum-server script and add executable permission to it:
In your user home directory, create zandronum-server script:
  cd "$HOME" && \
  printf %s "\
  echo '#!/bin/sh' > zandronum-server && \
  #!/bin/sh
  echo >> zandronum-server && \
  exec ~/zandronum_local/zandronum/zandronum-server \"\$@\"
echo 'exec "$HOME"/zandronum_local/zandronum/zandronum-server "$@"' >> zandronum-server && \
" > ~/zandronum-server &&
  chmod 755 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.
Now from a terminal you should be able to run '''~/zandronum''' or '''~/zandronum-server''' only from your user account.


== System-Wide Installation ==
== System-wide installation ==
: Make /usr/games/zandronum directory:
Create /usr/games/zandronum directory:
  sudo mkdir -pv /usr/games/zandronum
  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:
Copy all files from ~/zandronum_local/zandronum directory to /usr/games/zandronum/:
  cd "$HOME"/zandronum_local/zandronum && \
  cd ~/zandronum_local/zandronum &&
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \
  sudo cp -v * /usr/games/zandronum/
  sudo cp -v zandronum zandronum.pk3 skulltag_actors.pk3 \
liboutput_sdl.so zandronum-server libfmodex"$a"-4.24.16.so /usr/games/zandronum


: Make zandronum script, add executable permission and move it to /usr/bin:
Create zandronum script:
  cd /tmp && \
  printf %s "\
  echo '#!/bin/sh' > zandronum && \
  #!/bin/sh
echo >> zandronum && \
  export LD_LIBRARY_PATH=/usr/games/zandronum
  echo 'export LD_LIBRARY_PATH=/usr/games/zandronum' >> zandronum && \
  exec /usr/games/zandronum/zandronum \"\$@\"
  echo 'exec /usr/games/zandronum/zandronum "$@"' >> zandronum && \
" > zandronum.sh &&
  chmod 755 zandronum && \
  chmod 755 zandronum.sh &&
  sudo mv -v zandronum /usr/bin
  sudo mv -v zandronum.sh /usr/bin/zandronum


: Make zandronum-server script, add executable permission and move it to /usr/bin:
Create zandronum-server script:
  cd /tmp && \
  printf %s "\
  echo '#!/bin/sh' > zandronum-server && \
  #!/bin/sh
echo >> zandronum-server && \
  exec /usr/games/zandronum/zandronum-server \"\$@\"
  echo 'exec /usr/games/zandronum/zandronum-server "$@"' >> zandronum-server && \
" > zandronum-server.sh &&
  chmod 755 zandronum-server && \
  chmod 755 zandronum-server.sh &&
  sudo mv -v zandronum-server /usr/bin
  sudo mv -v zandronum-server.sh /usr/bin/zandronum-server


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


=== Remove System-Wide Installation ===
=== Remove system-wide installation ===
: Remove /usr/games/zandronum directory and all its files:
Remove /usr/games/zandronum directory and all its files:
  sudo rm -rfv /usr/games/zandronum
  sudo rm -rfv /usr/games/zandronum


: Remove zandronum script:
Remove zandronum script:
  sudo rm -fv /usr/bin/zandronum
  sudo rm -fv /usr/bin/zandronum


: Remove zandronum-server script:
Remove zandronum-server script:
  sudo rm -fv /usr/bin/zandronum-server
  sudo rm -fv /usr/bin/zandronum-server


Line 134: Line 131:
'''"zandronum: error while loading shared libraries: libfmodex32-4.24.16.so: cannot open shared object file: No such file or directory"'''  
'''"zandronum: error while loading shared libraries: libfmodex32-4.24.16.so: cannot open shared object file: No such file or directory"'''  


or  
or


'''"zandronum: error while loading shared libraries: libfmodex64-4.24.16.so: cannot open shared object file: No such file or directory":'''
'''"zandronum: error while loading shared libraries: libfmodex64-4.24.16.so: cannot open shared object file: No such file or directory":'''
Line 185: Line 182:
'''If you set FMOD as the default midi device for Zandronum and music or sound is not audible, do the following:'''
'''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/")
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.
http://www.solidfiles.com/d/765e42ac1c/


: 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:
2- Put the gm.dls file in your .zandronum folder or to any location.
<pre>
snd_midipatchset=/home/<your username>/.zandronum/gm.dls
</pre>


: 4- Save changes and verify if music or sound is audible.
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.




Line 202: Line 198:
Open a terminal and do the following:
Open a terminal and do the following:
  sudo apt-get install python-software-properties
  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 [[#Disable Vertical Synchronization for Zandronum/GZDoom|the next part]].
Intel SNA is useful on all Intel Graphics, not just SandyBridge.
Make 99-intel.conf:
<pre>
touch 99-intel.conf
</pre>
Copy and paste the following to 99-intel.conf:
<pre>
Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
EndSection
</pre>
and save.
Verify if the xorg.conf.d directory already exist:
<pre>
ls /etc/X11
</pre>
If it doesn't exist, as root/superuser, make it:
<pre>
mkdir -pv /etc/X11/xorg.conf.d
</pre>
As root/superuser, copy 99-intel.conf to /etc/X11/xorg.conf.d:
<pre>
cp -v 99-intel.conf /etc/X11/xorg.conf.d
</pre>
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:
<pre>
cd "$HOME"
ls -la
</pre>
If it doesn't exist; make it:
<pre>
touch drirc
</pre>
otherwise add the configurations of the next step to the already existing .drirc file.
Copy and paste the following to drirc:
<pre>
<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>
</pre>
and save.
Rename drirc to .drirc:
<pre>
mv drirc .drirc
</pre>
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:
<pre>
cd "$HOME"
rm -fv .drirc
</pre>
As root/superuser, remove 99-intel.conf:
<pre>
cd /etc/X11/xorg.conf.d
rm -fv 99-intel.conf
</pre>
and logout and login.


= Related Articles =
= Related Articles =
Line 301: Line 204:
*[[Playing Online]]
*[[Playing Online]]
*[[Using_Timidity]] (for music)
*[[Using_Timidity]] (for music)
*[[Compiling Zandronum on Linux#How to increase Zandronum/GZDoom OpenGL FPS|How to increase Zandronum/GZDoom OpenGL FPS]]
Setting Ubuntu/Ubuntu Server to a Static ip for hosting:
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/
http://www.howtogeek.com/howto/ubuntu/change-ubuntu-server-from-dhcp-to-a-static-ip-address/


[[Category:Install]]
[[Category:Install]]

Latest revision as of 15:54, 24 December 2017

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.

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/