Building on Mac OS X

From Gnash Project Wiki

Jump to: navigation, search

As Darwin is basically a Unix variant most development packages we're all used to can be compiled for Darwin. Darwin is just different enough to create problems though, so I cheat and use MacPorts. This lets you install all the dependencies Gnash needs. I install this set of packages: "sudo port install gmake antigraingeometry gettext boost curl jpeg libungif libsdl ffmpeg". For good measure, also install fontconfig, freetype, cairo, and cairo-devel. Don't forget to do a "sudo port sync" to update the package list after installing MacPorts.

For MacPorts to work, you need Xcode. On My Mac running 10.6.4 "Snow Leopard", I have Xcode 3.2.4 installed, which is a free download from Apple if you have a developers account.

Having the usual autoconf/automake files generated, then you can run configure with the appropriate options, which may include some of the following:

$ ./configure \
 --enable-renderer=agg \ # (or add ogl for OpenGL or add cairo for Cairo)
 --enable-gui=aqua,sdl \ # aqua is the native Mac GUI
 --enable-media=ffmpeg

Then the usual build commands that follow:

$ gmake
$ sudo gmake install

Xcode IDE

Although I just build everything in a terminal window, often remotely logged in via ssh, I don't use any IDE but emacs. If you are into the point and click thing, you can build Gnash under the Xcode IDE as well. Once you have configured Gnash, fire XCode and create a new project. Select Other->External Build System through the menus. Change /usr/bin/make to /opt/local/bin/gmake, change the source and build directories, and you're set. Then Clicking on Build fires up gmake in your build directory, and lets you use the Xcode editor, and click on build bugs.