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

From VCMI Project Wiki
Jump to: navigation, search
Line 12: Line 12:
 
or via svn:
 
or via svn:
 
<pre>svn checkout https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk/ vcmi</pre>
 
<pre>svn checkout https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk/ vcmi</pre>
* Than generate Xcode project:
+
* Open vcmibuilder.xcodeproj located at vcmi/osx/osx-vcmibuilder
<pre>cd vcmi
+
* Archive it (Product -> Archive) and than (in Organizer window press Distribute -> Export as: Application) save it in vcmi/osx directory
cmake -G .</pre>
+
 
 +
== Building ==
 +
* Open terminal in vcmi directory:
 +
<pre>mkdir build && cd build
 +
cmake -G ..</pre>
 +
* Open generated Xcode project vcmi.xcodeproj
 +
* Select vcmiclient in list of targets and press Run (Command + R)

Revision as of 15:19, 12 January 2013

Prerequisites

  • Xcode. Can be downloaded from Mac App Store.
  • CMake. Can be downloaded from (link) or installed from MacPorts
  • Any git or Subversion client you prefer.
  • Archive with prebuilt libraries and frameworks (link)

Preparing place

  • Unzip downloaded archive
  • Open terminal and go to extracted xcode-pack directory
  • Checkout source via git:
git clone https://github.com/vcmi/vcmi.git

or via svn:

svn checkout https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk/ vcmi
  • 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 ..
  • Open generated Xcode project vcmi.xcodeproj
  • Select vcmiclient in list of targets and press Run (Command + R)