Difference between revisions of "How to build VCMI (macOS)"

From VCMI Project Wiki
Jump to: navigation, search
(Replaced content with "{{Template:MovedToWebpage|https://vcmi.eu/developers/Building_macOS/}}")
 
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Installing XCode
+
{{Template:MovedToWebpage|https://vcmi.eu/developers/Building_macOS/}}
----------------
 
App Store -> XCode
 
Launch it after the installation to agree with it's license terms.
 
 
 
Installing Homebrew
 
-------------------
 
<pre>
 
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 
</pre>
 
 
 
Installing dependencies available in Homebrew
 
---------------------------------------------
 
<pre>
 
brew install git smpeg2 innoextract cmake libpng freetype sdl2 sdl2_ttf sdl2_image boost
 
brew install sdl2_mixer --with-smpeg2
 
</pre>
 
 
 
Installing Sparkle
 
------------------
 
<pre>
 
wget https://github.com/sparkle-project/Sparkle/releases/download/1.11.0/Sparkle-1.11.0.tar.bz2
 
mkdir sparkle && cd sparkle
 
tar -xf ../Sparkle-1.11.0.tar.bz2
 
sudo mv Sparkle.framework /Library/Frameworks/
 
cd .. && rm -rf sparkle
 
</pre>
 
 
 
Getting and configuring VCMI
 
----------------------------
 
<pre>
 
git clone -b develop --depth 1 https://github.com/vcmi/vcmi.git
 
cd vcmi
 
mkdir build && cd build
 
cmake -G "Unix Makefiles" .. -DENABLE_LAUNCHER=OFF -DCMAKE_BUILD_TYPE=Release -Wno-devc
 
cd ..
 
</pre>
 
 
 
Building OSX-specific stuff
 
---------------------------
 
<pre>
 
xcodebuild -project osx/osx-vcmibuilder/vcmibuilder.xcodeproj/ -configuration Release
 
mv osx/osx-vcmibuilder/build/Release/vcmibuilder.app osx/vcmibuilder.app
 
</pre>
 
 
 
Building VCMI
 
-------------
 
<pre>
 
cd build
 
make -j4
 
cd ..
 
</pre>
 
 
 
Running VCMI
 
------------
 
Go to bin and launch vcmiclient; alternatively
 
<pre>
 
bin/vcmiclient.app/Contents/MacOS/vcmiclient
 
</pre>
 
 
 
 
 
 
 
== Troubleshooting ==
 
 
 
In case the App crashes instantly with an error like:
 
<pre>
 
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
 
</pre>
 
 
 
do
 
<pre>
 
brew install sdl
 
</pre>
 

Latest revision as of 16:08, 16 July 2024

Logo256.png    Page moved to VCMI-Homepage