1,562
edits
DrinkyBird (talk | contribs) (Remove SQLite as a requirement (Zan now downloads it automatically)) Tag: Source edit |
|||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
'''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.''' | ||
== Install dependencies == | == Install dependencies == | ||
Line 27: | Line 9: | ||
** SDL 1.2.8 or later 1.2.x versions | ** SDL 1.2.8 or later 1.2.x versions | ||
** libGL and libGLU ''(SDL or libSDL pull in libGLU)'' or any other GL implementation provider. | ** libGL and libGLU ''(SDL or libSDL pull in libGLU)'' or any other GL implementation provider. | ||
** [http://zandronum.com/essentials/fmod/ FMOD Ex] 4. | ** [http://zandronum.com/essentials/fmod/ FMOD Ex] 4.44.64 | ||
** libopenssl ''(for Zandronum 1.3 or later)'' | ** libopenssl ''(for Zandronum 1.3 or later)'' | ||
** | ** libopus ''(for Zandronum 3.2 or later)'' | ||
* '''Recommended''' | * '''Recommended''' | ||
** GTK2 | ** GTK2 | ||
** mercurial ''(needed in order to [https:// | ** mercurial ''(needed in order to [https://foss.heptapod.net/zandronum/zandronum-stable download the source] and compile in commit meta data)'' | ||
*** mercurial-evolve ''(optional, includes the <tt>topic</tt> and <tt>evolve</tt> extensions, which are needed only if you intend to compile a specific topic. Some distros may include these as part of their base Mercurial package)'' | |||
** nasm 0.98.39 or later ''(x86-32 only)'' | ** nasm 0.98.39 or later ''(x86-32 only)'' | ||
* '''Optional''' | * '''Optional''' | ||
Line 47: | Line 30: | ||
=== Debian/Ubuntu === | === Debian/Ubuntu === | ||
<pre> | <pre> | ||
sudo apt-get install g++ make cmake libsdl1.2-dev mercurial zlib1g-dev \ | sudo apt-get install g++ make cmake libsdl1.2-compat-dev mercurial mercurial-evolve zlib1g-dev \ | ||
libbz2-dev libjpeg-dev libfluidsynth-dev libgtk2.0-dev timidity nasm \ | libbz2-dev libjpeg-dev libfluidsynth-dev libgtk2.0-dev timidity nasm \ | ||
libgl1-mesa-dev libssl-dev tar libglew-dev | libgl1-mesa-dev libssl-dev tar libglew-dev libopus-dev | ||
</pre> | </pre> | ||
Line 56: | Line 39: | ||
dnf install gcc-c++ make cmake SDL-devel mercurial zlib-devel \ | dnf install gcc-c++ make cmake SDL-devel mercurial zlib-devel \ | ||
bzip2-devel libjpeg-turbo-devel fluidsynth-devel gtk2-devel timidity++ nasm \ | bzip2-devel libjpeg-turbo-devel fluidsynth-devel gtk2-devel timidity++ nasm \ | ||
mesa-libGL-devel openssl-devel tar | mesa-libGL-devel openssl-devel glew glew-devel tar | ||
</pre> | </pre> | ||
Line 63: | Line 46: | ||
zypper install gcc-c++ make cmake libSDL-devel mercurial zlib-devel \ | zypper install gcc-c++ make cmake libSDL-devel mercurial zlib-devel \ | ||
libbz2-devel libjpeg-devel fluidsynth-devel gtk2-devel timidity nasm \ | libbz2-devel libjpeg-devel fluidsynth-devel gtk2-devel timidity nasm \ | ||
Mesa-libGL-devel libopenssl-devel tar | Mesa-libGL-devel libopenssl-devel tar glew glew-devel | ||
</pre> | </pre> | ||
Line 77: | Line 60: | ||
=== Arch Linux === | === Arch Linux === | ||
<pre> | <pre> | ||
pacman -S --needed gcc make cmake | pacman -S --needed gcc make cmake sdl12-compat mercurial zlib bzip2 libjpeg-turbo \ | ||
fluidsynth gtk2 timidity++ nasm mesa glu openssl tar glew | fluidsynth gtk2 timidity++ nasm mesa glu openssl tar glew | ||
</pre> | </pre> | ||
Line 107: | Line 90: | ||
'''Do the following sections as normal user.''' | '''Do the following sections as normal user.''' | ||
== Enable Mercurial extensions == | |||
This section is optional, and is required only if you intend to build a specific topic. Doing so requires the <tt>topic</tt> and <tt>evolve</tt> extensions to be enabled. Some distros may package these separately from the base Mercurial package, so check your package manager. | |||
Add the following to the <tt>extensions</tt> section of <tt>~/.hgrc</tt>: | |||
<syntaxhighlight lang="ini"> | |||
[extensions] | |||
topic = | |||
evolve = | |||
</syntaxhighlight> | |||
== Create zandronum_build directory == | == Create zandronum_build directory == | ||
Line 117: | Line 111: | ||
<pre> | <pre> | ||
cd ~/zandronum_build && | cd ~/zandronum_build && | ||
hg clone https:// | hg clone https://foss.heptapod.net/zandronum/zandronum-stable zandronum && | ||
mkdir -pv zandronum/buildclient zandronum/buildserver | mkdir -pv zandronum/buildclient zandronum/buildserver | ||
</pre> | </pre> | ||
Line 300: | Line 294: | ||
r=src/svnrevision.h && if [ -f "$r" ] && [ "$(hg status $r)" != "? $r" ]; then r=$r; else | r=src/svnrevision.h && if [ -f "$r" ] && [ "$(hg status $r)" != "? $r" ]; then r=$r; else | ||
r=src/gitinfo.h; fi && h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' $r)" && | r=src/gitinfo.h; fi && h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' $r)" && | ||
t="$(hg id -tr $h)" && d='' && if [ -z "$(hg log -r $h -k ' | t="$(hg id -tr $h)" && d='' && if [ -z "$(hg log -r $h -k 'changed the version string to')" ]; then | ||
if [ "$t" = tip ] || [ -z "$t" ]; then d=-alpha; fi; fi && | if [ "$t" = tip ] || [ -z "$t" ]; then d=-alpha; fi; fi && | ||
x="$e" && y="$e/zandronum.pk3" && z="$i/zandronum.pk3" && | x="$e" && y="$e/zandronum.pk3" && z="$i/zandronum.pk3" && | ||
Line 306: | Line 300: | ||
x="$i"; elif [ ! -f "$y" ] && [ -f "$z" ]; then x="$i"; fi && | x="$i"; elif [ ! -f "$y" ] && [ -f "$z" ]; then x="$i"; fi && | ||
o="$e/output_sdl/liboutput_sdl.so" && if [ -f "$o" ]; then l="$o \ | o="$e/output_sdl/liboutput_sdl.so" && if [ -f "$o" ]; then l="$o \ | ||
fmodapi44464linux/api/lib/libfmodex${a}-4.44.64.so"; else l=''; fi && | |||
sudo cp -v $e/zandronum $i/zandronum-server $x/zandronum.pk3 $x/skulltag_actors.pk3 $l \ | sudo cp -v $e/zandronum $i/zandronum-server $x/zandronum.pk3 $x/skulltag_actors.pk3 $l \ | ||
/usr/games/zandronum$d/ | /usr/games/zandronum$d/ | ||
Line 316: | Line 310: | ||
r=src/svnrevision.h && if [ -f "$r" ] && [ "$(hg status $r)" != "? $r" ]; then r=$r; else | r=src/svnrevision.h && if [ -f "$r" ] && [ "$(hg status $r)" != "? $r" ]; then r=$r; else | ||
r=src/gitinfo.h; fi && h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' $r)" && | r=src/gitinfo.h; fi && h="$(sed -n 's/.*#define HG_REVISION_HASH_STRING "\(.*\)".*/\1/p' $r)" && | ||
t="$(hg id -tr $h)" && d='' && if [ -z "$(hg log -r $h -k ' | t="$(hg id -tr $h)" && d='' && if [ -z "$(hg log -r $h -k 'changed the version string to')" ]; then | ||
if [ "$t" = tip ] || [ -z "$t" ]; then d=-alpha; fi; fi && | if [ "$t" = tip ] || [ -z "$t" ]; then d=-alpha; fi; fi && | ||
printf %s "\ | printf %s "\ |