teeworlds logo
 

Compiling Teeworlds

IMPORTANT NOTE: Teeworlds 0.5.2 and earlier requires python 2.x to compile. Python 3.0 will not work. Python 3.0 support is introduced with Teeworlds 0.6.0.

Windows

Setup

  1. Download and install Visual C/C++ Express (http://www.microsoft.com/express/download/default.aspx)
  2. Download and install Python (http://www.python.org/download/). (for Teeworlds 0.5.2 and earlier the 2.x version, not 3.x)
  3. Download and unzip bam (0.2.0 for Teeworlds 0.5.2 and earlier, 0.4.0 for Teeworlds 0.6.0 and later)
  4. Download and unzip teeworlds (http://www.teeworlds.com/?page=downloads)

Compiling bam

Run in cmd (start>run>cmd):

cd bam
make_win32_msvc.bat
cd ..

Compiling teeworlds

Run the following commands in cmd (start->run->cmd) while replacing <target> with your desired target from the table at the bottom of this page:
Replace VERSION in teeworlds-VERSION-src.zip with the version you want (probably the latest, 0.6.2)!

0.6.0 and later

%comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
cd teeworlds-VERSION-src 
..\bam\bam <target>

0.5.2 and earlier

%comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
cd teeworlds-VERSION-src 
..\bam\src\bam <target>

Linux

Setup

Use your package manager to install the following packages(you need the header/development files):

python (2.x for 0.5.2 and earlier)
alsa (asound)
gl
glu
x11
libsdl (1.2)
freetype

(python is the only one which is required to build the server)

Installing bam

0.6.0 and later

Use your package maneger to install bam (0.4.0). Alternatively install bam (0.4.0) manually by running the following commands:

$ wget --no-check-certificate https://www.teeworlds.com/files/bam-0.4.0.zip
$ unzip bam-0.4.0.zip
$ rm bam-0.4.0.zip
$ cd bam-0.4.0
$ ./make_unix.sh
$ sudo mv bam /usr/local/bin/

0.5.2 and earlier

Install bam (0.2.0) manually by running the following commands:

$ wget --no-check-certificate https://www.teeworlds.com/files/bam-0.2.0.zip
$ unzip bam-0.2.0.zip
$ rm bam-0.2.0.zip
$ cd bam-0.2.0
$ ./make_unix.sh
$ sudo mv src/bam /usr/local/bin/

Getting the sources

Run the following commands to download teeworlds:
Replace VERSION in teeworlds-VERSION-src.zip with the version you want (probably the latest, 0.6.2)!

$ wget --no-check-certificate https://www.teeworlds.com/files/teeworlds-VERSION-src.zip
$ unzip teeworlds-VERSION-src.zip
$ rm teeworlds-VERSION-src.zip

Compiling Teeworlds

Run the following commands while replacing <target> with your desired target from the table at the bottom of this page:

$ cd teeworlds-VERSION-src
$ bam <target>

Mac OS X

Setup

Install the Xode tools from apple. Use MacPorts or Homebrew to install FreeType:

$ sudo port install freetype
$ brew install freetype
or
$ sudo port install freetype +universal
$ brew install freetype --universal

if you want to build universal binaries.

0.6.2 and earlier

Download SDL 1.2 from http://libsdl.org and put SDL.framework in /Library/Frameworks

0.7.0 and later

Use MacPorts or Homebrew to install SDL 1.2 (when using MacPorts, make sure to not install the X11 variant):

$ sudo port install libsdl -x11
$ brew install sdl
or
$ sudo port install libsdl -x11 +universal
$ brew install sdl --universal

if you want to build universal binaries.

Installing bam

0.6.0 and later

Use MacPorts or Homebrew to install bam (0.4.0):

$ sudo port install bam
$ brew install bam

Alternatively you can install bam (0.4.0) manually by entering the following commands:

$ curl https://www.teeworlds.com/files/bam-0.4.0.zip > bam-0.4.0.zip
$ unzip bam-0.4.0.zip
$ rm bam-0.4.0.zip
$ cd bam-0.4.0
$ ./make_unix.sh
$ sudo mv bam /usr/local/bin/

0.5.2 and earlier

Install bam (0.2.0) manually by running the following commands:

$ curl https://www.teeworlds.com/files/bam-0.2.0.zip > bam-0.2.0.zip
$ unzip bam-0.2.0.zip
$ rm bam-0.2.0.zip
$ cd bam-0.2.0
$ ./make_unix.sh
$ sudo mv src/bam /usr/local/bin/

Getting the sources

Run the following commands to download teeworlds:
Replace VERSION in teeworlds-VERSION-src.zip with the version you want (probably the latest, 0.6.2)!

$ curl https://www.teeworlds.com/files/teeworlds-VERSION-src.zip > teeworlds-VERSION-src.zip
$ unzip teeworlds-VERSION-src.zip
$ rm teeworlds-VERSION-src.zip

Compiling Teeworlds

Run the following commands while replacing <target> with your desired target from the table at the bottom of this page:

$ cd teeworlds-VERSION-src
$ bam <target>

Targets

TargetDescription
releaseAll binaries (crapnet, dilate, fake_server, map_resave, map_version, mastersrv, packetgen, serverlaunch (only on Mac OS X), teeworlds, teeworlds_srv, tileset_borderop, versionsrv) in release version
client_releaseClient (teeworlds) in release version
server_releaseServer (serverlaunch (only on Mac OS X), teeworlds_srv) in release version
debugAll binaries (crapnet, dilate, fake_server, map_resave, map_version, mastersrv, packetgen, serverlaunch (only on Mac OS X), teeworlds, teeworlds_srv, tileset_borderop, versionsrv) in release version
client_debugClient (teeworlds) in release version
server_debugServer (serverlaunch (only on Mac OS X), teeworlds_srv) in release version

On Mac OS X you can append "_x86", "_x86_64" or "_ppc" to the targetname in order to only create binaries for that specific architecture.