Setting Up a Mac OS X Development Environment

lylejohnson edited this page Sep 13, 2010 · 5 revisions

If you would like to be able to build FXRuby from source on Mac OS X, and perhaps even contribute patches back to the project, you’re going to need to set up a development environment.

Set Up the Build Environment

For starters, you need to follow the instructions on the Setting Up a Mac OS X Build Environment page. So go do that, then come back here when you’re done.

Download, Build and Install SWIG

We use a very, very old version of SWIG to generate the wrapper code for FXRuby. Actually, this is only true for the “master” branch of FXRuby, but that’s the one that you’ll probably be dealing with. You can download the source tarball for SWIG version 1.3.22 from the SWIG downloads page and then build and install it.

tar xzf swig-1.3.22.tar.gz
cd SWIG-1.3.22
make install

Install Git

Perhaps this goes without saying, but if you want to be able to check out the FXRuby code, you’re going to need to have Git installed. If you’re using MacPorts, you can simply install the git-core port:

sudo port install git-core

If you aren’t using MacPorts, please see this guide at GitHub for some other options.

Install Rake, Hoe and rake-compiler

Many of the tasks related to FXRuby development are encoded in its Rakefile, and that Rakefile depends on tasks from Hoe and rake-compiler, so you need to install those gems:

sudo gem install rake hoe rake-compiler

Check out the Code

If you think you’ll want to make changes to the FXRuby code, and possibly submit patches back to the project, you’ll want to fork the project and then check out your forked version. Otherwise, you can just do a regular git clone of the FXRuby repository. In either case, refer to the GitHub guides for information about these things are done.