Difference between revisions of "Building Bitfighter"

From Bitfighter
m (OS X)
(OS X: formatting)
Line 72: Line 72:
 
=OS X=
 
=OS X=
 
Bitfighter builds on OS X using xcode.  
 
Bitfighter builds on OS X using xcode.  
*note you must have developer tools installed to build bitfighter on mac*
+
Note that you must have developer tools installed to build bitfighter on OS X!
*You can get them [Here [http://developer.apple.com/technologies/tools/xcode.html]]
+
(You can get them [from Apple.[http://developer.apple.com/technologies/tools/xcode.html]])
  
To get the svn on Mac:
 
Open applications > utilities > terminal and paste the following line:
 
  
svn co https://zap.svn.sourceforge.net/svnroot/zap/trunk bitfighter
+
==Getting the source==
 +
The Bitfighter source is available via SVN.  To access SVN on your Mac, open Applications > Utilities > Terminal and paste the following line:
  
As usual, it will download into your home folder.
+
    svn co https://zap.svn.sourceforge.net/svnroot/zap/trunk bitfighter
The bitfighter xcode project will be found at :
+
 
 +
This will download the Bitfighter source into your home folder.
 +
 
 +
The Bitfighter xcode project will be at:
  
 
*Bitfighter > Zap > bitfighter.xcodeproj
 
*Bitfighter > Zap > bitfighter.xcodeproj
Line 87: Line 89:
 
''Do not use the osx project folder, the project has been moved and it is no longer used''
 
''Do not use the osx project folder, the project has been moved and it is no longer used''
  
Before you are able to compile it, you will have to build two frameworks included in the svn.
+
Before you are able to compile it, you will have to build two additional frameworks included with the source, libtomcrypt and tnl.
  
First, navigate out of zap and into the folder, libtomcrypt.
+
==Building libtomcrypt==
 +
Navigate out of zap and into the folder libtomcrypt.
 
*You will find another xcode file named  libtomcrypt.xcodeproj
 
*You will find another xcode file named  libtomcrypt.xcodeproj
 
*To build this framework, open the project and find the target icon. Click open the triangle, right click it, and select "build 'libtomcrypt' "
 
*To build this framework, open the project and find the target icon. Click open the triangle, right click it, and select "build 'libtomcrypt' "
Line 95: Line 98:
 
*Once its completed, navigate back to the bitfighter root folder
 
*Once its completed, navigate back to the bitfighter root folder
  
Now, we need to build the tnl framework.
+
==Building tnl==
*as usual, navigate through TNL > tnl.xcodeproj
+
*As before, navigate through TNL > tnl.xcodeproj
 
*Once open, find ''external frameworks and...> Linked frameworks > libtomcript.framework"
 
*Once open, find ''external frameworks and...> Linked frameworks > libtomcript.framework"
*select the framework and click the info button
+
*Select the framework and click the info buttonxcode has not found framework we just build correctly, so we need to manually choose its path
xcode has not found framework we just build correctly, so we need to manually choose its path
+
*Click the choose button
*click the choose button
+
 
*Find and open your bitfighter root folder
 
*Find and open your bitfighter root folder
*navigate through Libtomcrypt > Build > Debug > Libtomcrypt.framework and click choose.
+
*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
 
Now that you have your framework in place, you can build tnl.xcodeproj the same way you built libtomcrypt.xcodeproj
  
Once this is done, you are ready to build bitfighter.xcodeproj.
+
==Building Bitfighter==
 +
Now you are ready to build bitfighter.xcodeproj.
 
Navigate through Bitfighter > Zap > Bitfighter.xcodeproj
 
Navigate through Bitfighter > Zap > Bitfighter.xcodeproj
  
Line 127: Line 130:
 
If you get an error message saying bitfighter crashed upon launch, follow these steps to fix this
 
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
 
*Navigate to your bitfighter and through Zap > build > debug > Bitfighter.app
*right click it and select "show package contents"
+
*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.  
+
*Navigate through contents and make a new folder called frameworks IF there isn't one there already.  
*if there is a folder, open it.
+
*If there is a folder, open it.
*now you'll need to put a few frameworks in 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:
+
These frameworks are mandatory, they MUST be in the folder for Bitfighter to work:
  
 
*ALUT.framework
 
*ALUT.framework
Line 150: Line 153:
 
*NOTE Make sure you copy your bitfighter.app game to the installer folder if you intend on making edits to the xcode project.
 
*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.
+
Now you have successfully built your own Bitfighter game.

Revision as of 22:01, 24 August 2010

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 (check the repository for the latest version):

svn co https://zap.svn.sourceforge.net/svnroot/zap/release-013a bitfighter

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 freeglut-dev libopenal-dev libalut-dev
 
# Get the source code
svn co https://zap.svn.sourceforge.net/svnroot/zap/[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://zap.svn.sourceforge.net/svnroot/zap/[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. Note that you must have developer tools installed to build bitfighter on OS X! (You can get them [from Apple.[1]])


Getting the source

The Bitfighter source is available via SVN. To access SVN on your Mac, open Applications > Utilities > Terminal and paste the following line:

   svn co https://zap.svn.sourceforge.net/svnroot/zap/trunk bitfighter

This will download the Bitfighter source into your home folder.

The Bitfighter xcode project will be at:

  • Bitfighter > Zap > bitfighter.xcodeproj

Do not use the osx project folder, the project has been moved and it is no longer used

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
  • To build this framework, open the project and find the target icon. Click open the triangle, right click it, and select "build 'libtomcrypt' "
  • It will now build the framework you need to use later.
  • Once its 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

Now you are ready to build bitfighter.xcodeproj. Navigate through Bitfighter > Zap > Bitfighter.xcodeproj

Open it, and locate the same Linked frameworks folder that you did when you built the tnl framework.

Now we need to locate both libtomcrypt.framework and tnl.framework

  • select the framework, and click info.
  • where it says path in red, click choose and locate through

Home > bitfighter > libtomcrypt > build > debug > libtomcrypt.framework for libtomcrypt

and Home > bitfighter > tnl > build > debug > tnl.framework for tnl

once you have chosen the correct paths for the frameworks, Click Build and Go at the top. 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

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.