1

Topic: [TUTORIAL] How to compile Teeworlds under Linux

How to compile Teeworlds

Hey there,
I know there are already a few Tutorial how to compile Teeworlds and they're are all like from 2012, and they most likely work too, and these fact makes this tutorial complete senseless...
ANYWAYS it was pretty hard for me, to set my server up, so it is able compile stuff and I had to mix all tutorials together google a bit, because it didn't work.
SOO here's my version of a Tutorial. And yes I know it's very detailed but I want, that every fool get it :D.

For your information I run Debian 7 wheezy on my server.

1) Preparation
  • First of all you need all rights on your server. In Linux it most likely called root, so make sure you'll get it. Maybe you have to type in sudo in front of every command to get the rights.

  • For the next steps use your update manager (apt-get, yum, etc...). I will use apt-get but you can simply exchange that.

apt-get update        //update your apt-get-list ... just the standart procedure
apt-get upgrade        //upgrade your apt-get-list ... just the standart procedure
apt-get install gcc        //install your c-complier
apt-get install g++        //install your c++-complier, just to make sure it'll work
apt-get install libsdl-dev        //install SDL. You need it
apt-get install libfreetype6-dev        //install freetype. Needed too
apt-get install zip        //install zip. You need it to unpack your zip-files
2) Bam
  • Just copy and paste the following commands ;) Bam is a program to compile Teeworlds.

wget --no-check-certificate https://www.teeworlds.com/files/bam-0.4.0.zip    //get the zip-file from this                                             URL
unzip bam-0.4.0.zip        //unpack your downloaded file
rm bam-0.4.0.zip        //remove the shit. you don't need it anymore
cd bam-0.4.0        //get in the directory of your unpacked bam
./make_unix.sh        //execute the file, you need to install bam in Linux
mv bam /usr/local/bin/        //move bam to another directory. Needed for bam to work
3) Teeworlds source
  • In this step you need a place to work, so make sure you create a working directory:

mkdir TWS        //create a new directory called TWS -> Teeworlds Source
cd TWS        //goto the created directory TWS
wget --no-check-certificate https://github.com/teeworlds/teeworlds/archive/master.zip    //get the teeworlds source from this URL
unzip master.zip        //unpack the teeworlds source
rm master.zip        //clean up the files you don't need any more, again
cd teeworlds-master        //goto the unpacked teeworlds-source-directory
bam config        //check your bam configuration
  • should look like this:

configuration:
AUTO  compiler            gcc
AUTO  stackprotector    yes
AUTO  minmacosxsdk    no
AUTO  macosxppc        no
AUTO  zlib                (in system path)
AUTO  sdl                using sdl-config
AUTO  freetype            using freetype-config
notes:
saved configuration to 'config.lua'
  • Let's compile:

bam <choose a target>

TARGETS:   

  • release            compile EVERYTHING

  • server_release        compile JUST THE SERVER

  • client_release        compile JUST THE CLIENT

  • After this, you should get a message like this: bam: done (time needed to compile)

  • If you want to compile the source again, make sure to type on this command to delete all files you compiled last time:

bam -c all
Finish

inspired by: https://www.teeworlds.com/forum/viewtopic.php?id=9667
Official Teeworlds documentation: https://www.teeworlds.com/?page=docs&am … everything