Open main menu

Difference between revisions of "Compiling ScummVM/macOS"

Typos.
(Typos.)
Line 91: Line 91:
</syntaxhighlight>
</syntaxhighlight>


If you want your compilation to be compatible with older system, use the -mmacosx-version-min flag (for example -mmacosx-version-min=10.5). To force compilation in 32 bits use -arch i386. You can do that by setting environment variables before compiling all the libraries and ScummVM:
If you want your compilation to be compatible with older systems, use the -mmacosx-version-min flag (for example -mmacosx-version-min=10.5). To force compilation in 32 bits use -arch i386. You can do that by setting environment variables before compiling all the libraries and ScummVM:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
export LDFLAGS="-arch i386 -mmacosx-version-min=10.5"
export LDFLAGS="-arch i386 -mmacosx-version-min=10.5"
Line 132: Line 132:


If no errors come up, you should be ready to compile ScummvM.
If no errors come up, you should be ready to compile ScummvM.
For a list of optional features (eg additional, not yet enabled engines) run:
For a list of optional features (e.g. additional, not yet enabled engines) run:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
./configure --help
./configure --help
Line 145: Line 145:


=== Compiling ScummVM ===
=== Compiling ScummVM ===
Just run make (with -j to compile several files in parallel). For example
Just run make (with -j to compile several files in parallel). For example:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
make -j4
make -j4
Line 172: Line 172:


==== Important note about SDL2 ====
==== Important note about SDL2 ====
The scummvm compilation assumes that the bundle uses the static SDL library. However if you have both a dynamic and static SDL2 library, SDL2 y default will instruct to use the dynamic library. To makes bundles that work on other computers you can do one of two things:
The scummvm compilation assumes that the bundle uses the static SDL library. However if you have both a dynamic and static SDL2 library, SDL2 by default will instruct to use the dynamic library. To make bundles that work on other computers you can do one of two things:
# Locate the installed sdl2-config script (for example ''/usr/local/bin/sdl2-config'') and edit the line after <code>--static-libs)</code> replace <code>echo -L${exec_prefix}/lib -lSDL2</code> with <code>echo ${exec_prefix}/lib/libSDL2.a</code> (and preserve the rest of the line). This needs to be done before you make the bundle.
# Locate the installed sdl2-config script (for example ''/usr/local/bin/sdl2-config'') and edit the line after <code>--static-libs)</code>, replace <code>echo -L${exec_prefix}/lib -lSDL2</code> with <code>echo ${exec_prefix}/lib/libSDL2.a</code> (and preserve the rest of the line). This needs to be done before you make the bundle.
# After creating the bundle copy the dynamic libSDL2 to the bundle and instruct the executable where to find it:
# After creating the bundle, copy the dynamic libSDL2 to the bundle and instruct the executable where to find it:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
otool -L ScummVM.app/Contents/MacOS/scummvm  | grep SDL2
otool -L ScummVM.app/Contents/MacOS/scummvm  | grep SDL2
736

edits