working Xcode project and OS X dev questions

working Xcode project and OS X dev questions

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Sharkey
Posts: 11
Joined: 04 Jan 2008, 17:42

working Xcode project and OS X dev questions

Post by Sharkey »

I would like to help out with the development of Spring for OS X. So, I checked out the trunk from the SVN but it seems the Xcode project in the SVN is extremely out of date and does not build correctly (over 2000 errors!?). Also the documentation in the OS X tree is seriously out of date and may actually be totally useless (won't help with building correctly).

However, reading through the previous posts in this forum thread, it seems that some developers were able to get their Spring XCode project to build.


Is there a working Spring Xcode project that will build with the current SVN trunk? If so, where can I get it?

If not, is there a HOWTO document that details, step by step, how to create a working Xcode project or is there a document on how to change the current (broken) Xcode project into a working Xcode project?


Is there an official Spring OS X Developers group? Perhaps that may be necessary to coordinate everyone's work with the OS X source tree. Also, having such a group would be good to coordinate the documentation for getting the SVN OSX source tree to build correctly.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: working Xcode project and OS X dev questions

Post by imbaczek »

i think your best bet is to use cmake's XCode generator.

AFAIK there's no one actively maintaining OSX port of spring, so there isn't much to coordinate for now.
Krysole
Posts: 9
Joined: 26 Nov 2005, 06:44

Re: working Xcode project and OS X dev questions

Post by Krysole »

Afaik they've only been changed maybe once or twice since I created them originally, but I more or less became absent after that (~2 years back).

I'd rebuild them but I don't think it would help since I don't have an up to date mac anymore anyway (I wouldn't be able to test a universal build properly, or XCode/Leopard and the machine is ridiculously slow).

So yes, try the CMake method and just ignore the existing files. Otherwise you'll need to figure out yourself what's changed since they were last updated.

There has never been an official Mac team, just a few individuals attempting the port. I believe there is no active mac porting effort atm, but there is a few people who have been looking at it. The last few pages in the Mac port thread should give you a better idea of the state of the mac version (ignoring the xcode issues of course).
Sharkey
Posts: 11
Joined: 04 Jan 2008, 17:42

Re: working Xcode project and OS X dev questions

Post by Sharkey »

Krysole,

If I use cmake, I suppose I have to make sure that I can get Spring to compile on my Windows workstation first and then at that point run cmake to create the XCode project file?

What version of XCode are you running?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: working Xcode project and OS X dev questions

Post by hoijui »

..no.. you dont have to do anything on windows.
on your mac, install cmake, and let it generate the makefile.
you will need a lot of libraries (most may come with your os already) but maybe the cmake scripts of spring have to be adjusted to find them.. once you finnished generating with cmake without errors, you can compile with the generated XCode project file.. or whatever that it generates.

when you have installed cmake, run cmake in the terminal, and it will list the availabe generators. then you go to your spring source directory, and issue something like this:

Code: Select all

cmake CMakeLists.txt -G "XCode"
and you will get errors most likely, which you have to solve.

thats how i did it on linux at least ;-)
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: working Xcode project and OS X dev questions

Post by Auswaschbar »

hoijui wrote:..no.. you dont have to do anything on windows.
on your mac, install cmake, and let it generate the makefile.
you will need a lot of libraries (most may come with your os already) but maybe the cmake scripts of spring have to be adjusted to find them.. once you finnished generating with cmake without errors, you can compile with the generated XCode project file.. or whatever that it generates.

when you have installed cmake, run cmake in the terminal, and it will list the availabe generators. then you go to your spring source directory, and issue something like this:

Code: Select all

cmake CMakeLists.txt -G "XCode"
and you will get errors most likely, which you have to solve.

thats how i did it on linux at least ;-)
Or you could use the cmake GUI which should also work on OS X.
It gives you an overview of all the available options and allows you to adjust the paths more user-friendly(tm).
Sharkey
Posts: 11
Joined: 04 Jan 2008, 17:42

Re: working Xcode project and OS X dev questions

Post by Sharkey »

Are you all saying I must use cmake on my Mac, in order to generate the Xcode project?

If so, why can't I use cmake on my Windows workstation, to generate the Xcode project?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: working Xcode project and OS X dev questions

Post by hoijui »

well..
does XCode exist for windows? you want to use it on windows? for editing only?
what exactly do you want to do?
you can not cross generate a makefile (eg generate on windows nad use on mac). the generated makefile will ocntain a lot of absolute paths, and cmake will check for existance of libraries during generation.
so if you want to generate something tha you will use on a mac, you will have to generate it on a mac. and if you want to use XCode on windows, as an editor, or fro cross compiling... that may not be possible with cmake, or you could get problems at least, i guess.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: working Xcode project and OS X dev questions

Post by imbaczek »

Sharkey wrote:Are you all saying I must use cmake on my Mac, in order to generate the Xcode project?

If so, why can't I use cmake on my Windows workstation, to generate the Xcode project?
I don't know. I'd use the development machine to generate project files, since it makes sense.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: working Xcode project and OS X dev questions

Post by Tobi »

AFAIK cmake can only generate project files for the platform it's running on. So no xcode project files on Windows and no Visual Studio project files on Mac and Linux.
Sharkey
Posts: 11
Joined: 04 Jan 2008, 17:42

Re: working Xcode project and OS X dev questions

Post by Sharkey »

Thanks for the clarification about cmake.

OK. So to run cmake to generate an XCode Project, I must _first_ make sure all the libraries (boost, ogg/vorbis, etc) are installed on my Mac.

Is there an accurate/definitive list of libraries that are necessary to have installed, for successfully compiling and linking Spring, on using Visual Studio 2005? If so where can I get that list of libraries and their correct version numbers?
Post Reply

Return to “Engine”