Skip to content

Setting Up a Windows Development Environment

lylejohnson edited this page Sep 13, 2010 · 18 revisions

If you would like to be able to build FXRuby from source on Windows, and perhaps even contribute patches back to the project, you’re going to need to set up a development environment. This page describes how to set up an FXRuby development environment based on the developer kit from the RubyInstaller project.

Download and Install the RubyInstaller DevKit

Start by downloading and installing one of the “preview” releases of the new Ruby one-click installer that’s based on MinGW. I used the ruby-1.8.6-p383 release, but the process described here should work with any of their MinGW-based releases. Next, you’ll want to download and install their development kit. This process is described in detail on their Wiki and so I won’t rehash it here.

Download, Build and 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 download, build and install some libraries that FOX depends on for image file manipulation.

Download, Build and Install ZLib

You can download the latest source code tarball for zlib from the zlib home page. As of this writing, the latest version is version 1.2.3.

tar xzf libz-1.2.3.tar.gz
cd libz-1.2.3
./configure
make
make install

Download, Build and Install LibPNG

You can download the latest source code tarball for libpng from the PNG home page. As of this writing, the latest version is version 1.2.39. Note that libpng needs to know how to find zlib (which we just installed into /usr/local), so you want to pass in custom settings for CPPFLAGS and LDFLAGS on the configure command.

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

Download, Build and Install LibJPEG

You can download the latest source code tarball for libjpeg from the Independent JPEG Group. As of this writing, the latest version is version 7.

tar xzf jpegsrc.v7.tar.gz
cd jpeg-7
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
make
make install

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.

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.

tar xzf fox-1.6.36.tar.gz
cd fox-1.6.36
./configure
make
make install

Clone this wiki locally