Difference between revisions of "Building Bitfighter"

From Bitfighter
(Linux)
(Linux)
Line 42: Line 42:
 
hg clone https://code.google.com/p/bitfighter/
 
hg clone https://code.google.com/p/bitfighter/
  
# Update to the tag/revision you want
+
# Update to the tag/revision you want -- this may take a couple of minutes
 
cd bitfighter
 
cd bitfighter
 
hg up bitfighter-018
 
hg up bitfighter-018

Revision as of 16:18, 30 April 2013

This page is dedicated to getting Bitfighter to build on your system of choice. Some useful links:

Source Code

Bitfighter now uses Mercurial (hg) to obtain the source code. Here is some useful Mercurial information:

The Bitfighter code can be found here:

At the least, you can just copy and paste this into your terminal browser, after installing Mercurial:

hg clone https://code.google.com/p/bitfighter/

If you don't want to compile the current development version, update to a specific released version after cloning:

hg up bitfighter-018

Windows

Bitfighter can be built with MS Visual C++ 2010 Express Edition, a free download from Microsoft, and a much-improved IDE over previous versions.

Linux

Bitfighter should build on any major flavor of Linux. It has been tested and is known to work on Ubuntu, LinuxMint, Centos, Fedora, Debian, Mandriva and openSUSE. If you can not get it to work, you can try running it in wine: [1]

The Bitfighter client depends on SDL, libpng, libvorbis, and libspeex development libraries. These are not needed to build the dedicated server.

Bitfighter must be compiled with the gcc/g++ compiler, which is usually not installed by default in most Linux distributions. Mercurial is required to obtain the source code.


Building full game client on a clean install of Ubuntu These instructions should work on both 32 and 64 bit platforms.

sudo apt-get update
sudo apt-get install mercurial g++ libreadline6-dev libncurses5-dev
sudo apt-get install libsdl1.2-dev libopenal-dev
sudo apt-get install libspeex-dev libvorbis-dev libpng-dev libmodplug-dev
 
# Get the source code
hg clone https://code.google.com/p/bitfighter/
 
# Update to the tag/revision you want -- this may take a couple of minutes
cd bitfighter
hg up bitfighter-018
 
# Build the game -- the standard options should work
make
 
# Copy required files into exe folder:
cd exe
cp -r ../resource/* .

Once successfully built, you shouldn't need to built it again unless you are changing version. To run Bitfighter, browse to bitfighter/exe and start bitfighter from there, or in a command, do the following:

cd bitfighter/exe
./bitfighter


Building a dedicated server on a typical clean Centos 5 or 6 virtual server instance

yum update    # system should be up to date
 
# The following sets up the EPEL repository for extra packages (needed for mercurial)
# Choose one based on your server architecture
# 32 bit:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# 64 bit:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
 
yum install mercurial
yum install gcc
yum install gcc-c++
yum install zip        # For archiving purposes
 
yum install ncurses-devel     # Needed on some servers
yum install readline-devel    # Needed on some servers
 
 
# Get the source code -- this may take a couple of minutes
hg clone https://code.google.com/p/bitfighter/
 
# Update to the tag/revision you want
cd bitfighter
hg up bitfighter-018
 
# Build the dedicated server (called bitfighterd)
make dedicated 
 
# Copy required files into exe folder:
cd exe
cp -r ../resource/* .

OS X

Bitfighter builds on OS X using Xcode 3.1 or greater. You must have developer tools installed to build bitfighter on OS X! (You can get them from Apple.)

Note: If you don't wish to download Xcode with iOS integration (saves about 2GB off of downloading) you can get older versions on the developer downloads page. Xcode 3.2.2 is the latest without iOS built in.

Getting the source

You can grab the source the typical command line way below, or you can grab your own copy of Mac Hg, and manager your source with a GUI

Grabbing the source is just like any other terminal, simply navigate here: Applications > Utilities > Terminal and paste in the HG command + url + foldername,which can be found here

Also like normal, you can find this download in your home folder

Building Bitfighter

  1. Navigate through bitfighter > build > osx > Xcode > Bitfighter.xcodeproj
  2. Open Bitfighter.xcodeproj with Xcode.
  3. Click 'Build and Go' at the top. Bitfighter should compile successfully and attempt to launch.
    • Note: building from trunk may NOT complete successfully and/or the launch may fail.
  4. Your new build will be found at Bitfighter > build > osx > build > Debug / release > *
Quickbuild

If your lazy like me, you can do this a quicker way. Right after you download the source, stay in the terminal window Open a new window, and click

cd (filename you chose when you downloaded the game)

cd zap

xcodebuild

It will start punching in alot of code in the window. just let this sit for a while and soon it will be built. The product will be stored in the same place you stored before


Now you have successfully built your own Bitfighter game.

Notes

  1. The bitfighter project also builds the tnl and libtomcrypt frameworks automatically before compiling the bitfighter source itself.
  2. The following frameworks are added automatically to the bundle:
    • libtomcrypt.framework
    • tnl.framework
    • Openal-Soft.framework
    • FreeALUT.framework
  3. Upon first launch of your newly created game, an alias is created that points to your user's bitfighter data directory. It is located at Documents > bitfighter_settings. The data directory contains bitfighter settings as well as the levels, scripts, and screenshots save locations.