Difference between revisions of "Running Oolite-Mac"

From Elite Wiki
(Building Oolite from source)
Line 13: Line 13:
  
 
=== Development Environment (Xcode) ===  
 
=== Development Environment (Xcode) ===  
To start, you will need Mac OS X 10.5 or later and Xcode tools 3.2 or later from the [http://connect.apple.com/ Apple Developer Connection] or your Mac OS  install DVD. You will need an ADC membership to obtain download Xcode; however, the free online membership is sufficient. You will also need to ensure you have installed the Mac OS X 10.4 Universal SDK, which is available through the Xcode Tools installer. Lastly, you will require the Subversion version control tool; an up-to-date binary is available [http://downloads.open.collab.net/binaries.html here].
+
To start, you will need Mac OS X 10.5 or later and Xcode tools 3.2 or later from the [http://connect.apple.com/ Apple Developer Connection] or your Mac OS install DVD. You will need an Apple Developer Connection membership to obtain download Xcode; however, the free online membership is sufficient. You can register [http://developer.apple.com/programs/register/ here]. You will also need to ensure you have installed the Mac OS X 10.4 Universal SDK, which is available through the Xcode Tools installer. Lastly, you will require the Subversion version control tool; an up-to-date binary is available [http://downloads.open.collab.net/binaries.html here].
  
 
=== Getting the Source ===
 
=== Getting the Source ===
  
The source code and data files are available from [http://developer.berlios.de/projects/oolite-linux/ the oolite-linux BerliOS project]. Don't be confused by the name 'oolite-linux'; the repo is called that because it’s where the repository moved after [[GUSTO]] was complete. The SVN url for 1.65 is:
+
The source code and data files are available from [http://developer.berlios.de/projects/oolite-linux/ the oolite-linux BerliOS project]. Don't be confused by the name 'oolite-linux'; at one point there were three separate repositories for Oolite, but the Linux one was where they ended up being merged together. The SVN url for 1.65 is:
  
 
  svn://svn.berlios.de/oolite-linux/tags/v165-final
 
  svn://svn.berlios.de/oolite-linux/tags/v165-final
 +
 +
1.74.2 is:
 +
svn://svn.berlios.de/oolite-linux/tags/1.74.2
  
 
You can also get the latest work-in-progress from:
 
You can also get the latest work-in-progress from:
Line 29: Line 32:
 
  svn checkout svn://svn.berlios.de/oolite-linux/trunk
 
  svn checkout svn://svn.berlios.de/oolite-linux/trunk
  
It is not possible to connect with svn+ssh unless you have a berlios shell (unix) account and are added to the project.
+
If you have a BerliOS account and are a project member, you can get it with:
  
  svn checkout svn+ssh://developername@svn.berlios.de/svnroot/repos/oolite-linux/trunk
+
  svn checkout svn+ssh://''accountname''@svn.berlios.de/svnroot/repos/oolite-linux/trunk
  
Developers should also checkout the relevant maintenance branch (assuming we are in a suitable folder like /sandbox/oolite/:
+
Developers should also checkout the relevant maintenance branch:
  
  svn checkout svn+ssh://developername@svn.berlios.de/svnroot/repos/oolite-linux/branches/version-maintenance/ ./branches/version-maintenance/
+
  svn checkout svn+ssh://''accountname''@svn.berlios.de/svnroot/repos/oolite-linux/branches/1.74-maintenance/
  
 
=== Building Oolite ===
 
=== Building Oolite ===
Now that you have the source, and an IDE to work in, we are ready to build the code and run.
+
For a trunk build, you can now open Oolite.xcodeproj, switch the target from “Build All” to “Oolite”, and build a basic version of Oolite. In this case, the Debug OXP and joystick support will not be included. To build the “Build All” target, which includes these, you must install the [http://www.brockerhoff.net/src/rbs.html RBSplitView Interface Builder plug-in] must be installed. (To install it, simply put it somewhere tidy and open it; Interface Builder should load and register the plug-in.) '''Important:''' due to an unfortunate change between versions, you must use the 1.1.4 version of the RBSplitView IB plug-in, ''or'' use 1.2 but change its bundle identifier from <code>net.brockerhoff.RB'''S'''plitView.IBPlugin</code> to  <code>net.brockerhoff.RB'''s'''plitView.IBPlugin</code>.
To build the trunk, you will need to install some additional files. First, you will need the source release of [http://libpng.org/pub/png/libpng.html libpng]. This will decompress as a folder called “libpng-1.4.5” or similar. Rename it to “libpng” and move it to deps/Cross-platforms-deps in the Oolite repository. Additionally, in order to build and use the [[Debug OXP]] in the Development configuration, the [http://www.brockerhoff.net/src/rbs.html RBSplitView Interface Builder plug-in] must be installed. (To install it, simply put it somewhere tidy and open it; Interface Builder should load and register the plug-in.) '''Important:''' due to an unfortunate change between versions, you must use the 1.1.4 version of the RBSplitView IB plug-in, ''or'' use 1.2 but change its bundle identifier from <code>net.brockerhoff.RBSplitView.IBPlugin</code> to  <code>net.brockerhoff.RB'''s'''plitView.IBPlugin</code>.
 
 
 
'''Note:''' At the moment, there is a second Xcode project called “Oolite-newjs.xcodeproj”, which is designed to build with an up-to-date version of the SpiderMonkey JavaScript engine. This project will download libpng automatically, so you can skip that step. The newjs project is extra-experimental, i.e. at the time of writing it doesn’t work. Have fun!
 
  
 +
For 1.74.x and earlier versions, you must download the source release of [http://libpng.org/pub/png/libpng.html libpng]. This will decompress as a folder called “libpng-1.4.5” or similar. Rename it to “libpng” and move it to deps/Cross-platforms-deps in the Oolite repository. The trunk project now does this automatically. The stuff about RBSplitView above still applies.
  
 
These steps do not need to be repeated after updating the repository using the <code>svn update</code> command.
 
These steps do not need to be repeated after updating the repository using the <code>svn update</code> command.
  
It should now be possible to build Oolite. The project contains three targets: Build All, Oolite and libpng-custom. The Oolite target will build the Oolite application and Spotlight indexer. The Build All target will build the Oolite target, and also the Debug.oxp subproject, and copy Debug.oxp into the AddOns folder in the build results folder. The libpng-custom target builds libpng and is automatically built by the Oolite target, so it shouldn’t need to be touched directly.
+
Building the Build All target (in trunk) will result in the following being created in the build results folder: AddOns, Debug.oxp, include (with subfolders js, ogg and vorbis), libjs_for_oolite.a, libnspr4_for_oolite.a, libogg_for_oolite.a, libpng_for_oolite.a, Oolite.app, Oolite Leopard Support.bundle and Oolite.mdimporter. AddOns contains a copy of Debug.oxp. Oolite.app contains a copy of Oolite Leopard Support.bundle ansd Oolite.mdimporter, and static libraries (.a files) are linked into the Oolite executable. Everything except Oolite.app and AddOns can be considered side effects of the build process.
 
 
Building the Build All target will result in the following being created in the build results folder: AddOns, Debug.oxp, libjs.a, libpng.a, Oolite.app (or OoliteDev.app for the Development configuration) and Oolite.mdimporter. AddOns contains a copy of Debug.oxp. Oolite.app contains a copy of Oolite.mdimporter, and libjs.a and libpng.a are linked into the Oolite executable. Debug.oxp, libjs.a, libpng.a and Oolite.mdimporter can thus be considered side effects of the build process. Building the Oolite target produces libjs.a, libpng.a, Oolite.app or Oolitedev.app and Oolite.mdimporter, but not AddOns and Debug.oxp.
 
  
 
[[Category:Oolite]] [[Category:Factual]]
 
[[Category:Oolite]] [[Category:Factual]]

Revision as of 22:38, 31 December 2010

Overview

Oolite was originally developed for OS X, and as such, OS X is Oolite's home operating system. The OS X version can be considered the reference version for all other ports. It has some specific Mac OS X only support such as speech synthesis, iTunes integration and Growl integration. Joysticks are not directly supported - however, there are programs that convert joystick inputs into mouse and keyboard inputs, and these programs are reported to work well with Oolite.

Getting and installing the game

You can get the most recent release of the game from BerliOS.

Installation is the standard method of dragging the Oolite folder to your Applications or Games folder.

Installing OXPs (add ons)

In the Oolite folder that you dragged from the disk image, you will find an Oolite application and an AddOns folder. Place OXPs in the AddOns folder, and they will be loaded the next time you start the game.

Building Oolite from source

Development Environment (Xcode)

To start, you will need Mac OS X 10.5 or later and Xcode tools 3.2 or later from the Apple Developer Connection or your Mac OS install DVD. You will need an Apple Developer Connection membership to obtain download Xcode; however, the free online membership is sufficient. You can register here. You will also need to ensure you have installed the Mac OS X 10.4 Universal SDK, which is available through the Xcode Tools installer. Lastly, you will require the Subversion version control tool; an up-to-date binary is available here.

Getting the Source

The source code and data files are available from the oolite-linux BerliOS project. Don't be confused by the name 'oolite-linux'; at one point there were three separate repositories for Oolite, but the Linux one was where they ended up being merged together. The SVN url for 1.65 is:

svn://svn.berlios.de/oolite-linux/tags/v165-final

1.74.2 is:

svn://svn.berlios.de/oolite-linux/tags/1.74.2

You can also get the latest work-in-progress from:

svn://svn.berlios.de/oolite-linux/trunk

To download the source with Subversion, the quickest way to do it is to open a Terminal window, and run the following command:

svn checkout svn://svn.berlios.de/oolite-linux/trunk

If you have a BerliOS account and are a project member, you can get it with:

svn checkout svn+ssh://accountname@svn.berlios.de/svnroot/repos/oolite-linux/trunk

Developers should also checkout the relevant maintenance branch:

svn checkout svn+ssh://accountname@svn.berlios.de/svnroot/repos/oolite-linux/branches/1.74-maintenance/

Building Oolite

For a trunk build, you can now open Oolite.xcodeproj, switch the target from “Build All” to “Oolite”, and build a basic version of Oolite. In this case, the Debug OXP and joystick support will not be included. To build the “Build All” target, which includes these, you must install the RBSplitView Interface Builder plug-in must be installed. (To install it, simply put it somewhere tidy and open it; Interface Builder should load and register the plug-in.) Important: due to an unfortunate change between versions, you must use the 1.1.4 version of the RBSplitView IB plug-in, or use 1.2 but change its bundle identifier from net.brockerhoff.RBSplitView.IBPlugin to net.brockerhoff.RBsplitView.IBPlugin.

For 1.74.x and earlier versions, you must download the source release of libpng. This will decompress as a folder called “libpng-1.4.5” or similar. Rename it to “libpng” and move it to deps/Cross-platforms-deps in the Oolite repository. The trunk project now does this automatically. The stuff about RBSplitView above still applies.

These steps do not need to be repeated after updating the repository using the svn update command.

Building the Build All target (in trunk) will result in the following being created in the build results folder: AddOns, Debug.oxp, include (with subfolders js, ogg and vorbis), libjs_for_oolite.a, libnspr4_for_oolite.a, libogg_for_oolite.a, libpng_for_oolite.a, Oolite.app, Oolite Leopard Support.bundle and Oolite.mdimporter. AddOns contains a copy of Debug.oxp. Oolite.app contains a copy of Oolite Leopard Support.bundle ansd Oolite.mdimporter, and static libraries (.a files) are linked into the Oolite executable. Everything except Oolite.app and AddOns can be considered side effects of the build process.