openarena build script
#1
greetings,

here is a simple build script for openarena that can be used on debian based systems. tested on debian sid arm64. i recommend using mesa-git for the latest panfrost graphics. see that other thread for details.

you can also append openarena commands to the run script, or use to make your own launch script. i've included my own below.

happy fragging.

Code:
#! /bin/sh

## BUILD OPENAREA

PREFIX=/usr/local
DEVDIR=~/Development/UPSTREAM
ARCHDIR=release-linux-aarch64
ARENADIR=$DEVDIR/OPENARENA
DESTDIR=$PREFIX/games/openarena
BINDIR=$PREFIX/bin

## GET REQS
sudo apt-get -y install wget git make libsdl-dev libvorbis-dev libxmp-dev build-essential;

## CHANGE TO ARENADIR
mkdir -p $ARENADIR;
cd $ARENADIR;

## MAKE A SIMPLE SCRIPT
echo "#!/bin/sh" > $ARENADIR/openarena.bin
echo "cd $DESTDIR && ./openarena.aarch64" >> $ARENADIR/openarena.bin

## MAKE A SIMPLE PATCHFILE
echo "*** make simple patchfile \n\n";
echo "217a218,219" > $ARENADIR/enable_arm64.patch;
echo "> #elif defined __aarch64__" >> $ARENADIR/enable_arm64.patch;
echo "> #define ARCH_STRING \"arm64\"" >> $ARENADIR/enable_arm64.patch;

## DOWNLOAD
if [ -f $ARENADIR/openarena-0.8.8.zip ]; then
 echo "Found Arena Download"
else
 wget http://download.tuxfamily.org/openarena/rel/088/openarena-0.8.8.zip
fi;

## GIT
git clone --depth=1 https://github.com/OpenArena/engine;
git clone --depth=1 https://github.com/OpenArena/gamecode;

## UNPACK OPENARENA ZIP
unzip openarena-0.8.8.zip

## BUILD GAMECODE
cd $ARENADIR/gamecode;
make -j;

## PATCH ENGINE TO ENABLE ARM64 AND BUILD
cd $ARENADIR/engine;
patch code/qcommon/q_platform.h ../enable_arm64.patch;
make -j;

## INSTALL
sudo mkdir -p $DESTDIR;
sudo cp -vr $ARENADIR/openarena-0.8.8/baseoa $DESTDIR/;
sudo cp -vr $ARENADIR/gamecode/build/$ARCHDIR/* $DESTDIR/;
sudo cp -vr $ARENADIR/engine/build/$ARCHDIR/* $DESTDIR/;
sudo install -m 0755 -o root $ARENADIR/openarena.bin $BINDIR/openarena;

## FIX PERMS
sudo chown -R root.root $DESTDIR;
sudo chmod a+rx $DESTDIR/baseoa;

## EXIT
exit

my run script. (light used to save and change brightness and kill waybar, which is in the way on sway, then set lightness back to previous and relaunch waybar.)

Code:
#!/bin/sh

# RUN OPENARENA

light -O;
light -S 100%;
killall waybar;
cd /usr/local/games/openarena && ./openarena.aarch64 \
+password PINE64 +connect arena.brixit.nl:22222 \
+cg_drawFPS 1 +r_vertexlight 1 +cg_autovertex 1 +r_greyscale 0 \
+r_texturebits 32;
light -I;
waybar;
exit
#2
Is there any reason behind compiling the game instead using the package provided by debian?
Thanks!
#3
i have tried both. unknown if any benefits exist, but there are some differences, and git commits since last Debian packaging.
#4
If anyone would like to provide the same for Manjaro, it would be greatly appreciated.
I find openarena in Arch's AUR, but its not for Arm64 so I have no idea how to get this thing rolling on Manjaro.
#5
you should be able to comment out the apt line, resolve those dependencies for any distro manually. and run the script as is.


Possibly Related Threads…
Thread Author Replies Views Last Post
  kernel build script for latest mainline manjaro kernel xmixahlx 42 57,480 07-11-2020, 09:01 PM
Last Post: xmixahlx
  mesa-git build script for latest panfrost xmixahlx 28 46,930 06-11-2020, 11:16 PM
Last Post: xmixahlx
  sway-git build script for latest wayland wm xmixahlx 2 5,369 03-27-2020, 02:46 PM
Last Post: xmixahlx
  i3blocks Manjaro battery status script Gerhard 0 2,886 01-05-2020, 02:35 PM
Last Post: Gerhard

Forum Jump:


Users browsing this thread: 1 Guest(s)