Difference between revisions of "Compiling ScummVM/Mac OS X 10.2.8"

From ScummVM :: Wiki
Jump to navigation Jump to search
(adding my experience in compiling ScummVM on Mac OS X 10.2.8)
(No difference)

Revision as of 19:13, 16 August 2007

So, I'm going to attempt to document how I was able to compile ScummVM on my 10.2.8 laptop*. However, if you don't have 10.2.8, I recommend you check out the cross compiling page.

Problems

  • kyra uses a lot of templates, and gcc 3.1 can't handle it, so I had to disable it (--disable-kyra)
  • Running make bundle leads to linkers errors as it cannot find -lSystemStubs, as it doesn't exist in 10.2.8

Getting a Compiler

So, as you may or may not know, you need gcc to compile gcc. Yes, it's one of those loopholes in life. So, we have to get the precompiled XCode from Apple. So, go to their developer site and sign up. Then, go to downloads, Development Tools, and way down at the bottom should be the December 2002 development tools for 10.2.8. That's the one you want. So, download it and install it. However, once it's installed, don't delete it as you may have to install it again**.

Getting the Libraries

There is no really specific order except: SDL must be compiled before libmpeg2, libogg must be compiled before libvorbis libogg must be compiled before flac

Let's start with the one I had most trouble with:

SDL

First off, we need to get the 1.2.8 version of SDL. Nothing higher than that compiles on 10.2.8 (it's broken currently). If you try to compile higher than 1.2.8, for example 1.2.12, it will give you a whole bunch of warnings about "__VEC__" before some errors.

Then, as long as you have 1.2.8, you should be ok. But, I wasn't***

Run:

./configure
make install

zlib

Zlib is included with the developer tools, but it's too old to be used with ScummVM. So, download the zlib 1.2.3 source and run:

./configure
make install

libmad

Download libmad 0.15.1b. Run

./configure
make install

libogg/libvorbis

Download libogg 1.1.3 and libvorbis 1.2.0. Run (in libogg):

./configure
make install

And, then the same for libvorbis. libogg must be compiled first.

flac

Download flac 1.2.0. Run:

./configure
make install

libmpeg2

Download the libmpeg2 0.4.1 source. As with the other libraries, run

./configure
make install

There will be errors found, but it will turn off the preprocessing mode and compile fine, so don't worry about it.

libfluidsynth

Download the libfluidsynth source. Run

./configure
make install

nasm

Download the nasm 0.99.01 source. Run

./configure
make install

Just ignore the 100's of warnings you will get ;)

Configuring Configure

Assuming you already compiled SDL, we need to point ScummVM in the right direction. Open up configure in your favorite text editor and change the _sdlpath="$PATH" to _sdlpath="/usr/local/bin".

Compiling ScummVM

If you just want the engines that are enabled always just run:

./configure

However, for other ones (such as Lure, CruisE, and Drascula) run:

./configure --enable-lure --enable-cruise --enable-drascula

After that is run, make sure that all the libraries you installed appear on the text that Terminal should spit out at you.

Executable Only

Just run

make

To use this, just drag it into the Terminal and hit enter.

Bundle

TODO (See Problems)

Notes

* Your results may vary
** Sometimes the installer "forgets" to install key components to the compiler (you may get a strange error during a configure after trying to find the compiler's default output). If so, just reinstall it.
*** It complained that I was missing some x11 files. If this happens to you, download xfree86 source part 1. After extracting it, go to the include folder, and copy it's contents to a /usr/include/x11 as well as copying Xlib.h from the bin/x11 folder to /usr/include/x11.