FRII is the client-side program, and, as such, it runs in binary form on the different platforms. It can be built on Linux (and probably other UNIX variants) with X11 support, Mac OS X with Carbon support, or Windows with Windows graphics support.
Software You Need
You need to install several packages first.
1. cmake, a configuration/build management system
2. FLTK, the graphics toolkit used by FRII
3. Xerces-C, an XML parsing toolkit
Build and install these. (See Windoze Notes, below, for Windows instructions.)
Basic Build Instructions
Check out the entire tree, e.g.
svn co http://svn.idyll.org/repos/cartwheel/trunk cartwheel-tree
In the cartwheel-tree directory, type
Ideally, you should end up with a binary at the end, cartwheel-tree/FRII/app/FRII.
To build either paircomp or motility independently of the rest of FamilyRelations?, go into the paircomp/ or motility/ subdirectories of the cartwheel-tree directory and run cmake . && make there.
Right now, I only compile FRII inside of cygwin, a UNIX emulation environment for Windows. It should be possible to get it working in Visual Studio; cmake will produce VS project files.
For cygwin, I recommend building the Xerces xml parser as well as FLTK yourself, inside of cygwin. Build the Xerces parser according to the instructions for cygwin. For FLTK, you want to *avoid* using -mno-cygwin; check the file makeinclude after running configure to remove all of the -mno-cygwin flags. If you get link errors at the end of compiling FRII, talk to me.
So, to be clear, to compile FLTK on cygwin for use with FRII:
1. Get fltk-1.1.7.
2. Unpack & run ./configure inside of cygwin.
3. Edit the resulting 'makeinclude' file, removing '-mno-cygwin' wherever it appears.
4. make and make install
You may get some errors during the make; I have to edit src/fl_draw_pixmap.cxx and src/fl_draw_image.cxx and add #define U32 int at the top of both files in order for things to compile properly.
At this point, you should be able to compile everything.
Mac OS X Notes
To create an architecture-independent binary, you will need to compile FLTK and Xerces-C++ in architecture-independent mode.
For FLTK, you should be able to use cmake to generate an Xcode project, after which you can just 'select' both architectures. (When I have to do this again for a new version of FLTK I'll figure it out and write better instructions --titus)
To configure Xerces to compile in cross-platform (i386 + ppc) mode:
./runConfigure -p macosx -n native -t native -z -arch -z i386 -z -arch -z ppc -l -arch -l i386 -l -arch -l ppc -l -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
Note that you may need to 'ln -fs /usr/local /Developer/SDKs/MacOSX10.4u.sdk/usr' first.
If (for some reason) you want to port FRII to a new platform, all you need is the GNU C compiler, cmake, FLTK, and the Xerces C XML parser. If you can get those for your platform, you can almost certainly get FRII to work!
If you have trouble importing the Python shared libraries, e.g. you see an error message like this:
...python/paircomp/_paircomp_parser.so: cannot restore segment prot after reloc: Permission denied
then you are probably running some secure variant of Linux such as SELinux, and you need to change the permissions on the shared libraries:
chcon -t texrel_shlib_t python/paircomp/_paircomp_parser.so
David Chiu, for reporting the "segment prot" error.