Appendix F. Getting the Sources from CVS
Prev | Part II. Appendices |

## Appendix F. Getting the Sources from CVS

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 SourceForge hosted project, and specifically those instructions for the FXRuby project hosted at SourceForge.

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.

## Checking out the stable version

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 the development releases of FOX (i.e. the FOX 1.1.x releases).

To check out the stable version of FXRuby, do the following:

1. Log in to the CVS server by typing:

       cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/fxruby login

   When prompted for a password for anonymous, simply press the Enter key.

2. Check out the stable branch of FXRuby by typing:

       cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/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.

## Regenerating wrapper code with SWIG

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:

1. Change directories to the `swig-interfaces` subdirectory of the FXRuby source tree.

2. Type the following command to create a "bootstrap" `dependencies` file:

       touch dependencies

   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.

3. Build the "depend" target to generate the real `dependencies` file by typing:

       make depend

4. Finally, regenerate the sources by typing:

       make

Prev | Up |
Virtual Functions | Home |