Difference between revisions of "Compiling ScummVM/macOS"

From ScummVM :: Wiki
Jump to navigation Jump to search
(Add a bare-bone Mac OS X compilation page)
 
(Added build instructions using XCode)
Line 1: Line 1:
TODO: This page needs to be filled with content.
+
== Compiling ScummVM under OS X ==
  
You should install Apple's XCode to get the compilers required for ScummVM.
+
Compiling ScummVM under OS X requires setting up the build environment first, and then compiling the sources either via command line, or the XCode GUI
  
Also, ScummVM needs several libraries, foremost SDL. An easy way to install those is using [http://www.finkproject.org Fink] or [http://www.macports.org MacPorts]. Alternatively, you can install these manually. See [[Compiling_ScummVM/Mac_OS_X_10.2.8]] for some (possibly outdated) notes on that.
+
== Things needed ==
  
TODO: List which packages should be installed, ideally give instructions for both Fink and MacPorts
+
=== XCode ===
 +
This can be installed from the Apple Store
 +
 
 +
=== XCode command line tools ===
 +
After installing XCode, open a terminal and type "'''xcode-select --install'''"
 +
 
 +
=== MacPorts ===
 +
Get the MacPorts installer for your OS X version from the [https://www.macports.org/install.php MacPorts installation page]
 +
 
 +
== Obtaining the required libraries ==
 +
After downloading the XCode command line tools and MacPorts, enter the following command to install all the required libraries:
 +
* '''sudo port install libsdl libjpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng libtheora faad2 freetype zlib fluidsynth'''
 +
 
 +
== Compiling ScummVM via the command line ==
 +
 
 +
=== Configuring ScummVM ===
 +
Run the configure script - type "./configure" in the directory with the ScummVM source files. If no errors come up, you should be ready to compile ScummvM. Run "./configure --help" for a list of optional features (eg additional, not yet enabled engines).
 +
 
 +
=== Compiling ScummVM ===
 +
Run "make clean" and then "make"
 +
 
 +
=== Installing ScummVM ===
 +
Either run ./scummvm from the current directory or run make install to install ScummVM (you can then run it using "scummvm" from any directory)
 +
 
 +
== Compiling ScummVM via the XCode GUI ==
 +
 
 +
=== Creating an XCode project ===
 +
* Compile '''create_project''' inside devtools/create_project
 +
* Copy the generated create_project tool in the ScummVM root folder
 +
* Run "./create_project . --xcode --build-events --disable-hqscalers"
 +
 
 +
=== Build the XCode project ===
 +
* Open and build the XCode project
 +
* Note that you may need to change the project architecture. Click on the ScummVM project, and change "Architectures" to "64-bit Intel (x86_64)"
 +
* If you're using XCode 5 or newer, you will also need to go to Product -> Scheme -> Edit Scheme -> Run tab -> Options tab and uncheck "Allow debugging when using document Versions Browser", otherwise the invalid "nsdocumentrevisionsdebugmode" option will be passed to the ScummVM executable by XCode
 +
 
 +
== Further reading ==
 +
* [http://svn.sourceforge.net/viewcvs.py/*checkout*/scummvm/scummvm/trunk/README ScummVM README, Section 9.0]

Revision as of 21:09, 14 July 2015

Compiling ScummVM under OS X

Compiling ScummVM under OS X requires setting up the build environment first, and then compiling the sources either via command line, or the XCode GUI

Things needed

XCode

This can be installed from the Apple Store

XCode command line tools

After installing XCode, open a terminal and type "xcode-select --install"

MacPorts

Get the MacPorts installer for your OS X version from the MacPorts installation page

Obtaining the required libraries

After downloading the XCode command line tools and MacPorts, enter the following command to install all the required libraries:

  • sudo port install libsdl libjpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng libtheora faad2 freetype zlib fluidsynth

Compiling ScummVM via the command line

Configuring ScummVM

Run the configure script - type "./configure" in the directory with the ScummVM source files. If no errors come up, you should be ready to compile ScummvM. Run "./configure --help" for a list of optional features (eg additional, not yet enabled engines).

Compiling ScummVM

Run "make clean" and then "make"

Installing ScummVM

Either run ./scummvm from the current directory or run make install to install ScummVM (you can then run it using "scummvm" from any directory)

Compiling ScummVM via the XCode GUI

Creating an XCode project

  • Compile create_project inside devtools/create_project
  • Copy the generated create_project tool in the ScummVM root folder
  • Run "./create_project . --xcode --build-events --disable-hqscalers"

Build the XCode project

  • Open and build the XCode project
  • Note that you may need to change the project architecture. Click on the ScummVM project, and change "Architectures" to "64-bit Intel (x86_64)"
  • If you're using XCode 5 or newer, you will also need to go to Product -> Scheme -> Edit Scheme -> Run tab -> Options tab and uncheck "Allow debugging when using document Versions Browser", otherwise the invalid "nsdocumentrevisionsdebugmode" option will be passed to the ScummVM executable by XCode

Further reading