124
edits
m (Csnover moved page Compiling ScummVM/Mac OS X to Compiling ScummVM/macOS) |
(Fix outdated compilation instructions) |
||
Line 1: | Line 1: | ||
== Compiling ScummVM under | == Compiling ScummVM under macOS == | ||
Compiling ScummVM under | Compiling ScummVM under macOS requires setting up the build environment first, and then compiling the sources either via command line, or the XCode GUI | ||
== Things needed == | == Things needed == | ||
=== | === Xcode === | ||
This can be installed from the | This can be installed from the [https://itunes.apple.com/us/app/xcode/id497799835?mt=12 Mac App Store]. | ||
=== Xcode command line tools === | |||
After installing Xcode, open a terminal and type: | |||
<source lang="bash"> | <source lang="bash"> | ||
xcode-select --install | xcode-select --install | ||
Line 15: | Line 16: | ||
=== Package manager === | === Package manager === | ||
Getting the required libraries is easier with a package manager. The three most well-known ones are [ | Getting the required libraries is easier with a package manager. The three most well-known ones are [http://brew.sh/ Homebrew], [https://www.macports.org/ MacPorts], and [http://www.finkproject.org/ Fink]. | ||
==== 1. | ==== 1. Homebrew (recommended) ==== | ||
Install Homebrew by pasting the following into a terminal: | |||
<source lang="bash"> | <source lang="bash"> | ||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
</source> | </source> | ||
==== 2. MacPorts ==== | |||
Install MacPorts by downloading and running the installer from the [https://www.macports.org/install.php MacPorts installation page]. | |||
==== 3. Fink ==== | ==== 3. Fink ==== | ||
Install Fink by downloading and building the source from the [http://www.finkproject.org/download/srcdist.php Fink Source Release] page. | |||
== Obtaining the required libraries == | == Obtaining the required libraries == | ||
After downloading the XCode command line tools and a package manager, enter the following command to install all the required libraries: | After downloading the XCode command line tools and a package manager, enter the following command to install all the required libraries: | ||
=== 1. | === 1. Homebrew === | ||
<source lang="bash"> | <source lang="bash"> | ||
brew install sdl2 sdl2_net jpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng theora faad2 freetype lzlib fluid-synth | |||
</source> | </source> | ||
=== 2. | === 2. MacPorts === | ||
<source lang="bash"> | <source lang="bash"> | ||
sudo port install libsdl2 libsdl2_net libjpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng libtheora faad2 freetype zlib fluidsynth | |||
</source> | </source> | ||
Line 167: | Line 169: | ||
Also if you run scummvm from the command line, you will need to set the Theme path in the ScummVM options so that it finds the modern theme. The themes are in gui/themes/ in the source code repository. | Also if you run scummvm from the command line, you will need to set the Theme path in the ScummVM options so that it finds the modern theme. The themes are in gui/themes/ in the source code repository. | ||
== Compiling ScummVM via the | == Compiling ScummVM via the Xcode GUI == | ||
=== Creating an | === Creating an Xcode project === | ||
* Compile '''create_project''' inside devtools/create_project | * Compile '''create_project''' inside devtools/create_project | ||
<source lang="bash"> | <source lang="bash"> | ||
make devtools/create_project | make devtools/create_project | ||
</source> | </source> | ||
Or alternatively you can use the | Or alternatively you can use the Xcode project in devtools/create_project/xcode. Open it in Xcode or run the following command: | ||
<source lang="bash"> | <source lang="bash"> | ||
cd devtools/create_project/xcode; xcodebuild | cd devtools/create_project/xcode; xcodebuild | ||
</source> | </source> | ||
* | * Run create_project '''from the root ScummVM directory''': | ||
<source lang="bash"> | <source lang="bash"> | ||
./create_project . --xcode | ./devtools/create_project/create_project . --xcode | ||
</source> | </source> | ||
=== Build the | Note that `create_project` accepts most of the same flags that `configure` accepts. | ||
* Open | |||
* | === Build the Xcode project === | ||
* | * Open the Xcode project | ||
* Go to Product -> Scheme and set the scheme to "ScummVM-macOS" | |||
* Go to Product -> Scheme -> Edit Scheme -> Run tab -> Options tab and uncheck "Allow debugging when using document Versions Browser" | |||
* Build with Product -> Build or Product -> Run | |||
== Further reading == | == Further reading == | ||
* [https://github.com/scummvm/scummvm/blob/master/README#L2416 ScummVM README, Section 9.0] | * [https://github.com/scummvm/scummvm/blob/master/README#L2416 ScummVM README, Section 9.0] |
edits