Difference between revisions of "MG/Mac Compiling"

From MegaGlest
Jump to navigation Jump to search
 
(Copied changes made by 80.54.236.119 <http://glest.wikia.com/wiki/MG/Mac_Compiling?curid=2354&action=history>)
Line 9: Line 9:
 
==Compiling==
 
==Compiling==
 
*Get the source from Git or the source tarball from version 3.9.1 or above.
 
*Get the source from Git or the source tarball from version 3.9.1 or above.
  git clone [https://github.com/MegaGlest/megaglest-source https://github.com/MegaGlest/megaglest-source.git]
+
  git clone --recursive https://github.com/MegaGlest/megaglest-source.git
  cd megaglest-source
+
cd megaglest-source/data/glest_game
  git submodule update --init --recursive
+
git checkout master
 +
  cd ../..
 +
:*If you've made a quite popular mistake - "cloned repository without data (submodules)", then you should do this:
 +
  >    git submodule update --init --recursive
 +
>    cd data/glest_game
 +
>    git checkout master
 +
>    cd ../..
  
 
*Generate the XCode project
 
*Generate the XCode project
Line 32: Line 38:
 
*[[MG/Windows Compiling|Windows Compiling]]
 
*[[MG/Windows Compiling|Windows Compiling]]
 
*[[MG/FreeBSD Compiling|FreeBSD Compiling]]
 
*[[MG/FreeBSD Compiling|FreeBSD Compiling]]
[[Category:MG]]
 
[[Category:Compiling]]
 

Revision as of 19:47, 23 February 2014

This page explains how to compile MegaGlest on a Mac computer.

Prerequisites

  • XCode
  • A Git program
  • CMake
  • Retrieve the build dependencies / 3rd party libraries and extract the contents of the archive in your library directory ~/Library/Frameworks

Compiling

  • Get the source from Git or the source tarball from version 3.9.1 or above.
git clone --recursive https://github.com/MegaGlest/megaglest-source.git
cd megaglest-source/data/glest_game
git checkout master
cd ../..
  • If you've made a quite popular mistake - "cloned repository without data (submodules)", then you should do this:
>    git submodule update --init --recursive
>    cd data/glest_game
>    git checkout master
>    cd ../..
  • Generate the XCode project
cmake -GXcode
  • Build everything for release
xcodebuild -configuration release
  • Generate the installer
cpack -C CPackConfig.cmake
  • You should have a megaglest-#.dmg file in your current directory. You can install this and play it.

See Also