Author Topic: Newbie: compiling with Xcode 6 on Yosemite  (Read 2890 times)

0 Members and 1 Guest are viewing this topic.

Newbie: compiling with Xcode 6 on Yosemite
Hello all,

Newbie to FS2Open here. I'm trying to compile FS2Open using Xcode 6 under Yosemite. I downloaded the source using git according to the instructions contained at http://www.hard-light.net/wiki/index.php/Mac_Development_Guide  but then I'm seeing two different folders containing Xcode projects (under fs2open/projects): an Xcode folder and an Xcode4 folder, which one should I use?  I've tried to compiling either and both of them are giving me errors, so would like to know which one to concentrate :-)

Reason I'm trying to compile my own version is that I bought Freespace 2 at GOG, downloaded FS2 3.7.2 using the Java installer but when I try to run FS2, either my screen becomes completely black or it crashes. I am suspecting that the binary available is not correctly compiled for Yosemite. 

I'm not afraid of source code nor debugging big systems, but this would probably be my first approach to Mac programming in many years, so it will be a very interesting learning curve.

In case it matter, my machine is a MacBook Air 2013 with an Intel HD Graphics 5000 video chipset. Any pointer will be appreciated.


 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Newbie: compiling with Xcode 6 on Yosemite
Xcode4 is really Xcode4+.  The other was the original for Xcode 3, and will probably be abandoned soon.  You need to extract the Frameworks.tgz in the Xcode4 folder.  Then you can just run "xcodebuild" in the project folder and it should compile fine.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Newbie: compiling with Xcode 6 on Yosemite
Thanks for the very fast response, I tried what you suggested and was able to compile a debug version with no problem, thanks!

Now...I'm still seeing the same behavior as before with 3.7.2 (this is 3.7.3), meaning, the screen becomes completely black and nothing else happens.

Are there any known limitations with the Intel HD 5000 video chipset in my Macbok Air (meaning is not supported) before I try to sit down to track done the problem?


Xcode4 is really Xcode4+.  The other was the original for Xcode 3, and will probably be abandoned soon.  You need to extract the Frameworks.tgz in the Xcode4 folder.  Then you can just run "xcodebuild" in the project folder and it should compile fine.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Newbie: compiling with Xcode 6 on Yosemite
Yeah I hoped my response was clear enough, typed it on my phone so it was a bit rushed.  Now I'm at my Macbook Pro proper.  The Intel series in general does have some issues with OpenGL, especially since we're not on the Core Profile yet on OS X.  I mean to do what I can to help get 10.10 support in shape as soon as I get my new MacBook Pro at work, right now I'm on Mountain Lion on a late 2011 model.  Still has Intel though, but the game runs ok for me on 3.7.2 and master.  The Intel in the Air is probably even weaker of a card though, with regards to OpenGL.  Make sure you have the 10.10.3 system update.  Also, you might try to add Swifty's fork as a remote and attempt to compile his shadows_transform_deferred branch, and see if that helps or hurts the situation.

Also, there are some various graphics debugging options available, if you're using wxLauncher you should be able to toggle them easily.  Most of them stand out as being obviously graphics related, but you might try disabling most of the things under the Graphics section to start, disabling sound and music, disabling video playback, OpenGL VBO, disabling IBX, render targets, PBO, GLSL (that's a big one), etc.  I also recommend setting it at 1024x768 and running in windowed mode.

Additionally, you could post your debug log found at ~/Library/FS2_Open/data/fs2_open.log which can help shed some light on what went wrong.

Can you describe what happens besides being completely black?  How do you manage to terminate the program?  Just hitting Escape?  There is no sound in the background?

I posted my ideas as they came to me, but really if you read this far into the post you should probably attempt them in reverse order.  I'm too lazy to rewrite this in the correct ease of implementation order.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Echelon9

  • 210
Re: Newbie: compiling with Xcode 6 on Yosemite
Hi pnwkayaker,

I'm one of the other FS2Open developers who is familiar with OS X. Suggest that you go through chief1983's suggestions and post results, in particular from the fs2open.log file.

We can work with you from there to see what the issue is and how to go about resolving it for you.

 
Re: Newbie: compiling with Xcode 6 on Yosemite
Thanks to all - I'm away from my computer for a couple of days (camping), will go through all the suggestions when I return

 
Re: Newbie: compiling with Xcode 6 on Yosemite
OK, I mentioned I'm a newbie in FS2 (and FS2Open too) - I was not able to find the above mentioned log files in the specified location, so I played with the advanced settings and found that it was possible to run FS2 in windowed mode *with* a debug window and without capturing the mouse/keyboard. 

Once i did that, I learned that FS2Open was not able to find the FreeSpace files in the FS2Open location - I had loaded FS2Open in a "fs2_open_3.7.3" subfolder under the main FreeSpace folder. Once I moved the binary up one level (to the main FreeSpace location) that game was able to start correctly.

Question: is there any documentation about the FreeSpace architecture, like a newbie guide to hack/contribute to FreeSpace?  Depending how hooked I end up, I may want to contribute back (probably chasing some bugs).

Thanks a lot for your help!  Now, if you excuse me, I have some missions to play :-)


 

Offline Echelon9

  • 210
Re: Newbie: compiling with Xcode 6 on Yosemite
In the most literal sense, we have some pre-selected 'Newbie Projects' to start contributing to the source code.

There's also a larger section on the Freespace 2 Wiki here, plus the stickied threads on these forums.

We can also point you in the right direction or assist on our IRC channel.

 
Re: Newbie: compiling with Xcode 6 on Yosemite
Thanks for the Wiki link, will start reading the documentation there