How to build VCMI (OS X)

From VCMI Project Wiki

Jump to: navigation, search

Installing XCode

App Store -> XCode Launch it after the installation to agree with it's license terms.

Installing Homebrew

ruby -e "$(curl -fsSL"

Installing dependencies available in Homebrew

brew install git smpeg2 innoextract cmake libpng freetype sdl2 sdl2_ttf sdl2_image boost
brew install sdl2_mixer --with-smpeg2 

Installing Sparkle

mkdir sparkle && cd sparkle
tar -xf ../Sparkle-1.11.0.tar.bz2
sudo mv Sparkle.framework /Library/Frameworks/
cd .. && rm -rf sparkle

Getting and configuring VCMI

git clone -b develop --depth 1
cd vcmi
mkdir build && cd build
cmake -G "Unix Makefiles" .. -DENABLE_LAUNCHER=OFF -DCMAKE_BUILD_TYPE=Release -Wno-devc
cd ..

Building OSX-specific stuff

xcodebuild -project osx/osx-vcmibuilder/vcmibuilder.xcodeproj/ -configuration Release
mv osx/osx-vcmibuilder/build/Release/ osx/

Building VCMI

cd build
make -j4
cd ..

Running VCMI

Go to bin and launch vcmiclient; alternatively



In case the App crashes instantly with an error like:

dyld: Library not loaded: /usr/local/lib/libSDL-1.2.0.dylib
  Referenced from: /usr/local/lib/libavcodec.56.dylib
  Reason: image not found
Trace/BPT trap: 5


brew install sdl
Personal tools