Spring on MacOSX

Because all needed libraries are available for OSX as well, you can compile a working version of Spring for Mac. But Unitsync will only work between Intel Macs and PCs, but not between those and PPC, and due to Apple's switch from PPC to Intel and due to the astronomical amount of effort it would take to to make them sync, there is no PPC port under development.

There's also a working lobby client for Mac OSX, follow the instruction below to compile it.

Contents

Install Spring from source on an Intel Mac

The following guide was created and tested in a 2,53 Ghz 13" MacBook Pro, 4 GB RAM Nvidia GeForce 9400M and a MacPro Xenon Quadcore ATI Radeon HD 4870, both with Snow Leopard (10.6).

Dependencies:

You will need the following dependencies to compile:

Programs necessary to build
   * Xcode Tools
   * cmake (included in Xcode tools)
   * zip
   * p7zip
Libraries
   * SDL
   * boost (version 1.35 or later recommended)
   * DeviL (IL, ILU)
   * OpenAL (comes with Xcode tools)
   * OpenGL headers (mesa, glew, etc.) (comes with Xcode tools)
   * zlib
   * freetype
   * ogg,vorbis and vorbisfile 
   * Python (2.5) 
   * glew

Installing the Dependencies

Firstly, download the Xcode Development Tools from Apple or install them from your OSX DVD: http://developer.apple.com/technology/xcode.html (you will need to register, but its free of charge)

Then download and install Macports (http://www.macports.org) You need to be administrator to complete the following. Open the Terminal and copy and paste the first command and wait until it is completed, continue one-by-one with the others (you may be asked for the admin password each time).

sudo port install cmake
sudo port install libsdl
sudo port install libsdl-framework
sudo port install boost
sudo port install glew
sudo port install boost-jam
sudo port install libpng
sudo port install jpeg
sudo port install tiff
sudo port install libogg
sudo port install libvorbis
sudo port install python25
sudo port install libdevil
sudo port install p7zip

This will take some time and disk space, but should complete without problems. If you experience any errors, download the dependencies' source and compile it.

Fixes

Download the latest spring source from the download page. If you try to compile now, you will experience some errors, and therefore you will have to apply these patch files:

https://trac.macports.org/attachment/ticket/23556/patch-file-extension.diff https://trac.macports.org/attachment/ticket/23556/platform-misc-cpp.diff

cd into the source directory and execute

patch -p 0 < patch-file-extension.diff

patch -p 0 < platform-misc-cpp.diff

Compiling:

Open the Terminal, change into the Spring source folder (e.g.: "cd Desktop/spring_0_80_5_2/") and follow the instructions below: (You will be asked for the admin password)

type "cmake ." (the dot and the gap is important)
type "make" (this will take some time)
type "sudo make install"

After the above commands have finished, check "/usr/local/share/games/spring/AI/Interfaces/C/0.1/" to see if the files there end with '.so' or '.dylib'. If they are named .so you will get an error message when using AI bots. Run this command to rename all .so files to .dylib:

for X in `find /usr/local/share/games/spring/ -name "*.so"`; do sudo mv $X ${X/.so/.dylib}; done;

Result

Now, you have a a Unix Executable File called "spring" in your source directory and a "spring" directory in "usr/local/share/games/" (you need to make hidden folders visible to see it). Create a folder called "maps" and a folder called "mods" there. (This is where Spring will check for maps/mods). You can double click on the spring file (mod+map needed) and test if everything is alright.

Compiling the Lobby

You will need to get a lobby client (e.g.: SpringLobby: http://springlobby.info) and the dependencies to compile it from source following this guide: http://springlobby.info/projects/springlobby/wiki/InstallFromSource This Chapter will be extended soon.

--Grapefruit 11:08, 4 December 2009 (UTC)

Scripting the MacPorts dependencies


Notwithstanding what appears above, not each command need be executed separately.

Make a file (perhaps do_install.sh). Put it on your desktop. Cut and paste all the commands into it. Go into the terminal, and change to the Desktop directory. Execute:

chmod +x do_install.sh
sudo ./do_install.sh


It takes quite a long time to do it any other way.

Retrieved from "http://springrts.com/wiki/Spring_on_MacOSX"

This page has been accessed 16,696 times. This page was last modified 04:23, 18 April 2010.


 
 

Page editing toolbox

Browse
Main Page
Community portal
Current events
Recent changes
Random page
Help
Donations
Edit
View source
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Log in
Special pages
New pages
File list
Statistics
Bug reports
More...

Site layout created by Roflcopter.