Difference between revisions of "How to build VCMI (macOS)"
From VCMI Project Wiki
(Update instruction for most recent changes) |
|||
Line 22: | Line 22: | ||
# Clone VCMI with all submodules | # Clone VCMI with all submodules | ||
git clone -b develop --depth 1 --recursive https://github.com/vcmi/vcmi.git | git clone -b develop --depth 1 --recursive https://github.com/vcmi/vcmi.git | ||
− | # Creating directory for | + | # Creating directory for building |
− | mkdir | + | mkdir cmake && cd cmake |
cmake ../vcmi -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -Wno-devc | cmake ../vcmi -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -Wno-devc | ||
</pre> | </pre> | ||
Line 29: | Line 29: | ||
===== Building and packaging VCMI ===== | ===== Building and packaging VCMI ===== | ||
<pre> | <pre> | ||
− | cd ~/DEV/ | + | cd ~/DEV/cmake |
# Start build using cmake | # Start build using cmake | ||
cmake --build . -- -j 4 | cmake --build . -- -j 4 | ||
Line 45: | Line 45: | ||
Go to "build" and launch executable directly; alternatively | Go to "build" and launch executable directly; alternatively | ||
<pre> | <pre> | ||
− | ~/ | + | ~/DEV/cmake/build/VCMI.app/Contents/MacOS/vcmilauncher |
− | ~/ | + | ~/DEV/cmake/build/VCMI.app/Contents/MacOS/vcmiclient |
− | ~/ | + | ~/DEV/cmake/build/VCMI.app/Contents/MacOS/vcmiserver |
</pre> | </pre> |
Revision as of 03:38, 9 August 2017
Contents
Installing dependencies
Installing XCode
App Store -> XCode Launch it after the installation to agree with it's license terms.
Installing Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Installing dependencies using Homebrew
brew install git cmake sdl2 sdl2_ttf sdl2_image boost qt5 ffmpeg brew install sdl2_mixer --with-smpeg2
Building VCMI in command line with Makefiles
Getting and configuring VCMI
# You can choose any directory mkdir ~/DEV && cd ~/DEV # Clone VCMI with all submodules git clone -b develop --depth 1 --recursive https://github.com/vcmi/vcmi.git # Creating directory for building mkdir cmake && cd cmake cmake ../vcmi -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -Wno-devc
Building and packaging VCMI
cd ~/DEV/cmake # Start build using cmake cmake --build . -- -j 4 # Or you can as well use simple # make -j 4 # When build is completed you can trigger packaging into DMG cpack # After file named such as "vcmi-0.99.dmg" will be created
Running VCMI
You can run VCMI from DMG, but after "cpack" is finished you can run unpacked executables as well
Go to "build" and launch executable directly; alternatively
~/DEV/cmake/build/VCMI.app/Contents/MacOS/vcmilauncher ~/DEV/cmake/build/VCMI.app/Contents/MacOS/vcmiclient ~/DEV/cmake/build/VCMI.app/Contents/MacOS/vcmiserver