3a. Building OXCE from source on Mac (tested on macOS 10.15 Catalina)
Install brew, see: https://brew.sh/
3.1 Install tools and dependencies via brew:
For recent versions (macOS 10.13+)
brew install git cmake zip yaml-cpp --with-static-lib sdl sdl_gfx sdl_image sdl_mixer --with-flac --with-libmikmod --with-libvorbis --with-static-lib
For older versions (e.g. macOS 10.9), you may need a simpler command:
brew install git cmake zip sdl sdl_gfx sdl_image sdl_mixer yaml-cpp
3.2 Now OXCE itself
On macOS 10.13 or earlier:
git clone https://github.com/MeridianOXC/OpenXcom.git
cd OpenXcom
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE="Release"
make -j4
Starting with macOS 10.14 (Mojave), there are issues with OpenGL, which is not supported by Apple anymore.
The compilation works, but the game doesn't.
Therefore, you will need an earlier version of the SDK and instruct cmake to lower the deployment target.
You can download SDK for macOS 10.9 here: MacOSX10.9.sdk.zip (https://drive.google.com/open?id=17pUKRyknkKoWDUhwrsN6Qi6AqiREhG1X)
I recommend placing it into /Developer/SDKs/MacOSX10.9.sdk
EDIT: macOS 10.15 (Catalina) will probably not allow you to place the SDK there... just put it anywhere it allows you and change the cmake command accordingly
Updated cmake command:
cmake .. -DCMAKE_BUILD_TYPE="Release" -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.9.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
You will end up with build/openxcom.app bundle.
A .dmg is made out of it using:
make package
Community Update (not tested by me)3b. Resolving zlib Path Issues and Building OpenXcom (tested externally on macOS 14.6.1 Sonoma)
I encountered compilation errors on macOS Sonoma 14.6.1 due to missing zlib library paths. After following outdated instructions, I found a solution that successfully built the project. Here are the steps I took:
Prerequisites:
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew upgrade
brew install git cmake zip yaml-cpp sdl sdl_gfx sdl_image sdl_mixer zlib python
export LDFLAGS="-L/opt/homebrew/opt/zlib/lib"
export CPPFLAGS="-I/opt/homebrew/opt/zlib/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/zlib/lib/pkgconfig"
Cloning and Building OpenXcom:
Choose a version:
MeridianOXC: git clone https://github.com/MeridianOXC/OpenXcom.git
OpenXcom: git clone https://github.com/OpenXcom/OpenXcom.git
Build:
cd openxcom
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE="Release"
make -j4
Find the executable: The compiled application will be located in openxcom/build/openxcom.app
I used Google-Gemini For English Translation
Kind Regards From the Baltic Sea in Germany