Difference between revisions of "Building Bitfighter"

From Bitfighter
(Getting the source)
(googlecode SVN; mac building updates)
Line 1: Line 1:
 
=Source=
 
=Source=
 +
Bitfighter uses subversion for source content control and management.
 +
 
The current version of the Bitfighter source is available via SVN:
 
The current version of the Bitfighter source is available via SVN:
<pre>
+
svn checkout <nowiki>https://bitfighter.googlecode.com/svn/tags/bitfighter-013e</nowiki> bitfighter
svn co <nowiki>https://zap.svn.sourceforge.net/svnroot/zap/release-013e</nowiki> bitfighter
+
 
</pre>
+
You may also checkout from trunk to test the bleeding edge changes:
 +
svn checkout <nowiki>https://bitfighter.googlecode.com/svn/trunk</nowiki> bitfighter
  
 
=Linux=
 
=Linux=
Line 25: Line 28:
  
 
# Get the source code
 
# Get the source code
svn co https://zap.svn.sourceforge.net/svnroot/zap/[version] bitfighter
+
svn co https://bitfighter.googlecode.com/svn/tags/[version] bitfighter
  
 
# Build the game -- the standard options should work
 
# Build the game -- the standard options should work
Line 54: Line 57:
  
 
# Get the source code
 
# Get the source code
svn co https://zap.svn.sourceforge.net/svnroot/zap/[version] bitfighter
+
svn co https://bitfighter.googlecode.com/svn/tags/[version] bitfighter
  
 
# Build the dedicated server (called bitfighterd)
 
# Build the dedicated server (called bitfighterd)
Line 75: Line 78:
  
 
=OS X=
 
=OS X=
Bitfighter builds on OS X using xcode.  
+
Bitfighter builds on OS X using Xcode 3.1 or greater.  You must have developer tools installed to build bitfighter on OS X!
Note that 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 [from Apple.[http://developer.apple.com/technologies/tools/xcode.html]])
+
  
 +
'''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===
Line 85: Line 88:
  
 
This will download the Bitfighter source into your home folder.
 
This will download the Bitfighter source into your home folder.
 
''Do NOT use the OSX project folder. It is an old unused file. Instead, find the folder that says Zap"
 
The project will be located in > Zap > 'bitfighter.xcodeproj'
 
"NOT  'osx > tnl.xcode' "
 
 
Before you are able to compile it, you will have to build two additional frameworks included with the source, libtomcrypt and tnl.
 
 
===Building libtomcrypt===
 
Navigate out of zap and into the folder libtomcrypt.
 
*You will find another xcode file named  libtomcrypt.xcodeproj
 
*Build this framework by opening the project and finding the target icon. Click open the triangle, right click it, and select "build 'libtomcrypt'"
 
*When completed, navigate back to the bitfighter root folder.
 
 
===Building tnl===
 
*As before, navigate through TNL > tnl.xcodeproj
 
*Once open, find ''external frameworks and...> Linked frameworks > libtomcript.framework"
 
*Select the framework and click the info button.  xcode has not found framework we just build correctly, so we need to manually choose its path
 
*Click the choose button
 
*Find and open your bitfighter root folder
 
*Navigate through Libtomcrypt > Build > Debug > Libtomcrypt.framework and click choose.
 
 
Now that you have your framework in place, you can build tnl.xcodeproj the same way you built libtomcrypt.xcodeproj
 
  
 
===Building Bitfighter===
 
===Building Bitfighter===
Now you are ready to build bitfighter.xcodeproj.
+
'''Note: ''' ''Do NOT use the OSX project folder. It is an old unused file. Instead, find the folder that says 'zap' ''
Navigate through Bitfighter > Zap > Bitfighter.xcodeproj
+
  
Open it, and locate the same Linked frameworks folder that you did when you built the tnl framework.
+
#Navigate through bitfighter > zap > Bitfighter.xcodeproj
 +
#Open Bitfighter.xcodeproj with Xcode.
 +
#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.
 +
#Your newly created bundle is found in your SVN source checkout folder at bitfighter > zap > build > Release
  
Now we need to locate both libtomcrypt.framework and tnl.framework
+
Now you have successfully built your own Bitfighter game.
*select the framework, and click info.
+
*where it says path in red, click choose and locate through
+
  
Home > bitfighter > libtomcrypt > build > debug > libtomcrypt.framework
+
===Notes===
for libtomcrypt
+
# 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:
and
+
#*libtomcrypt.framework
Home > bitfighter > tnl > build > debug > tnl.framework
+
#*tnl.framework
for tnl
+
#*Openal-Soft.framework
 
+
#*FreeALUT.framework
once you have chosen the correct paths for the frameworks, Click Build and Go at the top.
+
# Upon first launch of your newly created game, a hidden folder '.bitfighter' is created in your home directory.  This folder contains bitfighter settings as well as the levels, scripts, and screenshots save locations. You can get to the folder in a terminal, or by going through the alias as Documents > bitfighter_settings.
Bitfighter should compile successfully and attempt to launch.
+
+
If you get an error message saying bitfighter crashed upon launch, follow these steps to fix this
+
*Navigate to your bitfighter and through Zap > build > debug > Bitfighter.app
+
*Right click it and select "show package contents"
+
*Navigate through contents and make a new folder called frameworks IF there isn't one there already.
+
*If there is a folder, open it.
+
*Now you'll need to put a few frameworks in it
+
 
+
These frameworks are mandatory, they MUST be in the folder for Bitfighter to work:
+
 
+
*ALUT.framework
+
*Libtomcrypt.framework
+
*tnl.framework
+
*openal.framework
+
 
+
**you may also need carbon.framework and cocoa.framework**
+
 
+
To find these frameworks, go back to the bitfighter project window in xcode
+
Navigate back to where all the frameworks were.
+
Right click on a framework and select "reveal in finder"
+
Copy the framework to your clipboard, and paste it in the frameworks folder you just made, or that was already there.  
+
*Repeat these steps for all four frameworks
+
*If a framework is already there, skip that one
+
 
+
When you are done with this, you can copy your bitfighter.app game and paste it into the installer folder, located in Bitfighter > Installer, and launch it.
+
*By doing this, you acquire your sfx folder, your levels folder, your screenshots folder, and your robots folder
+
*NOTE Make sure you copy your bitfighter.app game to the installer folder if you intend on making edits to the xcode project.
+
 
+
Now you have successfully built your own Bitfighter game.
+

Revision as of 20:37, 16 November 2010

Source

Bitfighter uses subversion for source content control and management.

The current version of the Bitfighter source is available via SVN:

svn checkout https://bitfighter.googlecode.com/svn/tags/bitfighter-013e bitfighter

You may also checkout from trunk to test the bleeding edge changes:

svn checkout https://bitfighter.googlecode.com/svn/trunk bitfighter

Linux

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

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 g++ compiler, which is not included in many Linux distributions. SVN is required to obtain the source code.

To get the Bitfighter source, use SVN (get the latest production version using the command at the top of this page)

The game will build out-of-the-box on many distros. For details of the various build options, please see the top-level Makefile.


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 subversion g++ libreadline6-dev
sudo apt-get install freeglut3-dev libopenal-dev libalut-dev
 
# Get the source code
svn co https://bitfighter.googlecode.com/svn/tags/[version] bitfighter
 
# Build the game -- the standard options should work
cd bitfighter
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 subversion
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
svn co https://bitfighter.googlecode.com/svn/tags/[version] bitfighter
 
# Build the dedicated server (called bitfighterd)
cd bitfighter
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 .

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.


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

The Bitfighter source is available via SVN. To access SVN on your Mac, open Applications > Utilities > Terminal and paste in the SVN command, located at the top of this page, here

This will download the Bitfighter source into 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

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, a hidden folder '.bitfighter' is created in your home directory. This folder contains bitfighter settings as well as the levels, scripts, and screenshots save locations. You can get to the folder in a terminal, or by going through the alias as Documents > bitfighter_settings.