Difference between revisions of "Compiling using Xcode"

From OdaWiki
(Opening the project)
Line 22: Line 22:
  
 
Links to the SDL & SDL_mixer frameworks can be found on the [[Required Libraries]] page.  You will want to grab the binary installation packages.  The framework directories found in both disk images should be copied either to /Library/Frameworks or to USER/Library/Frameworks, where USER is your username on your machine.  The second location is for users who want the frameworks to only be available locally or do not have access to install frameworks globally.
 
Links to the SDL & SDL_mixer frameworks can be found on the [[Required Libraries]] page.  You will want to grab the binary installation packages.  The framework directories found in both disk images should be copied either to /Library/Frameworks or to USER/Library/Frameworks, where USER is your username on your machine.  The second location is for users who want the frameworks to only be available locally or do not have access to install frameworks globally.
 +
 +
== Compiling the Launcher on Mac OS X ==
 +
This is a bit messy (at least for me), and requires some tinkering about in places that not all people like to deal with.  It's so much easier when it's just "open project, choose target, click build"...  Too bad we don't quite have that luxury (although I imagine it isn't that hard to actually make it work.
 +
 +
Anyway, I've managed to do this (and I think as a universal binary) by doing the following:
 +
(wiki's are not my strong part.. sorry)
 +
 +
 +
download wxWidgets.
 +
unpack, and build wxWidgets as follows:
 +
<pre>
 +
cd /path/to/wxwidgets-source
 +
mkdir osx-build
 +
cd osx-build
 +
../configure --disabled-shared --enable-universal-binary
 +
make
 +
</pre>
 +
And... go get lunch
 +
 +
 +
Now, on to odalaunch:
 +
Because of a runtime crash involving list coloring, you need to edit
 +
src/dlg_main.cpp.
 +
comment out line 276:
 +
<pre>//SERVER_LIST->ColourListItem(i);</pre>
 +
 +
 +
 +
In the odamex/odalaunch directory, edit the makefile:
 +
fix the following for OS X (and somewhat specific to your install):
 +
<pre>WXBASE = /path/to/wxMac-2.8.0/osx-build
 +
WXCONFIG = $(WXBASE)/wx-config
 +
WXRC = $(WXBASE)/utils/wxrc/wxrc
 +
CFLAGS = $(shell $(WXCONFIG) --cflags) -g -arch ppc -arch i386
 +
</pre>
 +
adding the above -arch flags enables the thing to build a universal binary (hopefully)
 +
run: "make"
 +
 +
 +
When all is done and said, you should now have a odalaunch.app.  It's a bit unstable, but it appears to work.  Your milage may vary.

Revision as of 18:50, 24 February 2007