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

From VCMI Project Wiki
Jump to: navigation, search
(Update instruction for most recent changes)
(Replaced content with "{{Template:MovedToWebpage|https://vcmi.eu/developers/Building_macOS/}}")
 
(25 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Installing dependencies =
+
{{Template:MovedToWebpage|https://vcmi.eu/developers/Building_macOS/}}
===== Installing XCode =====
 
App Store -> XCode
 
Launch it after the installation to agree with it's license terms.
 
 
 
===== Installing [https://brew.sh/ Homebrew] =====
 
<pre>
 
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 
</pre>
 
 
 
===== Installing dependencies using Homebrew =====
 
<pre>
 
brew install git cmake sdl2 sdl2_ttf sdl2_image boost qt5 ffmpeg
 
brew install sdl2_mixer --with-smpeg2
 
</pre>
 
 
 
= Building VCMI in command line with Makefiles =
 
===== Getting and configuring VCMI =====
 
<pre>
 
# 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 build
 
mkdir build && cd build
 
cmake ../vcmi -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -Wno-devc
 
</pre>
 
 
 
===== Building and packaging VCMI =====
 
<pre>
 
cd ~/DEV/build
 
# 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
 
</pre>
 
 
 
===== 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
 
<pre>
 
~/build/build/VCMI.app/Contents/MacOS/vcmilauncher
 
~/build/build/VCMI.app/Contents/MacOS/vcmiclient
 
~/build/build/VCMI.app/Contents/MacOS/vcmiserver
 
</pre>
 

Latest revision as of 16:08, 16 July 2024

Logo256.png    Page moved to VCMI-Homepage