Difference between revisions of "Building Bitfighter"

From Bitfighter
(Undo revision 4115 by Linna (Talk))
Line 5: Line 5:
 
*[http://code.google.com/p/bitfighter/source/browse Browse source]
 
*[http://code.google.com/p/bitfighter/source/browse Browse source]
  
=Source Code=
+
===Source Code===
 
Bitfighter now uses Mercurial (hg) to obtain the source code.  Here is some useful Mercurial information:
 
Bitfighter now uses Mercurial (hg) to obtain the source code.  Here is some useful Mercurial information:
 
*[[Contribute_using_Mercurial]]
 
*[[Contribute_using_Mercurial]]
Line 12: Line 12:
 
*[http://code.google.com/p/bitfighter/source/checkout Source Checkout]
 
*[http://code.google.com/p/bitfighter/source/checkout Source Checkout]
  
At the least, you can just copy and paste this into your terminal browser, after installing Mercurial.
+
At the least, you can just copy and paste this into your terminal browser, after installing Mercurial:
  
<code>hg clone https://bitfighter.googlecode.com/hg/ bitfighter
+
hg clone https://code.google.com/p/bitfighter/
</code>
+
  
=Linux=
+
If you don't want to compile the current development version, update to a specific released version after cloning:
 +
 
 +
hg up bitfighter-015a
 +
 
 +
 
 +
===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. 
 +
 
 +
To compile, you'll need to obtain a few files directly from Microsoft -- see the <i>readme.txt</i> in the folder <i>win_include_do_not_distribute</i>.
 +
 
 +
 
 +
===Linux===
 
Bitfighter should build on any major flavor of Linux.  It has been tested and is known to work on Ubuntu, Centos, Fedora, Debian, Mandriva and openSUSE.   
 
Bitfighter should build on any major flavor of Linux.  It has been tested and is known to work on Ubuntu, Centos, Fedora, Debian, Mandriva and openSUSE.   
  
The Bitfighter client depends on Freeglut and the Lua development libraries.  Freeglut is not needed to build a Bitfighter dedicated server (without client portions).
+
The Bitfighter client depends on FreeGLUT and the LUA development libraries.  FreeGLUT is not needed to build a Bitfighter dedicated server (without client portions).
  
 
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.
 
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.
Line 37: Line 47:
 
# Update to the tag/revision you want
 
# Update to the tag/revision you want
 
cd bitfighter
 
cd bitfighter
hg up -c bitfighter-015
+
hg up -c bitfighter-015a
  
 
# Build the game -- the standard options should work
 
# Build the game -- the standard options should work
Line 81: Line 91:
 
cp -r ../installer/screenshots .
 
cp -r ../installer/screenshots .
 
</source>
 
</source>
 
=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. 
 
 
To compile, you'll need to obtain a few files directly from Microsoft -- see the <i>readme.txt</i> in the folder <i>win_include_do_not_distribute</i>.
 
  
  
=OS X=
+
===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!
 
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 [http://developer.apple.com/technologies/tools/xcode.html from Apple].)
 
(You can get them [http://developer.apple.com/technologies/tools/xcode.html from Apple].)
Line 94: Line 99:
 
'''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 [http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.3.3.3.1 developer downloads page].  Xcode 3.2.2 is the latest without iOS built in.
 
'''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 [http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.3.3.3.1 developer downloads page].  Xcode 3.2.2 is the latest without iOS built in.
  
===Getting the source===
+
====Getting the source====
 
Grabbing the source is just like any other terminal, simply navigate here:
 
Grabbing the source is just like any other terminal, simply navigate here:
 
Applications > Utilities > Terminal and paste in the HG command + url + foldername,[http://bitfighter.org/wiki/index.php?title=Building_Bitfighter#Source_Code which can be found here]
 
Applications > Utilities > Terminal and paste in the HG command + url + foldername,[http://bitfighter.org/wiki/index.php?title=Building_Bitfighter#Source_Code which can be found here]
Line 100: Line 105:
 
Also like normal, you can find this download in your home folder
 
Also like normal, you can find this download in your home folder
  
===Building Bitfighter===
+
====Building Bitfighter====
 
'''Note: ''' ''Do NOT use the OSX project folder. It is an old unused file. Instead, find the folder that says 'zap' ''
 
'''Note: ''' ''Do NOT use the OSX project folder. It is an old unused file. Instead, find the folder that says 'zap' ''
  
Line 109: Line 114:
 
#Your newly created bundle is found in your SVN source checkout folder at bitfighter > zap > build > Release
 
#Your newly created bundle is found in your SVN source checkout folder at bitfighter > zap > build > Release
  
====Quickbuild====
+
=====Quickbuild=====
  
 
If your lazy like me, you can do this a quicker way.
 
If your lazy like me, you can do this a quicker way.
Line 129: Line 134:
 
Now you have successfully built your own Bitfighter game.
 
Now you have successfully built your own Bitfighter game.
  
===Notes===
+
====Notes====
 
# The bitfighter project also builds the tnl and libtomcrypt frameworks automatically before compiling the bitfighter source itself.
 
# The bitfighter project also builds the tnl and libtomcrypt frameworks automatically before compiling the bitfighter source itself.
 
# The following frameworks are added automatically to the bundle:
 
# The following frameworks are added automatically to the bundle:

Revision as of 20:49, 30 October 2011

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-015a


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.

To compile, you'll need to obtain a few files directly from Microsoft -- see the readme.txt in the folder win_include_do_not_distribute.


Linux

Bitfighter should build on any major flavor of Linux. It has been tested and is known to work on Ubuntu, Centos, Fedora, Debian, Mandriva and openSUSE.

The Bitfighter client depends on FreeGLUT and the LUA development libraries. FreeGLUT is not needed to build a Bitfighter dedicated server (without client portions).

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
sudo apt-get install freeglut3-dev libopenal-dev libalut-dev
 
# Get the source code
hg clone https://bitfighter.googlecode.com/hg/ bitfighter
 
# Update to the tag/revision you want
cd bitfighter
hg up -c bitfighter-015a
 
# Build the game -- the standard options should work
make
 
# Copy required files into exe folder:
cd exe
cp -r ../installer/levels .
cp -r ../installer/robots .
cp -r ../installer/sfx .
cp -r ../installer/screenshots .


Building a dedicated server on a typical clean Centos virtual server instance

yum -y update
yum -y install mercurial
yum -y install gcc
yum -y install gcc-c++
yum -y install zip        # For archiving purposes
 
yum install -y ncurses-devel     # Needed on some servers
yum install -y readline-devel    # Needed on some servers
 
 
# Get the source code
hg clone https://bitfighter.googlecode.com/hg/ bitfighter
 
# Update to the tag/revision you want
cd bitfighter
hg up -c bitfighter-015
 
# Build the dedicated server (called bitfighterd)
make dedicated 
 
# Copy required files into exe folder:
cd exe
cp -r ../installer/levels .
cp -r ../installer/robots .
cp -r ../installer/sfx .
cp -r ../installer/screenshots .


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

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

Note: Do NOT use the OSX project folder. It is an old unused file. Instead, find the folder that says 'zap'

  1. Navigate through bitfighter > zap > 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 newly created bundle is found in your SVN source checkout folder at bitfighter > zap > build > 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.