FOX Community

Recent site activity

Documentation‎ > ‎

Installing FOX on Mac OS X



This page covers some of the options for installing FOX on Mac OS X. Note that for either option, you will (minimally) need to install the Xcode Developer Tools (free from Apple), as well as Apple's X11 server (also free, and included with OS X Leopard).

MacPorts

An easy(ish) way to get FOX and up and running on Mac OS X is to install it via MacPorts. To quote the MacPorts home page, MacPorts is "an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system."

Follow the instructions for installing MacPorts on your computer, and then simply install the fox package:

sudo port install fox

For a standard MacPorts installation, this will install the command-line tools (like reswrap) in /opt/local/bin, the FOX include files in /opt/local/include/fox-1.6, and the libraries in /opt/local/lib.

Building from Scratch

Sometimes the MacPorts route described above isn't an option (for example, when you need to easily redistribute your application binary without source). This section describes how to build and install FOX from scratch (i.e. with no dependencies on MacPorts).

FOX optionally depends on a number of third-party open source libraries, especially when it comes to supporting various image file formats. For example, if you want your build of FOX to be able to process and display PNG images, you'll need to download and install the libpng code. If you don't install that library before building FOX, FOX will "work" but it won't support PNG images. Get it?

To help with these predecessor steps, we'll briefly cover the various dependencies and how to install them from source.

libpng

The first step is to build libpng as a Universal library.
./configure --enable-universal --disable-dependency-tracking
make
sudo make install

libjpeg

The next step is to build libjpeg as a Universal library.
./configure --enable-universal
make
sudo make install
sudo make install-lib

libtiff

The next step is to build libtiff as a Universal library.
./configure --enable-universal --disable-dependency-tracking
make
sudo make install

FOX

The next step is to build FOX as a Universal library. Note that there's an unresolved issue building FOX with Xft2 support, so we're leaving out the "--with-xft" switch that we'd usually recommend passing in to configure.
env CXXFLAGS="-arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" ./configure --with-x --with-opengl --enable-cups --enable-release
make
sudo make install

FXScintilla

env CXXFLAGS="-arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" ./configure --disable-dependency-tracking
make
sudo make install

FXRuby

Finally, you can build FXRuby from the gem.
sudo gem install fxruby