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

From VCMI Project Wiki
Jump to: navigation, search
(Prerequisites)
(Preparing place)
Line 5: Line 5:
  
 
== Preparing place ==
 
== Preparing place ==
* Unzip downloaded archive
+
Open terminal and go to directory where you want to place vcmi and run:
* Open terminal and go to extracted xcode-pack directory
+
<pre>
* Checkout source via git:
+
mkdir vcmi && cd vcmi
<pre>git clone https://github.com/vcmi/vcmi.git</pre>
+
git clone https://github.com/vcmi/vcmi.git
 +
cd vcmi
 +
sh osx/download_dependencies.sh
 +
</pre>
 
* Open vcmibuilder.xcodeproj located at vcmi/osx/osx-vcmibuilder
 
* Open vcmibuilder.xcodeproj located at vcmi/osx/osx-vcmibuilder
 
* Archive it (Product -> Archive) and than (in Organizer window press Distribute -> Export as: Application) save it in vcmi/osx directory
 
* Archive it (Product -> Archive) and than (in Organizer window press Distribute -> Export as: Application) save it in vcmi/osx directory

Revision as of 13:07, 2 May 2014

Prerequisites

  • Xcode. Can be downloaded from Mac App Store.
  • CMake. Can be downloaded from (link) or installed from Homebrew/MacPorts
  • Any git client you prefer.

Preparing place

Open terminal and go to directory where you want to place vcmi and run:

mkdir vcmi && cd vcmi
git clone https://github.com/vcmi/vcmi.git
cd vcmi
sh osx/download_dependencies.sh
  • Open vcmibuilder.xcodeproj located at vcmi/osx/osx-vcmibuilder
  • Archive it (Product -> Archive) and than (in Organizer window press Distribute -> Export as: Application) save it in vcmi/osx directory

Building

  • Open terminal in vcmi directory:
mkdir build && cd build
cmake -G Xcode ..
  • Open generated Xcode project vcmi.xcodeproj
  • Select vcmiclient in list of targets and press Run (Command + R)