All of the source code for FXRuby is available for anonymous, read-only CVS access. This chapter describes how to check out the sources for either the stable or development release of FXRuby and then build FXRuby from those sources. The information in this chapter builds on the basic CVS instructions provided for any RubyForge hosted project, and specifically those instructions for the FXRuby project hosted at RubyForge.
There are some prerequisites. Obviously, you're going to need to have some kind of CVS client installed on your system and have a clue about how to use it to check out code from a remote repository. Please do not send me questions about how to install or use CVS. The best source of information in this case is the CVS home page and, in particular, Per Cederqvist's CVS manual. Next, if you intend to make changes to the SWIG interface files (e.g. to change the behavior of some of the wrapped functions, or to add new ones), you'll need to have a working SWIG installation so that you can regenerate the C++ source files from the modified SWIG interface files. I always use the latest development version of SWIG, but any release after, say, SWIG 1.3.15 should work fine. The older SWIG 1.1 releases will definitely not work.
The stable version of FXRuby is the 1.0.x branch and is compatible with any of the FOX 1.0.x releases. It is not compatible with any other release branches of FOX (e.g. the FOX 1.2.x or 1.3.x series of releases).
To check out the stable version of FXRuby, do the following:
Log in to the CVS server by typing:
cvs -d:pserver:email@example.com:/var/cvs/fxruby login
When prompted for a password for anonymous, simply press the Enter key.
Check out the stable branch of FXRuby by typing:
cvs -z3 -d:pserver:firstname.lastname@example.org:/var/cvs/fxruby co -rrelease10 FXRuby
At this point, you should be ready to change to the top-level directory and go through the normal build and installation process, as described in an earlier chapter.
If you make changes to any of the SWIG interface files (the files ending with a .i extension, in the swig-interfaces subdirectory) you will need to re-run SWIG to regenerate parts of the FXRuby source code:
Change directories to the swig-interfaces subdirectory of the FXRuby source tree.
Type the following command to create a "bootstrap" dependencies file:
You should only need to do this for the initial checkout of the sources; after that, the dependencies file will be updated as described in the next step.
Build the "depend" target to generate the real dependencies file by typing:
Finally, regenerate the sources by typing: