Skip to content

Setting Up a Linux Build Environment

lylejohnson edited this page Sep 13, 2010 · 16 revisions

If you’d like to be able to build FXRuby from source on Linux, you’re going to need to set up a build environment. This page describes how to set up an FXRuby build environment under Ubuntu Linux 9.04. If you’re working with a different Linux distribution, some of the instructions will obviously be different.

Install Ruby

So, you’re going to need a Ruby installation, and it’s not included in the stock Ubuntu distribution.To keep things simple, however, you can just install the ruby and ruby1.8-dev packages for Ubuntu by typing

sudo aptitude install ruby ruby1.8-dev

If you want or need to build Ruby from its source code, please see the Ruby downloads page.

Install FOX Dependencies

FXRuby is based on the FOX toolkit, and so we’re going to need to build FOX. But before we can do that, we need to install some libraries that FOX depends on for image file manipulation.

Install ZLib

sudo aptitude install zlib-dev

Install LibPNG

sudo aptitude install libpng-dev

Install LibJPEG

sudo aptitude install libjpeg-dev

Download, Build and Install LibTIFF

You can download the latest source code tarball for libtiff from the LibTIFF home page. As of this writing, the latest version is version 3.8.2. This one’s just the standard configure, make, make install procedure.

tar xzf tiff-3.8.2.tar.gz
cd tiff-3.8.2
./configure
make
make install

Download, Build and Install FOX

You can download the latest source code tarball for FOX from the FOX home page. As of this writing, the latest stable version is version 1.6.36. Note that the latest developer version is 1.7.20 (or so), but that version is incompatible with FXRuby. Be sure to specify the custom settings for CPPFLAGS and LDFLAGS on the configure command line so that it knows where to find the various dependencies.

tar xzf fox-1.6.36.tar.gz
cd fox-1.6.36
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
make
make install

Download, Build and Install FXScintilla

This step is optional, but if you want to be able to use the FXScintilla widget in your FXRuby programs, you’ll need to get the FXScintilla library installed. I’m currently using version 1.71, but there are more recent releases that may work just fine. Download the source code tarball and then build it using the standard mechanism.

tar xzf fxscintilla-1.71.tar.gz
cd fxscintilla-1.71
./configure
make
make install

Clone this wiki locally