Difference between revisions of "Compiling with Xcode (OpenXcom)"

From UFOpaedia
Jump to navigation Jump to search
(Created page with "To successfully build an OpenXcom OSX bundle you will need the relevant Xcode project files provided in the ''xcode'' folder as well as all the relevant dependencies installed...")
 
Line 14: Line 14:
 
== Instructions ==
 
== Instructions ==
  
# This guide assumes you listened to the previous recommendation and had your dependencies installed with brew terminal command, like this:<br /><pre>$ brew install yaml-cpp sdl sdl_gfx sdl_mixer sdl_image</pre>
+
# This guide assumes you listened to the previous recommendation and had your dependencies installed with brew terminal command, like this:<br /><pre>$ brew install yaml-cpp sdl sdl_gfx sdl_image sdl_mixer --with-flac --with-libmikmod --with-libvorbis</pre>
 
# Now, open the ''OpenXcom.xcodeproj'' file and add the source folder to the project:<br />Right-Click on the OpenXcom project icon in the left pane, select ''Add Files to "OpenXcom"'', traverse the folder tree up one level and select the ''src'' folder to be added. Just make sure you choose ''Create groups for any added folders'' option when adding this to your build target.
 
# Now, open the ''OpenXcom.xcodeproj'' file and add the source folder to the project:<br />Right-Click on the OpenXcom project icon in the left pane, select ''Add Files to "OpenXcom"'', traverse the folder tree up one level and select the ''src'' folder to be added. Just make sure you choose ''Create groups for any added folders'' option when adding this to your build target.
 
# Click on the OpenXcom target in the middle pane and select the ''Build Phases'' tab. Look down at ''Copy Bundle Resources'' container and delete all the files irrelevant to our build, namely:
 
# Click on the OpenXcom target in the middle pane and select the ''Build Phases'' tab. Look down at ''Copy Bundle Resources'' container and delete all the files irrelevant to our build, namely:

Revision as of 20:00, 14 June 2014

To successfully build an OpenXcom OSX bundle you will need the relevant Xcode project files provided in the xcode folder as well as all the relevant dependencies installed in /usr/local/.

Dependencies

The dependencies you require are the following:

  • SDL (libsdl1.2)
  • SDL_mixer (libsdl-mixer1.2)
  • SDL_gfx (libsdl-gfx1.2), version 2.0.22 or later
  • SDL_image (libsdl-image1.2)
  • yaml-cpp, version 0.5 or later

If you want to save yourself the trouble - don't do it manually, use Homebrew package manager instead.

Instructions

  1. This guide assumes you listened to the previous recommendation and had your dependencies installed with brew terminal command, like this:
    $ brew install yaml-cpp sdl sdl_gfx sdl_image sdl_mixer --with-flac --with-libmikmod --with-libvorbis
  2. Now, open the OpenXcom.xcodeproj file and add the source folder to the project:
    Right-Click on the OpenXcom project icon in the left pane, select Add Files to "OpenXcom", traverse the folder tree up one level and select the src folder to be added. Just make sure you choose Create groups for any added folders option when adding this to your build target.
  3. Click on the OpenXcom target in the middle pane and select the Build Phases tab. Look down at Copy Bundle Resources container and delete all the files irrelevant to our build, namely:
    • OpenXcom.2010.vcxproj
    • CMakeLists.txt
    • Makefile.simple
    • OpenXcom.rc
    • OpenXcom.2010.sln
    • OpenXcom.2010.vcxproj.user
    • OpenXcom.2010.vcxproj.filters
    • Makefile.gcc-pch
  4. Push the Build button and cross your fingers ;)
  5. Find your newly created bundle in ./DerivedData/OpenXcom/Build/Products/Release folder and copy it to some place you feel comfortable keeping your games in.
  6. Don't forget to copy all the relevant original game data files you possess into the relevant data folder within the bundle (see Installing), or otherwise the game won’t start. If asked by OSX what to do with the files and folders already present there, select Merge.
  7. Enjoy!

Should you require any further assistance regarding the OSX build - feel free to ask around on the official forums or contact me directly on GitHub.