2013-10-01

General Instructions for Recent Versions of OS X and Xcode:

← Older revision

Revision as of 18:06, 1 October 2013

(3 intermediate revisions not shown)

Line 1:

Line 1:

{{Compiling Wesnoth}}

{{Compiling Wesnoth}}

==  Introduction: Compiling Wesnoth on Mac OS X  ==

==  Introduction: Compiling Wesnoth on Mac OS X  ==

 

+

 

+

'''Note: A lot of the information on this page is rather outdated and many of the steps listed below or not necessary when using a recent version of OS X and Xcode.  See below for the Xcode-specific instructions.'''

Other than the generic Unix information on how to build at [[CompilingWesnoth]],

Other than the generic Unix information on how to build at [[CompilingWesnoth]],

Line 144:

Line 146:

== Build using XCode ==

== Build using XCode ==

 

+

 

+

=== General Instructions with Recent Versions of OS X and Xcode===

 

+

 

+

The exact instructions seems to vary a lot with the exact versions, but in general this method should work for OS X 10.6 and up, and Xcode 4 and up.  It might also work with previous versions of one or the other (or both), but I don't know that for sure.

 

+

 

+

# Make sure you have Xcode installed, the more recent a version the better

 

+

# Download and extract the [[WesnothRepository|Wesnoth Repository]] to a folder; we call this 'repo-dir/' in the following.

 

+

# Download [http://sourceforge.net/projects/wesnoth/files/unofficial/Mac%20Compile%20Stuff/ additional compilation material]. Copy its contents into repo-dir/projectfiles/Xcode/ . Make sure the directories contained the file (lib/ Headers/ ...) are directly under this directory.

 

+

 

+

That is all that should be required as far as installing packages is concerned.  All the rest is simply about making the Xcode build work.  Unfortunately, the details seem to depend a lot on the exact versions of both OS X and Xcode.  Things to try are:

 

+

# Open repo-dir/projectfiles/Xcode/Wesnoth.xcodeproj in Xcode.

 

+

# Try to build.  It will likely fail complaining about SDK, compiler or similar errors

 

+

# Change SDK to "OS X (latest version)" or something along those lines

 

+

# Change compiler to whatever Xcode comes with

 

+

# You ''might'' have to do these steps separately for both wesnothd and Wesnoth in the project file, and for both Debug and Release builds.

 

+

# Also, you might (or might not) have to build in 32-bit mode (not 64-bit).  I've had problems getting it to work in 64-bit mode before.

 

+

# Depending on the Xcode version, running Wesnoth from Xcode might not work even if the build succeeded.  In that case, locate the executable and start it from the commandline.

 

+

# Play with this for a while, read the error messages Xcode gives you and adjust build parameters accordingly.  If all else fails, ask on the wesnoth-dev IRC channel or the Wesnoth forums.  You might not get an immediate answer, but eventually somebody will be there whi will try to help you.

 

+

 

+

=== Previous Instructions for Older Versions===

 

+

This method is currently rather disjointed as some required parts have not been integrated for a while. The most up to date versions of each of the components are listed here, but building versions of Wesnoth older than 1.9 will not work using these instructions.

This method is currently rather disjointed as some required parts have not been integrated for a while. The most up to date versions of each of the components are listed here, but building versions of Wesnoth older than 1.9 will not work using these instructions.

Show more