TrustedUser
2,147
edits
(→4. Manual compilation: Add link to SDL_net) |
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=") |
||
Line 11: | Line 11: | ||
After installing Xcode, open a terminal and type: | After installing Xcode, open a terminal and type: | ||
< | <syntaxhighlight lang="bash"> | ||
xcode-select --install | xcode-select --install | ||
</source> | </source> | ||
Line 21: | Line 21: | ||
Install Homebrew by pasting the following into a terminal: | Install Homebrew by pasting the following into a terminal: | ||
< | <syntaxhighlight 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> | ||
Line 35: | Line 35: | ||
=== 1. Homebrew === | === 1. Homebrew === | ||
< | <syntaxhighlight lang="bash"> | ||
brew install sdl2 sdl2_net jpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng theora faad2 freetype lzlib fluid-synth | brew install sdl2 sdl2_net jpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng theora faad2 freetype lzlib fluid-synth | ||
</source> | </source> | ||
=== 2. MacPorts === | === 2. MacPorts === | ||
< | <syntaxhighlight lang="bash"> | ||
sudo port install libsdl2 libsdl2_net libjpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng libtheora faad2 freetype zlib fluidsynth | sudo port install libsdl2 libsdl2_net libjpeg-turbo libmpeg2 libogg libvorbis flac libmad libpng libtheora faad2 freetype zlib fluidsynth | ||
</source> | </source> | ||
=== 3. Fink === | === 3. Fink === | ||
< | <syntaxhighlight lang="bash"> | ||
TODO | TODO | ||
</source> | </source> | ||
Line 75: | Line 75: | ||
All the libraries are compiled and installed in the same way: | All the libraries are compiled and installed in the same way: | ||
< | <syntaxhighlight lang="bash"> | ||
cd thelib-src | cd thelib-src | ||
./configure --prefix=/path/to/install | ./configure --prefix=/path/to/install | ||
Line 83: | Line 83: | ||
The default installation path is /usr/local, but you will need admin privileges to install the libraries in this location. | The default installation path is /usr/local, but you will need admin privileges to install the libraries in this location. | ||
< | <syntaxhighlight lang="bash"> | ||
cd thelib-src | cd thelib-src | ||
./configure | ./configure | ||
Line 91: | Line 91: | ||
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 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: | ||
< | <syntaxhighlight lang="bash"> | ||
export LDFLAGS="-arch i386 -mmacosx-version-min=10.5" | export LDFLAGS="-arch i386 -mmacosx-version-min=10.5" | ||
export CFLAGS="-arch i386 -mmacosx-version-min=10.5" | export CFLAGS="-arch i386 -mmacosx-version-min=10.5" | ||
Line 98: | Line 98: | ||
bzip2 is an exception. There is no configure and you directly call make with options. For example: | bzip2 is an exception. There is no configure and you directly call make with options. For example: | ||
< | <syntaxhighlight lang="bash"> | ||
make CFLAGS="-arch i386 -mmacosx-version-min=10.5 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64" LDFLAGS="-arch i386 -mmacosx-version-min=10.5" | make CFLAGS="-arch i386 -mmacosx-version-min=10.5 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64" LDFLAGS="-arch i386 -mmacosx-version-min=10.5" | ||
make install PREFIX=/Users/criezy/Dev/scummvm-releases/libs | make install PREFIX=/Users/criezy/Dev/scummvm-releases/libs | ||
Line 126: | Line 126: | ||
=== Configuring ScummVM === | === Configuring ScummVM === | ||
Run the configure script: | Run the configure script: | ||
< | <syntaxhighlight lang="bash"> | ||
./configure | ./configure | ||
</source> | </source> | ||
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 (eg additional, not yet enabled engines) run: | ||
< | <syntaxhighlight lang="bash"> | ||
./configure --help | ./configure --help | ||
</source> | </source> | ||
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"> | ||
make -j4 | make -j4 | ||
</source> | </source> | ||
To recompile everything and not just the modified files: | To recompile everything and not just the modified files: | ||
< | <syntaxhighlight lang="bash"> | ||
make clean | make clean | ||
make -j4 | make -j4 | ||
Line 157: | Line 157: | ||
=== Installing ScummVM === | === Installing ScummVM === | ||
You can run ScummVM from the command line in the build directory: | You can run ScummVM from the command line in the build directory: | ||
< | <syntaxhighlight lang="bash"> | ||
./scummvm | ./scummvm | ||
</source> | </source> | ||
You can also generate an application bundle and move this one anywhere you want: | You can also generate an application bundle and move this one anywhere you want: | ||
< | <syntaxhighlight lang="bash"> | ||
make bundle | make bundle | ||
</source> | </source> | ||
Line 174: | Line 174: | ||
=== Creating an Xcode project === | === Creating an Xcode project === | ||
* Compile '''create_project''' inside devtools/create_project | * Compile '''create_project''' inside devtools/create_project | ||
< | <syntaxhighlight lang="bash"> | ||
make devtools/create_project | make devtools/create_project | ||
</source> | </source> | ||
Or alternatively you can use the Xcode project in devtools/create_project/xcode. Open it in Xcode or run the following command: | Or alternatively you can use the Xcode project in devtools/create_project/xcode. Open it in Xcode or run the following command: | ||
< | <syntaxhighlight lang="bash"> | ||
cd devtools/create_project/xcode; xcodebuild | cd devtools/create_project/xcode; xcodebuild | ||
</source> | </source> | ||
* Run create_project '''from the root ScummVM directory''': | * Run create_project '''from the root ScummVM directory''': | ||
< | <syntaxhighlight lang="bash"> | ||
./devtools/create_project/create_project . --xcode | ./devtools/create_project/create_project . --xcode | ||
</source> | </source> |