1,510
edits
Ccawley2011 (talk | contribs) |
(→Manual compilation: added libvpx and libmikmod links) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
== Things needed == | == Things needed == | ||
=== Xcode === | === 1. Xcode === | ||
This can be installed from the [https://itunes.apple.com/us/app/xcode/id497799835?mt=12 Mac App Store]. | This can be installed from the [https://itunes.apple.com/us/app/xcode/id497799835?mt=12 Mac App Store]. | ||
=== Xcode command line tools === | === 2. Xcode command line tools === | ||
After installing Xcode, open a terminal and type: | After installing Xcode, open a terminal and type: | ||
Line 17: | Line 17: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Package manager === | === 3. Package manager === | ||
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]. | 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]. | ||
==== | ==== Homebrew (recommended) ==== | ||
Install Homebrew by pasting the following into a terminal: | Install Homebrew by pasting the following into a terminal: | ||
Line 27: | Line 27: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== | ==== MacPorts ==== | ||
Install MacPorts by downloading and running the installer from the [https://www.macports.org/install.php MacPorts installation page]. | Install MacPorts by downloading and running the installer from the [https://www.macports.org/install.php MacPorts installation page]. | ||
== Obtaining the required libraries == | == Obtaining the required libraries == | ||
If you only want to build scummvm for your own use and are fine executing it from the command line, you can use a package manager ([[#Homebrew|method 1]] and [[#MacPorts_2|2 below]]) to get the required libraries. However those methods to not provide the static libraries needed to build a ScummVM.app bundle. If your goal is to build such a bundle you will need to download our libs package ([[#Download our libs package|method 3]]) or compile the libraries manually ([[#Manual compilation|method 4]]). | |||
=== | === Homebrew === | ||
After downloading the Xcode command line tools and installing Homebrew, enter the following command to install all the required libraries: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
brew install a52dec faad2 flac fluid-synth freetype fribidi mad libmpeg2 libogg libpng libvorbis sdl2 sdl2_net theora giflib zlib jpeg-turbo curl | brew install a52dec faad2 flac fluid-synth freetype fribidi mad libmpeg2 libogg libpng libvorbis sdl2 sdl2_net theora giflib zlib jpeg-turbo curl pkg-config pandoc libvpx libmikmod | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === MacPorts === | ||
After downloading the Xcode command line tools and installing MacPorts, enter the following command to install all the required libraries: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo port install libsdl2 libsdl2_net libjpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng libtheora faad2 a52dec freetype zlib fluidsynth fribidi pandoc | sudo port install libsdl2 libsdl2_net libjpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng libtheora faad2 a52dec freetype zlib fluidsynth fribidi pandoc | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === Download our libs package === | ||
* For Intel 32 bits (targets Mac OS X 10.6 or above): [https://downloads.scummvm.org/frs/build/scummvm-macosx-libs-i386.zip scummvm-macosx-libs-i386.zip] | |||
* For Intel 64 bits (targets Mac OS X 10.9 or above): [https://downloads.scummvm.org/frs/build/scummvm-macosx-libs-x86_64.zip scummvm-macosx-libs-x86_64.zip] | |||
* For Apple Silicon (targets macOS 11.0 or above): [https://downloads.scummvm.org/frs/build/scummvm-macosx-libs-arm64.zip scummvm-macosx-libs-arm64.zip] | |||
Those packages are configured to be placed in /usr/local/. So you should for example have the following structure: | |||
<pre> | |||
/usr/local/bin | |||
/usr/local/include | |||
/usr/local/lib | |||
/usr/local/share | |||
</pre> | |||
They also contain a relocate.sh script, which you can use if you place the package content in any other location. | |||
<syntaxhighlight lang="bash"> | |||
./relocate.sh --from /usr/local --to /Users/FooBar/Documents/scummvm-libs | |||
</syntaxhighlight> | |||
The script should be able to automatically determine the ''from'' and ''to'' paths, so they can be omitted in most cases. | |||
If you place the content of the packages to a place other than /usr/local, you will need to specify the path to the libraries when you call '''configure''': | |||
<syntaxhighlight lang="bash"> | |||
./configure --with-staticlib-prefix=/path/to/libs | |||
</syntaxhighlight> | |||
=== Manual compilation === | |||
Get the source code from the libraries. With this method you will not only need to get the libraries ScummVM uses directly, but also those they depend on. | Get the source code from the libraries. With this method you will not only need to get the libraries ScummVM uses directly, but also those they depend on. | ||
* Required: | * Required: | ||
Line 59: | Line 85: | ||
** [http://liba52.sourceforge.net liba52] | ** [http://liba52.sourceforge.net liba52] | ||
** [https://theora.org Theora] | ** [https://theora.org Theora] | ||
** [https://github.com/webmproject/libvpx libvpx] | |||
** [https://mikmod.sourceforge.net/ libmikmod] | |||
** For cloud support: | ** For cloud support: | ||
*** [https://www.libsdl.org/projects/SDL_net/ SDL_net 2] or [https://www.libsdl.org/projects/SDL_net/release-1.2.html 1.2] (use same version as SDL) | *** [https://www.libsdl.org/projects/SDL_net/ SDL_net 2] or [https://www.libsdl.org/projects/SDL_net/release-1.2.html 1.2] (use same version as SDL) |