Zandronum Server on FreeBSD: Difference between revisions

From Zandronum Wiki
No edit summary
(Update to Heptapod)
Tag: Source edit
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
It is possible to run a Zandronum server on FreeBSD.
{{Warning|This guide hasn't been updated since 2016 and probably won't work on newer versions on FreeBSD.}}
 
== Binary Packages ==
csnxs provides binary packages for FreeBSD, which are available on his [https://csnxs.uk/archive/id/doom/sourceports/zandronum/builds/freebsd/ archive].
 
Before you use these packages, you must install dependencies:
<pre>
$ pkg install sdl sqlite3 openssl
</pre>
 
If asked to install <code>pkg</code>, do so.
 
=== Package List ===
'''Note:''' Packages in <span style='background: #b3ffb3'>green</span> are the latest '''stable''' build, and packages in <span style='background: #ffffb3'>yellow</span> are the latest '''beta''' build.
{| class='wikitable' style='width: 100%;'
! style='width:33%;' | Version
! style='width:33%;' | i386
! style='width:33%;' | x86_64
|- style='background: #ffffb3'
| 3.0-alpha-160814-2010
|
| [https://csnxs.uk/archive/id/doom/sourceports/zandronum/builds/freebsd/betas/zandronum-server-freebsd-x86_64-3.0-alpha-160814-2010.txz zandronum-server-freebsd-x86_64-3.0-alpha-160814-2010.txz] / [https://csnxs.uk/archive/id/doom/sourceports/zandronum/builds/freebsd/betas/zandronum-server-freebsd-x86_64-3.0-alpha-160814-2010-with-debug.txz with-debug]
|- style='background: #b3ffb3'
| '''2.1.2'''
|
| [https://csnxs.uk/archive/id/doom/sourceports/zandronum/builds/freebsd/zandronum-server-freebsd-x86_64-2.1.2.txz zandronum-server-freebsd-x86_64-2.1.2.txz]
|}
 
Once downloaded, use <code>tar xf</code> to extract the package into a new directory.
 
== Compiling ==
== Compiling ==
* Install dependencies
* Install dependencies
Line 50: Line 21:
</pre>
</pre>


* Clone [https://bitbucket.org/Torr_Samaho/zandronum the repo]:
* Clone [https://foss.heptapod.net/zandronum/zandronum-stable the repo]:
<pre>
<pre>
hg clone https://bitbucket.org/Torr_Samaho/zandronum && cd zandronum
hg clone https://foss.heptapod.net/zandronum/zandronum-stable && cd zandronum
</pre>
</pre>


Line 60: Line 31:
</pre<noinclude></noinclude>>
</pre<noinclude></noinclude>>


* Append this line after the other <code>#include</code>s near the top of <code>src/sdl/i_system.cpp</code>:
* 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">
<syntaxhighlight lang="cpp">
#include <sys/wait.h>
#include <sys/wait.h>
Line 67: Line 38:
* Generate the CMake files
* Generate the CMake files
<pre>
<pre>
cd .. && cmake -DCMAKE_BUILD_TYPE=Release -DSERVER_ONLY -DCMAKE_CXX_FLAGS="-fpermissive" ../zandronum
mkdir ../build && cd ../build && cmake -DCMAKE_BUILD_TYPE=Release -DSERVERONLY=1 -DCMAKE_CXX_FLAGS="-fpermissive" ../zandronum
</pre>
</pre>


Line 76: Line 47:


* Assuming it all went well, you should have these files in your current directory:
* Assuming it all went well, you should have these files in your current directory:
  * <code>zandronum-server</code>
** <code>zandronum-server</code>
  * <code>zandronum-server.debug</code>
** <code>zandronum-server.debug</code>
  * <code>zandronum.pk3</code>
** <code>zandronum.pk3</code>
  * <code>skulltag_actors.pk3</code>
** <code>skulltag_actors.pk3</code>

Latest revision as of 22:36, 17 December 2023

Warning: This guide hasn't been updated since 2016 and probably won't work on newer versions on FreeBSD.

Compiling

  • Install dependencies
pkg install sdl sqlite3 openssl cmake python3 mercurial

If you're building Zandronum 3.x or higher:

pkg install gcc5 && export cc=gcc5 && export CXX=g++5

If you're building Zandronum 2.x or lower:

pkg install gcc && export CC=gcc48 && export CXX=g++48
  • Create your working dir:
mkdir zabuild && cd zabuild
hg clone https://foss.heptapod.net/zandronum/zandronum-stable && cd zandronum
  • Optionally, checkout the latest stable release:
hg update ZA_3.1
#include <sys/wait.h>
  • Generate the CMake files
mkdir ../build && cd ../build && cmake -DCMAKE_BUILD_TYPE=Release -DSERVERONLY=1 -DCMAKE_CXX_FLAGS="-fpermissive" ../zandronum
  • Build it
make -j$(nproc)
  • Assuming it all went well, you should have these files in your current directory:
    • zandronum-server
    • zandronum-server.debug
    • zandronum.pk3
    • skulltag_actors.pk3