Compiling with Xcode (OpenXcom)
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/.
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.
- 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
- 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.
- 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:
- Push the Build button and cross your fingers ;)
- 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.
- Don't forget to copy the original game data files you possess into the UFO and/or TFTD folders 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.