1,544
edits
DrinkyBird (talk | contribs) No edit summary |
DrinkyBird (talk | contribs) (Update to Heptapod) Tag: Source edit |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Warning|This guide hasn't been updated since 2016 and probably won't work on newer versions on FreeBSD.}} | |||
== Compiling == | |||
* Install dependencies | |||
<pre> | |||
pkg install sdl sqlite3 openssl cmake python3 mercurial | |||
</pre> | |||
If you're building '''Zandronum 3.x or higher''': | |||
<pre> | |||
pkg install gcc5 && export cc=gcc5 && export CXX=g++5 | |||
</pre> | |||
If you're building '''Zandronum 2.x or lower''': | |||
<pre> | |||
pkg install gcc && export CC=gcc48 && export CXX=g++48 | |||
</pre> | |||
* Create your working dir: | |||
<pre> | |||
mkdir zabuild && cd zabuild | |||
</pre> | |||
* Clone [https://foss.heptapod.net/zandronum/zandronum-stable the repo]: | |||
<pre> | <pre> | ||
hg clone https://foss.heptapod.net/zandronum/zandronum-stable && cd zandronum | |||
</pre> | </pre> | ||
* Optionally, checkout the latest stable release: | |||
<pre<noinclude></noinclude>> | |||
hg update ZA_{{LatestVersion}} | |||
</pre<noinclude></noinclude>> | |||
* Append this line after the other <code>#include</code>s near the top of <code>src/sdl/i_system.cpp</code> (see {{Issue|2815|Include <sys/wait.h> in sdl/i_system.cpp}}): | |||
<syntaxhighlight lang="cpp"> | |||
#include <sys/wait.h> | |||
</syntaxhighlight> | |||
* Generate the CMake files | |||
<pre> | |||
mkdir ../build && cd ../build && cmake -DCMAKE_BUILD_TYPE=Release -DSERVERONLY=1 -DCMAKE_CXX_FLAGS="-fpermissive" ../zandronum | |||
</pre> | |||
* Build it | |||
<pre> | |||
make -j$(nproc) | |||
</pre> | |||
* Assuming it all went well, you should have these files in your current directory: | |||
** <code>zandronum-server</code> | |||
** <code>zandronum-server.debug</code> | |||
** <code>zandronum.pk3</code> | |||
** <code>skulltag_actors.pk3</code> |