Free and Open Source real time strategy game with a new take on micro-management

Difference between revisions of "MAC OS X Development"

From Globulation2

Jump to: navigation, search
m (category:en)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
First get XCode Developer tools and X11 installed from you Mac OSX install CD's or the Apple Website.
First get XCode Developer tools and X11 installed from you Mac OSX install CD's or the Apple Website.


The following guide uses a quick, low overhead solution called 'Homebrew' to install Globulation 2 dependencies.
== Install Fink ==


== Installing Homebrew ==
The easiest way to get all dependencies installed and kept up to date with minimal effort is to use [http://www.finkproject.org fink]. Install Fink as per their websites instructions, then continue.

{{Message|Assumes fresh environment|The following guide assumes you are not using MacPorts or FinkCommander already. If you are, use them to install dependencies, or adjust the paths of the below commands.}}

{{Warning|Globulation 2 compiling|Globulation 2 scons script assumes the dependencies are in /opt/local on the mac. MacPorts uses this directory, but Fink does not. If you need to, symlink the directory. If you can't, edit SConstruct in the glob2 source}}

* Download and install the latest Git version:

http://code.google.com/p/git-osx-installer/downloads/list?can=3

* Run the following in a console:

$ mkdir /opt
$ cd /opt
$ git clone git://github.com/mxcl/homebrew.git local
$ chown -R [your_name]:[your_group] local '''(replace the bracket values)'''


== Adding PATH's ==
== Adding PATH's ==


Open up ~/.profile in your favourite editor, and add at the top of the file:
Open up ~/.profile (or sometimes called .bash_profile) in your favourite editor, and add at the top of the file:


export PATH=/sw/bin:/sw/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11/bin:/usr/X11R6/bin:$PATH
export PATH=/opt/local/bin/:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
export CPPFLAGS="-I/opt/local/include $CPPFLAGS"
export LDFLAGS="-L/opt/local/lib $LDFLAGS"


Save ~/.profile, Quit the Terminal.app program, and then restart it. Type
Save ~/.profile, Quit the Terminal.app program, and then restart it. Type


$PATH
$ which brew


and hit enter, checking to make sure the paths are in place. If so, continue.
and hit enter. If the result is '/opt/local/bin/brew' then feel free to continue, else find out what's wrong.


== Handling Dependencies ==
== Handling Dependencies ==


With Fink installed, the PATH's in place, and the Terminal open, run:
With Homebrew installed, the PATH's in place, and the Terminal open, run:


$ brew install libpng
sudo fink install sdl-image sdl-net sdl-ttf libvorbis libvorbis0 libogg boost1.33 frididi-dev
$ brew link libpng
$ brew install scons sdl sdl_ttf sdl_image sdl_net speex libvorbis libogg boost fribidi portaudio


== Compiling Globulation 2 ==
You should now have all but two of the dependencies (speex and portaudio). Go to the http://www.speex.org/downloads/ and http://www.portaudio.com/download.html pages and grab the latest stable release (1.0.5 for speex and v19_20071207 for portaudio) at the time of writing this). Extract and run for both:


Mac support is very limited, so for now, you'll just need to play the game in the directory you compiled it. Assuming you have download Globulation 2 and extracted the source code (if not, see [[Download and Install]]), change into the directory with the console and run:
./configure && make && sudo make install

$ scons

If all goes well, it should build the glob2 binary at the end of the process. You can safely ignore all the warnings it gives.

== Before Running ==

Once compiled, you'll need to run the following at the Globulation 2 source root to get the game working. Not sure why this is necessary yet (sources indicate Globulation 2 source needs altering).

$ ln -s /opt/local/lib/libboost_thread-mt.dylib


== Compiling Globulation 2 ==
Now carry on with compilation like normal. See http://globulation2.org/wiki/Compiling#Compile_from_Sources


[[Category:en]]
[[Category:en]]

Latest revision as of 05:53, 23 October 2009

First get XCode Developer tools and X11 installed from you Mac OSX install CD's or the Apple Website.

The following guide uses a quick, low overhead solution called 'Homebrew' to install Globulation 2 dependencies.

Installing Homebrew

Assumes fresh environment: The following guide assumes you are not using MacPorts or FinkCommander already. If you are, use them to install dependencies, or adjust the paths of the below commands.
Globulation 2 compiling: Globulation 2 scons script assumes the dependencies are in /opt/local on the mac. MacPorts uses this directory, but Fink does not. If you need to, symlink the directory. If you can't, edit SConstruct in the glob2 source
  • Download and install the latest Git version:
 http://code.google.com/p/git-osx-installer/downloads/list?can=3
  • Run the following in a console:
 $ mkdir /opt
 $ cd /opt
 $ git clone git://github.com/mxcl/homebrew.git local
 $ chown -R [your_name]:[your_group] local    (replace the bracket values)

Adding PATH's

Open up ~/.profile (or sometimes called .bash_profile) in your favourite editor, and add at the top of the file:

 export PATH=/opt/local/bin/:$PATH
 export MANPATH=/opt/local/share/man:$MANPATH
 export CPPFLAGS="-I/opt/local/include $CPPFLAGS"
 export LDFLAGS="-L/opt/local/lib $LDFLAGS"

Save ~/.profile, Quit the Terminal.app program, and then restart it. Type

 $ which brew

and hit enter. If the result is '/opt/local/bin/brew' then feel free to continue, else find out what's wrong.

Handling Dependencies

With Homebrew installed, the PATH's in place, and the Terminal open, run:

 $ brew install libpng
 $ brew link libpng
 $ brew install scons sdl sdl_ttf sdl_image sdl_net speex libvorbis libogg boost fribidi portaudio 

Compiling Globulation 2

Mac support is very limited, so for now, you'll just need to play the game in the directory you compiled it. Assuming you have download Globulation 2 and extracted the source code (if not, see Download and Install), change into the directory with the console and run:

 $ scons

If all goes well, it should build the glob2 binary at the end of the process. You can safely ignore all the warnings it gives.

Before Running

Once compiled, you'll need to run the following at the Globulation 2 source root to get the game working. Not sure why this is necessary yet (sources indicate Globulation 2 source needs altering).

 $ ln -s /opt/local/lib/libboost_thread-mt.dylib
Misc