OpenXcom Forum

Contributions => Builds & Ports => Topic started by: luciderous on November 28, 2010, 12:27:42 pm

Title: Compiling on Mac OS X Lion with Xcode 4 template
Post by: luciderous on November 28, 2010, 12:27:42 pm
THIS GUIDE IS NOW OBSOLETE! FOLLOW NEW INSTRUCTIONS INSTEAD - https://www.ufopaedia.org/index.php?title=Compiling_with_Xcode_(OpenXcom) (https://www.ufopaedia.org/index.php?title=Compiling_with_Xcode_(OpenXcom))

---
Get Xcode 4.1 template with all the dependencies included here - https://www.mediafire.com/?i2xqyuinubd6bp6

Easy compilation guide (Note that for readability's sake '/' means the template's root folder, not your system root):

1. Run Xcode, open Organizer, add the Project's Git Repository (https://github.com/SupSuper/OpenXcom.git) and clone it (save with a "OpenXcomGit" name).
2. Add source folder (/OpenXcomGit/src) to your project tree (! choose "Create groups for any added folders").
3. Remove all the irrelevant project files from project tree: Makefile, resource.h, all the Visual Studio files etc., when asked choose "Delete References".
4. Copy all the original XCOM folders/files into (/OpenXcomGit/bin/DATA) folder.
5. Right-click on "Supporting Files" in the project tree and add "/OpenXcomGit/bin/DATA" folder there (! choose "Create folder references for any added folders")
6. Build & Run! Enjoy!

Dependencies included:
SDL-1.2.14 (official pkg)
SDL_mixer-1.2.11 (official pkg)
SDL_gfx-2.0.22 (built myself since no official pkg has been released, "Deployment Target" = 10.5)
yaml-cpp--0.2.6 (built framework myself, "Deployment Target" = 10.6)

P.S. Here is a precompiled binary (constantly updated), created by following the aforementioned step-by-step guide.
v. 0.3 (9c322148c536) - https://www.mediafire.com/?8359p5iqr12wg5e
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: panther on December 05, 2010, 10:20:39 pm
Hey, that is great news!

In fact, I was toying with the idea to contribute.
Is there a current list of ToDo items, where would I start looking?
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: michal on December 06, 2010, 04:23:31 pm
I guess best way to start contributing(some bigger stuff than simple bugfixes) would be entering irc channel and talk to SupSuper or Daiky. Here are details how to enter irc:
https://openxcom.ninex.info/forum/index.php?topic=63.0

Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: SupSuper on December 07, 2010, 04:47:20 am
There's no ToDo list, but you can always look around the forum for any pending issues for look around the code for anything that might need fixing or just bugs you. :P
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: michal on December 08, 2010, 11:04:18 am
Or implement ufopaedia ;)
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: panther on December 08, 2010, 08:54:03 pm
OK, thank you all for the info. I will get OpenXCom to work and study the code base.
Then look for a development target.
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: panther on December 15, 2010, 12:13:55 am
Well, thank you marabus! Following your instructions I was able to build OpenXCom on my Mac!  8)

I already started browsing the source and gathering information on Ufopedia, so I would be glad to join the team and implement Ufopedia as michal suggested.
If this is ok, I would start a new thread here to post about progress, etc.
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: michal on December 15, 2010, 01:32:58 pm
If this is ok, I would start a new thread here to post about progress, etc.

Please do it :)
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: luciderous on January 06, 2011, 04:46:10 pm
Updated the template to include new dependency - YAML.
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: ailas on July 22, 2011, 11:35:15 am
Hi, I was trying to compile openxcom on Mac OSX 10.6.8 with Xcode 3.2.6 (x86_64 arch) according your information from first post, but it failed with some "BeginDoc" and "Binary" errors (it says it's not part of YAML). You can see more on this screen shot https://dl.dropbox.com/u/3321305/Screen%20shot%202011-07-22%20at%209.49.16%20AM.png (https://dl.dropbox.com/u/3321305/Screen%20shot%202011-07-22%20at%209.49.16%20AM.png) So i tried compile yaml-ppc 0.2.6 (I found there is BeginDoc in header files) myself with cmake etc.. but don't know how to add it in project/your template as a framework. I also found https://github.com/mirek/YAML.framework but there is no "BeginDoc" in header files also.  Can you please help me with that?
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: luciderous on July 22, 2011, 10:31:39 pm
I'm ashamed to admit, but I've been somehow neglecting my duties on this thread for the last several months due to real life reasons. Thus, I'll have to catch up with the latest developments myself first. Please, bear with me on this one, I hope to give it a try during the next week. Of course, I'll post the results ASAP.
Title: Re: Compiling on Mac OS X Snow Leopard with Xcode template
Post by: grrussel on September 02, 2011, 11:18:41 pm
Hi, is there any further progress on the Xcode template dependencies - specifically, yaml? I'd like to get Xcode style OSX builds automated and nightly, like my nightly OSX builds (https://bitbucket.org/grrussel/openxcomosx) + which are more Unix/Linux in style.
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: luciderous on September 03, 2011, 10:19:01 pm
Project template & dependent frameworks updated for Lion and Xcode 4.
And the latest 0.3 binary is there as well  :D
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: SupSuper on September 04, 2011, 06:06:44 am
Thanks, I've put it up on the site. :) Btw you forgot the OpenXcom Data files so I added them myself.
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: luciderous on September 04, 2011, 11:33:01 am
Oh, you mean in the app bundle? Dammit  :-[
Thanks, anyway! I'll update my download link on the forum as well.
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: panther on September 30, 2011, 12:07:43 am
Thanks again for updating the references (YAML), worked like a charm although I'm still using XCode 3.2.6.
Actually I didn't even switch to Lion.  :-[
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: bbaarrtt on October 05, 2011, 10:18:29 pm
Hm, the builds posted on here seem to be 10.7 only. Any chance of a 10.6 build being uploaded? I'm having some issues building on my machine but I'd still love to give it a go.
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: luciderous on October 06, 2011, 08:44:37 am
Have you tried it under 10.6? It should definitely work.
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: bbaarrtt on October 06, 2011, 07:10:05 pm
Sorry, I was wrong. Not a 10.6 issue - it's a 64/32 issue. Core duo here, only 32. In other words, I guess: any chance of an i386 build? :)
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: luciderous on October 08, 2011, 03:34:35 pm
Well, possibly, but not at the moment I'm afraid, since I'm really swamped with my RL issues. You can still build it yourself using the guide if you like ))
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: gchevallereau on December 06, 2011, 12:02:50 am
I have one question, why the SDLMain.m file is not added to the OpenXcom source tree ? any reason ?
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: luciderous on December 08, 2011, 09:00:33 am
Well, for the most part it's because right now OSX build is unofficial. That's why there are also no other OSX-specific files in the source tree, like frameworks, for example. This build began as my hobbyist contribution and currently stays this way  ;)
Title: Re: Compiling on Mac OS X Lion with Xcode 4 template
Post by: SupSuper on December 08, 2011, 04:48:12 pm
Yeah I tried adding the Mac files myself to the codebase once and it just became a nasty mess so I never did it again. :P