Editing MG/Mac Compiling
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This page explains how to compile [[MegaGlest]] on a Mac computer. | This page explains how to compile [[MegaGlest]] on a Mac computer. | ||
− | |||
==Prerequisites== | ==Prerequisites== | ||
− | * XCode | + | * [http://developer.apple.com/technologies/xcode.html XCode] |
− | * Various 3rd party build dependencies | + | * [http://www.cmake.org/cmake/resources/software.html CMake] |
− | + | * Various 3rd party build dependencies | |
− | + | == Dependencies == | |
Dependencies can be installed in two ways: | Dependencies can be installed in two ways: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Retrieve the build dependencies / 3rd party libraries and extract the contents of the archive in your library directory ~/Library/Frameworks | * Retrieve the build dependencies / 3rd party libraries and extract the contents of the archive in your library directory ~/Library/Frameworks | ||
+ | or | ||
+ | * Install them using a 3rd party package manager like [https://www.macports.org/ |MacPorts] or [www.finkproject.org/ |Fink]. | ||
− | + | In this example I show how to install the packages with MacPorts which will handle the install of dependencies, and there is a lot of them. Full dependency lists are available on [[MG/Linux Compiling|Linux Compiling]] or [[MG/FreeBSD Compiling|FreeBSD Compiling]] if you would like to install them manually. | |
− | |||
− | + | sudo port install git cmake VLC-devel fribidi ftgl glew wxWidgets-2.8 wxgtk-2.8 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Preparing to compile == | == Preparing to compile == | ||
− | + | However you choose to compile you will need to use [[MG/Getting_The_Code|''Git to check out'']] the MegaGlest source code ready for building. | |
− | |||
==Compiling== | ==Compiling== | ||
− | This can be done in two ways: Using an XCode project or GNU Make | + | This can be done in two ways: Using an XCode project or GNU Make |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | === XCode project === | ||
− | + | *Generate the XCode project | |
+ | cmake -GXcode | ||
+ | *Build everything for Release (This is case sensitive) | ||
+ | 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. | ||
− | |||
− | |||
− | |||
− | + | === GNU Make === | |
+ | rm -rf Makefile CMakeCache.txt MegaGlest.xcodeproj/ && cmake -G"Unix Makefiles" -DBUILD_MEGAGLEST_MAP_EDITOR=OFF -DWANT_DEV_OUTPATH=ON && gnumake | ||
− | + | == Shared Problems building == | |
− | + | === wxWidgets === | |
− | |||
− | |||
− | + | If you encounter problems with wxWidgets executable being undiscoverable you may need to set the path in CMakeLists.txt yourself | |
+ | <pre> | ||
+ | # Define path to wxWidgets_CONFIG_EXECUTABLE | ||
+ | SET(wxWidgets_CONFIG_EXECUTABLE "/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/bin/wx-config" CACHE STRING "FULL path to wx-widgets config binary") | ||
+ | </pre> | ||
==See Also== | ==See Also== | ||
Line 105: | Line 56: | ||
*[[MG/Windows Compiling|Windows Compiling]] | *[[MG/Windows Compiling|Windows Compiling]] | ||
*[[MG/FreeBSD Compiling|FreeBSD Compiling]] | *[[MG/FreeBSD Compiling|FreeBSD Compiling]] | ||
− | |||
− | |||
− | |||
− |