Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: Echelon9 on April 01, 2012, 12:25:03 am

Title: Xcode4 project file and SDL.framework 1.2.15
Post by: Echelon9 on April 01, 2012, 12:25:03 am
As of revision 8638 (http://svn.icculus.org/fs2open?view=rev&revision=8638), there is now a dedicated Xcode 4.x project file and an updated SDL.framework (to 1.2.15 (http://www.libsdl.org/release/changes-1.2.html)) in order to more fully support Mac OS 10.7.

The updated SDL.framework was required to resolve some bugs on Mac OS X 10.7, that Master_Drow reported during Diaspora testing.

Thanks to Valathil for the base of the Xcode 4.x project file.
Title: Re: Xcode4 project file and SDL.framework 1.2.15
Post by: Admiral LSD on April 02, 2012, 09:23:02 pm
Just saw this when I was browsing the SVN log this morning. I can't say I was having any major issues using the old project to compile under Xcode 4, but at the same time I wasn't really doing any exhaustive testing. One thing I did notice though was that all the compilation schemes are set for 32-bit. Are there any major issues preventing these from being set to 64 or 32/64 in the Xcode 4 project? Lion doesn't support PowerPC (It won't even cross-compile like you kinda sorta could on SL, the PPC toolchain is completely absent from Xcode 4) or 32-bit Intel Macs it seems a little odd to hamstring it like that...
Title: Re: Xcode4 project file and SDL.framework 1.2.15
Post by: Echelon9 on April 03, 2012, 06:52:55 am
Just saw this when I was browsing the SVN log this morning. I can't say I was having any major issues using the old project to compile under Xcode 4, but at the same time I wasn't really doing any exhaustive testing. One thing I did notice though was that all the compilation schemes are set for 32-bit. Are there any major issues preventing these from being set to 64 or 32/64 in the Xcode 4 project? Lion doesn't support PowerPC (It won't even cross-compile like you kinda sorta could on SL, the PPC toolchain is completely absent from Xcode 4) or 32-bit Intel Macs it seems a little odd to hamstring it like that...

Major issue was that fullscreen wasn't working on 10.7.

Yeh, I'm not sure about 64bit on Mac (*nix underneath) being as easy as flicking a switch in Xcode. I've heard on the forums here that one or two has got 64 compile working, but I've never reviewed an Xcode project file that I could use to do the same.

Want to take a look at it Admiral LSD?
Title: Re: Xcode4 project file and SDL.framework 1.2.15
Post by: Admiral LSD on April 16, 2012, 12:35:40 am
Major issue was that fullscreen wasn't working on 10.7.

Can't say I noticed that (I did notice some "sparkling" on exit, there'd be a delay between exiting the game and the desktop reappearing where the screen would be black save from some minor pixel noise, but nothing really major), but I can't say I was really looking that hard...

Quote
Yeh, I'm not sure about 64bit on Mac (*nix underneath) being as easy as flicking a switch in Xcode. I've heard on the forums here that one or two has got 64 compile working, but I've never reviewed an Xcode project file that I could use to do the same.

Funny thing is, I'm pretty sure that's all it is. You change "32-bit Intel" in the "Architectures" section of the project for each target (I get the idea it's supposed be a "set once, update everwhere" type deal, but that has never worked reliably in any of the projects I've opened in it...) to "Standard 32/64-bit Intel" and that seems to be it.

Beyond that, you also need x86/x86_64 compiled versions of the dependent frameworks, but I've already taken care of that if you want to save yourself the trouble of compiling them yourself. I'm wondering if this is why you didn't change it when you were modifying the Xcode project files for r8671:

Code: [Select]
------------------------------------------------------------------------
r8671 | Echelon9 | 2012-04-15 14:20:56 +0800 (Sun, 15 Apr 2012) | 1 line

Ensure that the Xcode 4 project file can build Mac binaries for OS X 10.6, as well as 10.7
------------------------------------------------------------------------

Anyway, I have some builds I could throw out for testing if you'd like. I can't offer any support for them myself, so I won't throw them out there if you won't be able or don't want to handle any additional support queries related to them.
Title: Re: Xcode4 project file and SDL.framework 1.2.15
Post by: Echelon9 on April 16, 2012, 07:50:41 am
There's the step of switching the Architecture in Xcode, then further testing that subtle things like pointer math, the size of various fundamental types (int, long etc) other implicit assumptions

Okay, so we've got 64 bit Mac compiling setup now: see here (http://www.hard-light.net/forums/index.php?topic=82305.0).