Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Building Shoes on Mac OS X 10.6 and 10.7

steveklabnik edited this page Mar 8, 2012 · 15 revisions

A Note about Lion

We're still shaking out 10.7 support. Bug reports very welcome! We've got a bug tracker thread about it already.

You will need to have installed Xcode to build shoes. Attempting to build shoes (really pango and glib) will fail if you try to use the osx-gcc-installer.

Building

Here's what you have to do to build shoes:

  1. make sure you have homebrew and git installed. And a Ruby, 1.9.3 seems fine, with the Bundler gem installed.
  2. Make sure to run a brew update! Even if you just installed homebrew. It makes some git directories that are important. :)
  3. git clone https://github.com/shoes/shoes.git
  4. cd shoes
  5. bundle install
  6. rake osx:deps:install
  7. rake

Aaaand you should end up with a .app!

Building with MacPorts

Some people have already made the choice to use macports instead of brew. Both packaging systems are (at this writing) incompatible, so it isn't possible to use the usual instructions for building Shoes.

  1. First, make sure all of the dependencies are satisfied.

    % sudo port install cairo +quartz
    % sudo port install pango jpeg giflib portaudio gettext

  2. Edit the Shoes Rakefile to point the environment variables to macports (by default at /opt/local). Search for DYLD_LIBRARY_PATH. You should see code similar to this:

    ENV['DYLD_LIBRARY_PATH'] = '/usr/local/Cellar/cairo/1.10.2/lib:/usr/local/Cellar/cairo/1.10.2/include/cairo' ENV['LD_LIBRARY_PATH'] = '/usr/local/Cellar/cairo/1.10.2/lib:/usr/local/Cellar/cairo/1.10.2/include/cairo' ENV['CAIRO_CFLAGS'] = '-I/usr/local/Cellar/cairo/1.10.2/include/cairo' ENV['SHOES_DEPS_PATH'] = '/usr/local'

Change this to:

ENV['DYLD_FALLBACK_LIBRARY_PATH'] = '/opt/local/lib:/opt/local/lib/cairo:/opt/local/include:/opt/local/lib/cairo:/opt/local/include/glib:/opt/local/include/glib-2.0'
ENV['LD_LIBRARY_PATH'] = '/opt/local/lib:/opt/local/lib/cairo:/opt/local/include:/opt/local/include/cairo:/opt/local/include/glib:/opt/local/include/glib-2.0'
ENV['CAIRO_CFLAGS'] = '-I/opt/local/include/cairo'
ENV['SHOES_DEPS_PATH'] = '/opt/local'

Yes, use DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH otherwise the linker will fail to find certain symbols in your system frameworks.

  1. Edit another line in the same Rakefile. Search for 'pango.modules' in the code.

    dylibs << '/usr/local/etc/pango/pango.modules'

Replace with:

 dylibs << '/opt/local/etc/pango/pango.modules'
  1. Run rake to build.

    % rake

  2. There will be a lot of warnings printed. Repair of these warnings is an open project (patches welcome) but for now they can be ignored. The build takes about 60 seconds to complete. It should place a Shoes.app file in the top directory of the git clone.

  3. Open shoes.

    % open Shoes.app

Packaging as a .dmg

To make a disk image containing Shoes and lots of samples,

rake installer

Look for the .dmg file in the pkg directory. It will be named something like shoes-0.r1761.dmg. Mount it using the Finder, or from the command line,

open pkg/shoes-0.r1761.dmg

To build and package all at once,

rake package