Zandronum 3.0 on Raspberry PI
Posted: Mon Oct 09, 2017 8:59 pm
Here are steps that I've compiled Zandronum 3.0 on Raspberry PI 3 successfully with.
The main difference against Wiki steps for 2.0 is to NOT apply raspberry patch and change of attributes of one variable from static char to signed static char in order to prevent compiler error.
Install packages necessary to perform build:
sudo apt-get install build-essential zlib1g-dev libsdl1.2-dev libjpeg-dev \
nasm tar libbz2-dev libgtk2.0-dev cmake mercurial libfluidsynth-dev libgl1-mesa-dev \
libssl-dev
Create and cd to your working directory:
$ mkdir $HOME/zandronum-build && cd $HOME/zandronum-build
Clone the Zandronum repository:
$ hg clone https://bitbucket.org/Torr_Samaho/zandronum .
Create and cd to the directory where build files will be outputted:
$ mkdir buildserver && cd buildserver
Change variable type from char to signed char in file p_spec.cpp line 1578:
Original declaration:
static const char hexenScrollies[24][2] =
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
{ 0, -1 }, { 0, -2 }, { 0, -4 },
{ 1, 0 }, { 2, 0 }, { 4, 0 },
{ 1, 1 }, { 2, 2 }, { 4, 4 },
{ -1, 1 }, { -2, 2 }, { -4, 4 },
{ -1, -1 }, { -2, -2 }, { -4, -4 },
{ 1, -1 }, { 2, -2 }, { 4, -4 }
};
modified declaration with added signed:
signed static const char hexenScrollies[24][2] =
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
{ 0, -1 }, { 0, -2 }, { 0, -4 },
{ 1, 0 }, { 2, 0 }, { 4, 0 },
{ 1, 1 }, { 2, 2 }, { 4, 4 },
{ -1, 1 }, { -2, 2 }, { -4, 4 },
{ -1, -1 }, { -2, -2 }, { -4, -4 },
{ 1, -1 }, { 2, -2 }, { 4, -4 }
};
Generate Makefiles
Run cmake, this generates the Makefiles.
$ make clean; \
cmake -DCMAKE_BUILD_TYPE=Release -DSERVERONLY=ON -DNO_ASM=1 ..
The -DNO_ASM=1 argument is important as it doesn't compile the architecture-dependent assembly code.
The main difference against Wiki steps for 2.0 is to NOT apply raspberry patch and change of attributes of one variable from static char to signed static char in order to prevent compiler error.
Install packages necessary to perform build:
sudo apt-get install build-essential zlib1g-dev libsdl1.2-dev libjpeg-dev \
nasm tar libbz2-dev libgtk2.0-dev cmake mercurial libfluidsynth-dev libgl1-mesa-dev \
libssl-dev
Create and cd to your working directory:
$ mkdir $HOME/zandronum-build && cd $HOME/zandronum-build
Clone the Zandronum repository:
$ hg clone https://bitbucket.org/Torr_Samaho/zandronum .
Create and cd to the directory where build files will be outputted:
$ mkdir buildserver && cd buildserver
Change variable type from char to signed char in file p_spec.cpp line 1578:
Original declaration:
static const char hexenScrollies[24][2] =
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
{ 0, -1 }, { 0, -2 }, { 0, -4 },
{ 1, 0 }, { 2, 0 }, { 4, 0 },
{ 1, 1 }, { 2, 2 }, { 4, 4 },
{ -1, 1 }, { -2, 2 }, { -4, 4 },
{ -1, -1 }, { -2, -2 }, { -4, -4 },
{ 1, -1 }, { 2, -2 }, { 4, -4 }
};
modified declaration with added signed:
signed static const char hexenScrollies[24][2] =
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
{ 0, -1 }, { 0, -2 }, { 0, -4 },
{ 1, 0 }, { 2, 0 }, { 4, 0 },
{ 1, 1 }, { 2, 2 }, { 4, 4 },
{ -1, 1 }, { -2, 2 }, { -4, 4 },
{ -1, -1 }, { -2, -2 }, { -4, -4 },
{ 1, -1 }, { 2, -2 }, { 4, -4 }
};
Generate Makefiles
Run cmake, this generates the Makefiles.
$ make clean; \
cmake -DCMAKE_BUILD_TYPE=Release -DSERVERONLY=ON -DNO_ASM=1 ..
The -DNO_ASM=1 argument is important as it doesn't compile the architecture-dependent assembly code.