Compiling Zandronum on Linux: Difference between revisions
Compiling Zandronum on Linux (view source)
Revision as of 00:18, 29 November 2016
, 29 November 2016no edit summary
(→Backup) |
No edit summary |
||
Line 28: | Line 28: | ||
* libbzip2 ''(optional - possibly static)'' | * libbzip2 ''(optional - possibly static)'' | ||
* libjpeg ''(optional - possibly static)'' | * libjpeg ''(optional - possibly static)'' | ||
* mercurial ''(needed in order to download the source)'' | |||
* mercurial ''(needed in order to | |||
* fluidsynth ''(optional)'' | * fluidsynth ''(optional)'' | ||
* libopenssl | * libopenssl | ||
Line 59: | Line 58: | ||
=== Mageia === | === Mageia === | ||
<pre> | <pre> | ||
a='' && [ "$(uname -m)" = x86_64 ] && a=64 | |||
a= | |||
urpmi gcc-c++ make lib"$a"zlib-devel lib"$a"SDL-devel \ | urpmi gcc-c++ make lib"$a"zlib-devel lib"$a"SDL-devel \ | ||
lib"$a"jpeg-devel nasm tar lib"$a"bzip2-devel \ | lib"$a"jpeg-devel nasm tar lib"$a"bzip2-devel \ | ||
Line 85: | Line 80: | ||
=== PCLinuxOS === | === PCLinuxOS === | ||
<pre> | <pre> | ||
a='' && [ "$(uname -m)" = x86_64 ] && a=64 | |||
a= | |||
apt-get install gcc-c++ make zlib1-devel lib"$a"SDL-devel \ | apt-get install gcc-c++ make zlib1-devel lib"$a"SDL-devel \ | ||
lib"$a"jpeg62-devel nasm tar lib"$a"bzip2-devel \ | lib"$a"jpeg62-devel nasm tar lib"$a"bzip2-devel \ | ||
Line 115: | Line 106: | ||
<pre> | <pre> | ||
cd "$HOME"/zandronum_build && \ | cd "$HOME"/zandronum_build && \ | ||
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \ | |||
a= | |||
wget -nc http://zandronum.com/essentials/fmod/fmodapi42416linux"$a".tar.gz && \ | wget -nc http://zandronum.com/essentials/fmod/fmodapi42416linux"$a".tar.gz && \ | ||
tar -xvzf fmodapi42416linux"$a".tar.gz -C zandronum | tar -xvzf fmodapi42416linux"$a".tar.gz -C zandronum | ||
Line 137: | Line 124: | ||
<pre> | <pre> | ||
cd "$HOME"/zandronum_build/zandronum/buildclient && \ | cd "$HOME"/zandronum_build/zandronum/buildclient && \ | ||
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \ | |||
a= | |||
make clean ; \ | make clean ; \ | ||
cmake -DCMAKE_BUILD_TYPE=Release \ | cmake -DCMAKE_BUILD_TYPE=Release \ | ||
Line 180: | Line 163: | ||
and [[#Compiling|compile]]. | and [[#Compiling|compile]]. | ||
After compiling, backing up and optionally [[#Installation|installing]] the current stable version, run the following: | After compiling, [[#Backup|backing up]] and optionally [[#Installation|installing]] the current stable version, run the following: | ||
<pre> | <pre> | ||
cd "$HOME"/zandronum_build/zandronum && \ | cd "$HOME"/zandronum_build/zandronum && \ | ||
Line 224: | Line 207: | ||
</pre> | </pre> | ||
When the update finish, go to [[# | When the update finish, go to [[#Compiling]]. | ||
== Installation == | == Installation == | ||
Line 240: | Line 223: | ||
cd "$HOME"/zandronum_build/zandronum && \ | cd "$HOME"/zandronum_build/zandronum && \ | ||
t="$(hg id -t)" && \ | t="$(hg id -t)" && \ | ||
d='' && [ "$t" = tip ] || [ -z "$t" ] && d=-alpha ; \ | |||
d= | a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \ | ||
a= | |||
sudo cp -v {buildclient/{zandronum,zandronum.pk3,\ | sudo cp -v {buildclient/{zandronum,zandronum.pk3,\ | ||
skulltag_actors.pk3,output_sdl/liboutput_sdl.so},\ | skulltag_actors.pk3,output_sdl/liboutput_sdl.so},\ | ||
Line 260: | Line 235: | ||
cd "$HOME"/zandronum_build/zandronum && \ | cd "$HOME"/zandronum_build/zandronum && \ | ||
t="$(hg id -t)" && \ | t="$(hg id -t)" && \ | ||
d='' && [ "$t" = tip ] || [ -z "$t" ] && d=-alpha ; \ | |||
d= | cd /tmp && \ | ||
echo '#!/bin/sh' > zandronum"$d" && \ | echo '#!/bin/sh' > zandronum"$d" && \ | ||
echo >> zandronum"$d" && \ | echo >> zandronum"$d" && \ | ||
Line 277: | Line 249: | ||
cd "$HOME"/zandronum_build/zandronum && \ | cd "$HOME"/zandronum_build/zandronum && \ | ||
t="$(hg id -t)" && \ | t="$(hg id -t)" && \ | ||
d='' && [ "$t" = tip ] || [ -z "$t" ] && d=-alpha ; \ | |||
d= | cd /tmp && \ | ||
echo '#!/bin/sh' > zandronum-server"$d" && \ | echo '#!/bin/sh' > zandronum-server"$d" && \ | ||
echo >> zandronum-server"$d" && \ | echo >> zandronum-server"$d" && \ | ||
Line 296: | Line 265: | ||
Remove /usr/games/zandronum directory and all its files: | Remove /usr/games/zandronum directory and all its files: | ||
<pre> | <pre> | ||
sudo rm -rfv /usr/games/zandronum | |||
</pre> | </pre> | ||
Remove zandronum script: | Remove zandronum script: | ||
<pre> | <pre> | ||
sudo rm -fv /usr/bin/zandronum | |||
</pre> | </pre> | ||
Remove zandronum-server script: | Remove zandronum-server script: | ||
<pre> | <pre> | ||
sudo rm -fv /usr/bin/zandronum-server | |||
</pre> | </pre> | ||
Remove /usr/games/zandronum-alpha directory and all its files: | Remove /usr/games/zandronum-alpha directory and all its files: | ||
<pre> | <pre> | ||
sudo rm -rfv /usr/games/zandronum-alpha | |||
</pre> | </pre> | ||
Remove zandronum-alpha script: | Remove zandronum-alpha script: | ||
<pre> | <pre> | ||
sudo rm -fv /usr/bin/zandronum-alpha | |||
</pre> | </pre> | ||
Remove zandronum-server-alpha script: | Remove zandronum-server-alpha script: | ||
<pre> | <pre> | ||
sudo rm -fv /usr/bin/zandronum-server-alpha | |||
</pre> | </pre> | ||
Line 346: | Line 309: | ||
<pre> | <pre> | ||
cd "$HOME"/zandronum_build/zandronum/debugclient && \ | cd "$HOME"/zandronum_build/zandronum/debugclient && \ | ||
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \ | |||
a= | |||
make clean ; \ | make clean ; \ | ||
cmake -DCMAKE_BUILD_TYPE=Debug \ | cmake -DCMAKE_BUILD_TYPE=Debug \ | ||
Line 363: | Line 322: | ||
</pre> | </pre> | ||
Now | Now gdb should have you in its own command prompt. You probably want to log the output, so lets output to a file zandronumclientdebug.log: | ||
<pre> | <pre> | ||
(gdb) set logging on zandronumclientdebug.log | (gdb) set logging on zandronumclientdebug.log | ||
Line 373: | Line 332: | ||
</pre> | </pre> | ||
To start and pass [[Command Line Parameters| | To start and pass [[Command Line Parameters|Command Line]] [http://zdoom.org/wiki/Command_line_parameters Parameters] to zandronum: | ||
<pre> | <pre> | ||
(gdb) run <command line parameters> | (gdb) run <command line parameters> | ||
Line 384: | Line 343: | ||
All output will be copied into the zandronumclientdebug.log, which can then be scrutinized later, or perhaps posted to the [http://zandronum.com/tracker/ Bug Tracker] for other developers to look at. | All output will be copied into the zandronumclientdebug.log, which can then be scrutinized later, or perhaps posted to the [http://zandronum.com/tracker/ Bug Tracker] for other developers to look at. | ||
To exit | To exit gdb's command prompt, use "quit", "q" or Ctrl-D: | ||
<pre> | <pre> | ||
(gdb) quit | (gdb) quit | ||
Line 408: | Line 367: | ||
</pre> | </pre> | ||
Now | Now gdb should have you in its own command prompt. You probably want to log the output, so lets output to a file zandronumserverdebug.log: | ||
<pre> | <pre> | ||
(gdb) set logging on zandronumserverdebug.log | (gdb) set logging on zandronumserverdebug.log | ||
Line 418: | Line 377: | ||
</pre> | </pre> | ||
To start and pass [[Command Line Parameters | To start and pass [[Command Line Parameters]] to zandronum-server: | ||
<pre> | <pre> | ||
(gdb) run <command line parameters> | (gdb) run <command line parameters> | ||
Line 429: | Line 388: | ||
All output will be copied into the zandronumserverdebug.log, which can then be scrutinized later, or perhaps posted to the [http://zandronum.com/tracker/ Bug Tracker] for other developers to look at. | All output will be copied into the zandronumserverdebug.log, which can then be scrutinized later, or perhaps posted to the [http://zandronum.com/tracker/ Bug Tracker] for other developers to look at. | ||
To exit | To exit gdb's command prompt, use "quit", "q" or Ctrl-D: | ||
<pre> | <pre> | ||
(gdb) quit | (gdb) quit |