This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Compiling"

From BZFlagWiki
Jump to: navigation, search
m (Visual C++: More detail and list of deps)
(tobylane - from help from irc right now and experience.)
Line 20: Line 20:
 
* Autoconf X.XX
 
* Autoconf X.XX
 
* Autotools X.XX
 
* Autotools X.XX
* SDL Development libraries 1.2.10 or greater
+
* SDL Development libraries 1.2.10 or greater (2.99 + from svn requires SDL 1.3 which is also only in SVN, make and make install SDL, then install BZflag again from ./autogen.sh.)
 
* OpenGL Development libraries 1.1 or greater
 
* OpenGL Development libraries 1.1 or greater
  
Line 31: Line 31:
  
 
Please note that depending on permissions levels the '''make install''' command may need to be run as an administrator or root.
 
Please note that depending on permissions levels the '''make install''' command may need to be run as an administrator or root.
 +
On Mac you can either run make to find any problems, or xcodebuild (after ./configure) to make an .app that is useable.
  
 
===XCode===
 
===XCode===

Revision as of 14:52, 24 September 2009

Overview

Compiling BZFlag is the act of taking the raw source codes for the game and using tools to build an executable application(s) for a target system.

Source Code

In order to compile a user must have his or her own copy of the Source Code. The code can be obtained from a source archive from the Download page, or from the BZFlag_SVN server.

Readme Files

Users should always read the README files for the appropriate operating system. These files are located in the root directory of the source code tree.

Compilers

BZFlag is capable of being built on a number of compilers. The compiler used will depend in some way on the operating system of the computer doing the build.

Linux computers, use the GCC compiler. Macintosh Computers use the XCode compiler Windows Computers can use the Visual C++ compiler, or the MinGW compiler (based on GCC)

GCC

The GCC build as a number of requirements;

  • Automake X.XX
  • Autoconf X.XX
  • Autotools X.XX
  • SDL Development libraries 1.2.10 or greater (2.99 + from svn requires SDL 1.3 which is also only in SVN, make and make install SDL, then install BZflag again from ./autogen.sh.)
  • OpenGL Development libraries 1.1 or greater

If the required dependencies are installed, the user must then run the following commands from at root level of the source tree

 ./autogen.sh
 ./configure
 make
 make install

Please note that depending on permissions levels the make install command may need to be run as an administrator or root. On Mac you can either run make to find any problems, or xcodebuild (after ./configure) to make an .app that is useable.

XCode

Launch XCode and open the bzflag/BZFlag.xcodeproj project. Note that XCode should have BZFlag selected as the active target and Development as the active build configuration. Click on Targets then click the Build icon. When this process completes, your application will be in bzflag/build/Development. You can then move it wherever you like.

Visual C++

2.0.x

Compiler
In order to compile, you need to have Visual C++ 2003 or higher (Express version works just fine).
To get the latest Express version of Visual C++, visit http://www.microsoft.com/express/vc/

Dependencies

In order to compile you need ALL of the following:
Microsoft DirectX SDK April 2007 (Only the Headers and Libraries)
Windows Platform SDK (This is not required for Visual C++ 2008)
LibCURL
GLEW
PDCurses

You then need to add them to your VC++ Directories, both include and lib folders.

2.99.x =

Compiler
In order to compile, you need to have Visual C++ 2008 or higher (Express version works just fine).
To get the latest Express version of Visual C++, visit http://www.microsoft.com/express/vc/

Dependencies

Microsoft DirectX SDK November 2008
PDCurses

You then need to add them to your VC++ Directories, both include and lib folders.

Other build systems

Other build systems may be supported in the various readme files (minGW, IRIX, SOLARIS,etc..)