Zandronum Server on FreeBSD: Difference between revisions

From Zandronum Wiki
No edit summary
No edit summary
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
It is possible to run a Zandronum server on FreeBSD.
It is possible to run a Zandronum server on FreeBSD.
__TOC__


== Binary Packages ==
== Binary Packages ==
Line 23: Line 25:
|- style='background: #b3ffb3'
|- style='background: #b3ffb3'
| '''2.1.2'''
| '''2.1.2'''
|
| [https://csnxs.uk/archive/id/doom/sourceports/zandronum/builds/freebsd/zandronum-server-freebsd-i386-2.1.2.txz zandronum-server-freebsd-i386-2.1.2.txz]
| [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]
| [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]
|}
|}
Line 32: Line 34:
* Install dependencies
* Install dependencies
<pre>
<pre>
$ pkg install sdl sqlite3 openssl cmake python3 mercurial
pkg install sdl sqlite3 openssl cmake python3 mercurial
</pre>
</pre>


If you're building '''Zandronum 3.x or higher''':
If you're building '''Zandronum 3.x or higher''':
<pre>
<pre>
$ pkg install gcc5 && export cc=gcc5 && export CXX=g++5
pkg install gcc5 && export cc=gcc5 && export CXX=g++5
</pre>
</pre>


If you're building '''Zandronum 2.x or lower''':
If you're building '''Zandronum 2.x or lower''':
<pre>
<pre>
$ pkg install gcc && export CC=gcc48 && export CXX=g++48
pkg install gcc && export CC=gcc48 && export CXX=g++48
</pre>
</pre>


Line 59: Line 61:
hg update ZA_{{LatestVersion}}
hg update ZA_{{LatestVersion}}
</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> (see {{Issue|2815|Include <sys/wait.h> in sdl/i_system.cpp}}):
<syntaxhighlight lang="cpp">
#include <sys/wait.h>
</syntaxhighlight>


* 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 71: Line 78:


* 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>

Revision as of 13:00, 23 August 2016

It is possible to run a Zandronum server on FreeBSD.

Binary Packages

csnxs provides binary packages for FreeBSD, which are available on his archive.

Before you use these packages, you must install dependencies:

$ pkg install sdl sqlite3 openssl

If asked to install pkg, do so.

Package List

Note: Packages in green are the latest stable build, and packages in yellow are the latest beta build.

Version i386 x86_64
3.0-alpha-160814-2010 zandronum-server-freebsd-x86_64-3.0-alpha-160814-2010.txz / with-debug
2.1.2 zandronum-server-freebsd-i386-2.1.2.txz zandronum-server-freebsd-x86_64-2.1.2.txz

Once downloaded, use tar xf to extract the package into a new directory.

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://bitbucket.org/Torr_Samaho/zandronum && 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