Difference between revisions of "Building Bitfighter"

From Bitfighter
m
(Windows)
 
(94 intermediate revisions by 8 users not shown)
Line 1: Line 1:
=Source Code=
+
{{TOC right}}
Bitfighter now uses Murcurial (hg) to obtain the source code
+
  
[http://bitfighter.org/forums/viewtopic.php?f=20&t=469&p=3377#p3377 Raptor has provided a full on page on how to use Murcurial here]
+
This page is dedicated to getting Bitfighter to build on your system of choice.  Some useful links:
 +
*[https://github.com/bitfighter/bitfighter Browse source]
 +
*[https://github.com/bitfighter/bitfighter/commits/master Changelog]
  
[http://www.linkbuildingservices4u.com/seo-link-building.html Link Building Site][http://code.google.com/p/bitfighter/source/checkout The Bitfighter code can be found here]
+
Also, please see the README.txt included in the source.
  
At the least, you can just copy and paste this into your terminal browser, after installing Mercurial.
+
===Source Code===
 +
Bitfighter has migrated to Git to manage the source code, on the GitHub website.  Here is some useful Git information:
 +
*[https://try.github.io Intro to Git]
 +
*[https://guides.github.com/activities/hello-world/ Simple GitHub usage]
 +
*[https://guides.github.com/ Other GitHub guides]
  
<code>hg clone https://bitfighter.googlecode.com/hg/ bitfighter
+
The Bitfighter code can be found here:
</code>
+
*[https://github.com/bitfighter/bitfighter Source Checkout (Click 'Clone or download')]
  
Using SVN is still possible for archives, but is obsolete and no longer updated.
+
If you have Git installed, you can easily check out a copy of the source code by running this command in a terminal in a folder of your chosing:
 +
git clone https://github.com/bitfighter/bitfighter.git bitfighter
  
[http://bitfighter.org/wiki/index.php?title=Building_Bitfighter#SVN_.28obsolete.29 See here for SVN instructions.]
+
After checking out the code, if you don't want to compile the current development version, you can update to a specific released version.  To see a list of released versions, type in:
 +
git tag
  
[http://code.google.com/p/bitfighter/source/list Cick here for the Changelog]
+
We recommend to always chose the latest release as the build instructions for older releases will be different that what is shown here on this wiki page. Update to a release that you want:
 +
git checkout bitfighter-019f
  
Designed asnd structured by [http://www.online-casino.eu.com/ http://www.online-casino.eu.com/]
+
===Windows===
  
=Linux=
+
We have migrated to [CMake http://www.cmake.org/] for Windows builds in version 019 and later (and currently in the most recent development code). Note that we recommend using Visual Studio 2017 (though other versions will work) for the building environment on WindowsTo build:
Bitfighter should build on any major flavor of <span class="plainlinks">[http://www.gumball-machine.com/vending-machines.html <span style="color:white;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">vending machines</span>] 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).
+
# Install CMake from http://www.cmake.org/
 +
# In a terminal, change to the 'build' directory in the bitfighter source code tree.
 +
# Run the following command (A list of CMake 'generators' for different build environments can be found [here http://www.cmake.org/cmake/help/v3.8/manual/cmake-generators.7.html#manual:cmake-generators(7)]): 
 +
#* '''cmake -G "Visual Studio 17 2022" -A x64 ..'''  # Substitute a different generator if you like
 +
#** To target Windows XP, add the proper toolset to the CMake command: '''cmake -G "Visual Studio 15 2017" -T "v141_xp" ..'''
 +
# Open the resulting Visual Studio solution file
 +
# To run and debug, you may need to right click "Bitfighter" in solution explorer, and choose "Set as StartUp Project"  (the active project is shown in bold text)
 +
# If the game starts, but you can't find the window, try running the debug build from the cmdline (in the exe folder) like this: '''bitfighter_debug.exe -window -winwidth 600 -winpos 4 28'''; then quit the game and it should run fine moving forward.  This is a rare issue.
  
Bitfighter must be compiled with the gcc/g++ compiler and <span class="plainlinks">[http://www.mycaal.com/ <span style="color:white;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">loan modification</span>], which is usually not installed by default in most Linux distributions.  Mercurial is <span class="plainlinks">[http://www.bestpills4weightloss.com <span style="color:white;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">top weight loss pills</span>] required to obtain the source code.
+
===Linux===
  
 +
====Detailed Instructions====
 +
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: [http://www.winehq.org/] 
  
'''Building full game client on a clean install of Ubuntu'''
+
Bitfighter has several common, open source dependencies, which can be easily installed:
These instructions should work on both 32 and 64 bit platforms.
+
<source lang="bash">
+
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
+
* sudo apt-get install cmake libphysfs-dev libsdl2-dev libopenal-dev libvorbis-dev libmodplug-dev libspeex-dev
hg clone https://bitfighter.googlecode.com/hg/ bitfighter
+
  
# Update to the tag/revision you want
+
You must install these '''and their development headers''' using your distribution's preferred method.  The development headers for these libraries have similar names with a suffix, for example:
cd bitfighter
+
* libvorbis-dev or vorbis-devel
hg up -c bitfighter-015
+
  
# Build the game -- the standard options should work
 
make
 
  
# Copy required files into exe folder:
+
You will also need the following to compile:
cd exe
+
* cmake version 3+ (sometimes called cmake3)
cp -r ../installer/levels .
+
* make
cp -r ../installer/robots .
+
* gcc / g++
cp -r ../installer/sfx .
+
cp -r ../installer/screenshots .
+
  
</source>
+
Once your dependencies are installed, you can build bitfighter with these steps:
 +
# cd build
 +
# cmake ..  [or cmake3 ..]
 +
# make
  
 +
If you want to build a dedicated server (with no GUI), replace the 'make' step above with:
 +
# make bitfighterd
  
'''Building a dedicated server on a typical clean Centos virtual server instance'''
+
Next, you'll need to copy the resources to where the executable was built:
<source lang="bash">
+
# cd ../exe
yum -y update
+
# cp -r ../resource/* .
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
+
And if you wish to run in standalone mode, create a standalone.txt file in the 'exe' folder to trigger this mode:
yum install -y readline-devel    # Needed on some servers
+
# touch standalone.txt
  
 +
====Centos Dedicated Server Instructions (Easy!)====
 +
'''Building a dedicated server on a typical clean Centos 5 or 6 virtual server instance'''
 +
<nowiki>
  
# Get the source code
+
# We recommend that you install and run a dedicated bitfighter server with a special
hg clone https://bitfighter.googlecode.com/hg/ bitfighter
+
# user account used only for this purpose, that does not have root access.
  
# Update to the tag/revision you want
+
# First, create a bitfighter user; you can skip this step if you want to use an
cd bitfighter
+
# existing account
hg up -c bitfighter-015
+
useradd bitfighter       # Create the account
 +
passwd bitfighter       # Set the password.  Pick a good one!
  
# Build the dedicated server (called bitfighterd)
+
# Do the following as a user that has sudo privileges
make dedicated
+
  
# Copy required files into exe folder:
+
sudo yum update    # system should be up to date
cd exe
+
cp -r ../installer/levels .
+
cp -r ../installer/robots .
+
cp -r ../installer/sfx .
+
cp -r ../installer/screenshots .
+
</source>
+
  
=Windows=
+
# The following sets up the EPEL repository for extra packages (needed for newer git)
Bitfighter can be built with MS Visual C++ 2010 Express Edition, a free download from Microsoft, and a much-improved IDE over previous versions.
+
# Choose one based on your server architecture
 +
# 32 bit:
 +
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
 +
# 64 bit:
 +
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
  
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>.
+
sudo yum install git gcc gcc-c++ zip ncurses-devel readline-devel patch cmake3 screen
  
To get help on installing Bitfighter, visit: <span class="plainlinks">[https://www.techienow.com/ <span style="color:white;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">pc repair online</span>].
 
  
=OS X=
+
# Do the following as the bitfighter user
Bitfighter builds on OS X using Xcode 3.1 or greater.  You must have developer tools installed to build bitfighter on OS X!
+
su bitfighter
(You can get them [http://developer.apple.com/technologies/tools/xcode.html from Apple].)
+
cd ~
  
'''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.
+
# Get the source code -- this will create a folder called bitfighter in your
 +
# current location.  This may take a couple of minutes!
 +
git clone https://github.com/bitfighter/bitfighter.git bitfighter
  
===Getting the source===
+
# Update to the tag/revision you want
Grabbing the source is just like any other terminal, simply navigate here:
+
cd bitfighter
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]
+
git checkout bitfighter-019f
  
Also like normal, you can find this download in your home folder
+
# Build the dedicated server (called bitfighterd)
 
+
cd build
===Building Bitfighter===
+
cmake3 ..         # Creates a Makefile for the next step; may emit warnings
'''Note: ''' ''Do NOT use the OSX project folder. It is an old unused file. Instead, find the folder that says 'zap' ''
+
make bitfighterd
 
+
#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
+
 
+
====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
+
 
+
<Code>
+
cd (filename you chose when you downloaded the game)
+
 
+
cd zap
+
 
+
xcodebuild
+
 
+
</Code>
+
 
+
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===
+
# Copy required files into exe folder (found at the root of the code tree):
# The bitfighter project also builds the tnl and libtomcrypt frameworks automatically before compiling the bitfighter source itself.
+
cd ../exe
# The following frameworks are added automatically to the bundle:
+
cp -r ../resource/* .
#*libtomcrypt.framework
+
touch standalone.txt  # Tell bitfighterd to run in portable mode (don't skip this!!)
#*tnl.framework
+
</nowiki>
#*Openal-Soft.framework
+
#*FreeALUT.framework
+
# Upon first launch of your newly created game, an alias is created that <span class="plainlinks">[http://princess-engagement-rings.com <span style="color:white;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">princess engagement rings</span>] 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.
+
  
=SVN (obsolete)=
+
===OS X===
  
Bitfighter used to use subversion for [http://www.diamondlinks.net/ Link Building] source content control and management.
+
We have migrated to CMake for OS X as well. You must have the following software installed (in addition to the bitfighter source code):
 +
# CMake
 +
# XCode (includes development libraries and compilers)
  
The last revision via svn can be found [http://www.zbsports.com marmot jackets] here, but is no longer pdated
+
To build:
 +
# Open a terminal
 +
# Set up the compatibility environment by running:
 +
#* export MACOSX_DEPLOYMENT_TARGET=10.6
 +
# change into the 'build' directory within the Bitfighter source
 +
# Run CMake:
 +
#* cmake ..
 +
# Build with 'make':
 +
#* make Bitfighter
 +
# The .app will be built in the 'exe' sub-folder of the main bitfighter source directory
  
  svn checkout <nowiki>https://bitfighter.googlecode.com/svn/trunk</nowiki> bitfighter
+
Building with XCode is supported with CMake, but it is untested with Bitfighter. To do so:
 +
# Open a terminal
 +
# Set up the compatibility environment by running:
 +
#* export MACOSX_DEPLOYMENT_TARGET=10.6
 +
# change into the 'build' directory within the Bitfighter source
 +
# Run CMake using the Xcode generator:
 +
#* cmake -G Xcode ..
 +
# This will create an Xcode project within the 'build' directory that you can open
  
Browsing: http://code.google.com/p/bitfighter/source/browse/
 
  
Changelog: http://code.google.com/p/bitfighter/source/list
+
====Notes====
* [http://www.dawnpowerdental.com/ Madera dentist]
+
# Bitfighter user settings are found in $HOME/Library/Application Support/Bitfighter
* [http://www.shindiristudio.com/ Web Dizajn]
+
* [http://www.shindiristudio.com/SEO-optimizacija-sajta/ Optimizacija]
+
* [http://www.discount-lenses.com/halloween-contact-lenses.php halloween contacts]
+
* [http://www.baileybuttonugg.net UGG Bailey Button]
+
* [http://www.uggsdiscountcom.com UGGS Discount]
+
* [http://www.uggsoutletugg.net UGGS Outlet]
+

Latest revision as of 02:37, 9 January 2023

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

Also, please see the README.txt included in the source.

Source Code

Bitfighter has migrated to Git to manage the source code, on the GitHub website. Here is some useful Git information:

The Bitfighter code can be found here:

If you have Git installed, you can easily check out a copy of the source code by running this command in a terminal in a folder of your chosing:

git clone https://github.com/bitfighter/bitfighter.git bitfighter

After checking out the code, if you don't want to compile the current development version, you can update to a specific released version. To see a list of released versions, type in:

git tag

We recommend to always chose the latest release as the build instructions for older releases will be different that what is shown here on this wiki page. Update to a release that you want:

git checkout bitfighter-019f

Windows

We have migrated to [CMake http://www.cmake.org/] for Windows builds in version 019 and later (and currently in the most recent development code). Note that we recommend using Visual Studio 2017 (though other versions will work) for the building environment on Windows. To build:

  1. Install CMake from http://www.cmake.org/
  2. In a terminal, change to the 'build' directory in the bitfighter source code tree.
  3. Run the following command (A list of CMake 'generators' for different build environments can be found [here http://www.cmake.org/cmake/help/v3.8/manual/cmake-generators.7.html#manual:cmake-generators(7)]):
    • cmake -G "Visual Studio 17 2022" -A x64 .. # Substitute a different generator if you like
      • To target Windows XP, add the proper toolset to the CMake command: cmake -G "Visual Studio 15 2017" -T "v141_xp" ..
  4. Open the resulting Visual Studio solution file
  5. To run and debug, you may need to right click "Bitfighter" in solution explorer, and choose "Set as StartUp Project" (the active project is shown in bold text)
  6. If the game starts, but you can't find the window, try running the debug build from the cmdline (in the exe folder) like this: bitfighter_debug.exe -window -winwidth 600 -winpos 4 28; then quit the game and it should run fine moving forward. This is a rare issue.

Linux

Detailed Instructions

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]

Bitfighter has several common, open source dependencies, which can be easily installed:

  • sudo apt-get install cmake libphysfs-dev libsdl2-dev libopenal-dev libvorbis-dev libmodplug-dev libspeex-dev

You must install these and their development headers using your distribution's preferred method. The development headers for these libraries have similar names with a suffix, for example:

  • libvorbis-dev or vorbis-devel


You will also need the following to compile:

  • cmake version 3+ (sometimes called cmake3)
  • make
  • gcc / g++

Once your dependencies are installed, you can build bitfighter with these steps:

  1. cd build
  2. cmake .. [or cmake3 ..]
  3. make

If you want to build a dedicated server (with no GUI), replace the 'make' step above with:

  1. make bitfighterd

Next, you'll need to copy the resources to where the executable was built:

  1. cd ../exe
  2. cp -r ../resource/* .

And if you wish to run in standalone mode, create a standalone.txt file in the 'exe' folder to trigger this mode:

  1. touch standalone.txt

Centos Dedicated Server Instructions (Easy!)

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


# We recommend that you install and run a dedicated bitfighter server with a special 
# user account used only for this purpose, that does not have root access.

# First, create a bitfighter user; you can skip this step if you want to use an 
# existing account
useradd bitfighter       # Create the account
passwd bitfighter        # Set the password.  Pick a good one!

# Do the following as a user that has sudo privileges

sudo yum update    # system should be up to date

# The following sets up the EPEL repository for extra packages (needed for newer git)
# Choose one based on your server architecture
# 32 bit:
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# 64 bit:
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

sudo yum install git gcc gcc-c++ zip ncurses-devel readline-devel patch cmake3 screen


# Do the following as the bitfighter user
su bitfighter
cd ~

# Get the source code -- this will create a folder called bitfighter in your 
# current location.  This may take a couple of minutes!
git clone https://github.com/bitfighter/bitfighter.git bitfighter

# Update to the tag/revision you want
cd bitfighter
git checkout bitfighter-019f

# Build the dedicated server (called bitfighterd)
cd build
cmake3 ..          # Creates a Makefile for the next step; may emit warnings
make bitfighterd

# Copy required files into exe folder (found at the root of the code tree):
cd ../exe
cp -r ../resource/* .
touch standalone.txt   # Tell bitfighterd to run in portable mode (don't skip this!!)

OS X

We have migrated to CMake for OS X as well. You must have the following software installed (in addition to the bitfighter source code):

  1. CMake
  2. XCode (includes development libraries and compilers)

To build:

  1. Open a terminal
  2. Set up the compatibility environment by running:
    • export MACOSX_DEPLOYMENT_TARGET=10.6
  3. change into the 'build' directory within the Bitfighter source
  4. Run CMake:
    • cmake ..
  5. Build with 'make':
    • make Bitfighter
  6. The .app will be built in the 'exe' sub-folder of the main bitfighter source directory

Building with XCode is supported with CMake, but it is untested with Bitfighter. To do so:

  1. Open a terminal
  2. Set up the compatibility environment by running:
    • export MACOSX_DEPLOYMENT_TARGET=10.6
  3. change into the 'build' directory within the Bitfighter source
  4. Run CMake using the Xcode generator:
    • cmake -G Xcode ..
  5. This will create an Xcode project within the 'build' directory that you can open


Notes

  1. Bitfighter user settings are found in $HOME/Library/Application Support/Bitfighter