Free Objects for Xtallography

version 1.6.0.2

Fox Home Page

News
Introduction
Screenshots
Download
Installation
License

Manual
Reference
Examples
Tutorial PbSO4
Tutorial Cimetidine
F.A.Q.
Hints & tricks

Mailing List
Subscribe
Archive

Development & Helping
Compiling Fox
SF project page
Browse CVS

Getting & Testing development versions of Fox

Introduction


This page describes how to get the source of Fox (Free Objects For Crystallography), and compile it under Linux and windows. It also describes how to get up-to-date versions of Fox from the development tree.

Requirements:

  • Linux: gcc 2.95.3 or (preferably) 3.1 and above, OpenGL and GLUT librairies
  • windows: win 98, NT4 or above (win95 will not have OpenGL (3D structures) working, but otherwise works)
  • For both Linux and windows, you will need the wxWindows library, version 2.4 or above.

Getting & installing the compilers


For Linux, you should have nothing to do here, since your box certainly includes development libraries. Fox is now developped under gcc 3.3.1, but should work down to gcc 2.95.3.


For windows:

  • you will need the free Borland compiler (command-line-tools) 5.5.1, which you can get at: http://www.borland.com/bcppbuilder/freecompiler/ You will need to register first, but it's free. To install the tools, just run the installer. I'll assume that they are in C:/Borland/ (it may be required not to be installed in a path including spaces such as "../Program Files/..", according to the the wxWindows installation program).

  • Then create the following two files in the same directory where you have the compiler and linker (e.g., c:\Borland\Bcc55\bin, replace c:\Borland\Bcc55 with the actual path where you installed Borland C++ 5.5.1):
    • bcc32.cfg, text file containing the following two lines:
      • -I"c:\Borland\Bcc55\include"
      • -L"c:\Borland\Bcc55\lib"
    • ilink32.cfg ,text file containing the following line:
      • -L"c:\Borland\Bcc55\lib"
    You will also need to add the c:\Borland\Bcc55\bin to your PATH, and to add the following variable to your environment: set BCCDIR=c:\Borland\Bcc55 You may need to restart after changing these environment variables, depending on windows version.

    Note that updates to the Borland compiler can be found at http://www.borland.com/devsupport/bcppbuilder/patches/#freecompiler55 .

Check you have OpenGL installed

(the glut library is not required any more)

For Linux, you need Mesa libraries. Check you have gl.h and glu.h in /usr/include/GL/, and the corresponding libraries (libGL, libGLU) These are generally installed by default. NVidia users will need the nVidia drivers. You will also need to install the glut library (in Fox v1.5, this was not necessary but the new method does not work as expected on some graphic drivers... You stick to the Fox v1.5 method by removing the "-DHAVE_GLUT" and "-lglut" in the Fox/ObjCryst/rules.mak file)

For windows, the necessary headers are installed by default with the Borland compiler.

Getting & installing the wxWindows Library (version 2.4 or above required)

For Linux:

  • It is easier to use the RPM. To avoid any possible conflicts due to different versions of wxWindows, please recompile the wxGTK source rpm (which you can get at http://www.wxwindows.org/) on your machine (rpm --rebuild wxGTK-***.src.rpm), and then install the recompiled RPM (wxGTK, wxGTK-gl and wxGTK-devel). Fow has been tested with wxWindows 2.4.2.

  • Then you will need to do the following for wxGTK 2.4.*:
    • ln -s /usr/bin/wxgtk-2.4-config /usr/bin/wx-config, or (for GTK2)ln -s /usr/bin/wxgtk2-2.4-config /usr/bin/wx-config
  • If you want to install from the source rather than install the rpm, do not forget to configure with --enable-opengl. By default shared libraries are produced (*.so), which is what Fox now uses (no static libraries).
For windows:
  • Get the wxWindows installer (wxMSW 2.4.* only, 2.2 is not supported any more) at http://www.wxwindows.org/, then run the wx installer to put everything in the directory of you choice (I'll assume it is C:\dev\wxWindows)

  • Edit the C:\\dev\\wxWindows\\include\\wx\\msw\\setup.h and search for "OpenGL" and enable it:define wxUSE_GLCANVAS 1

  • Add the WXWIN variable to your environment (set WXWIN=C:\dev\wxWindows)

  • then (in a DOS/Command prompt) go to the C:\dev\wxWindows\src\msw\ directory, and type: make -f makefile.b32 FINAL=1

Get the source of Fox

For Linux, just get the regular Fox-***.tar.bz2 and uncompress (tar -xjf or tar-xIf depending on tar version) wherever you want. It will create a Fox directory with everything in it.

For windows, get the Fox-***-src.zip and unzip it wherever you want (preferably in the same directory as wxWindows). It creates a Fox subdirectory with everything in it.

Compile Fox

Note: in all cases you may need to edit the Fox/src/ObjCryst/rules.mak file, which includes at the very beginning some paths. For Linux it should be OK, but for windows you will need to correct the wxWindows directories

Linux:

  • In the Fox directory, just type 'make', which creates Fox in fox/src/ObjCryst/wxCryst/.

  • Then 'make install' will copy Fox to /usr/local/bin/Fox.

  • Note that if you do "make debug=1", it will be compiled with debug messages which can be interesting (adds a debug menu in Fox, level 0 meaning a lot of messages, and 10 the minimum. Each time you change the debug=0 or debug=1 flag, make sure you do a "make clean" before rebuilding)
For windows:
  • In the Fox directory, just type 'make'. This will create Fox in the same directory. You can activate the debug version by changing to "debug=1" in the src/ObjCryst/rules.mak file (you have to do a "make clean" each time you rebuild while changing the debug status).

Testing

Well, just try the examples, or your data while displaying both 3D structure and powder pattern(s). Optionally, run several optimizations (several examples) at the same time. Try new features... Change the structural/pattern parameters while graph windows are already shown and then update them... Run it overnight...

Updating the Fox /ObjCryst++ source code using CVS

Quick version:
  • The source of Fox is distributed with the CVS information, so just typing 'make update' in the Fox directory will do the cvs update for you, on both Linux and windows (for windows you need the CVS client application, see at the end of the page; any decent Linux installation will already have CVS).

  • To know what changes have been recently made and get a readable changelog, I recommend using the cvs2cl Perl script.
Longer version:
  • A word about CVS (concurent Version System): it is (in a nutshell), a way to store source code, update it from different places and by different people, and keep a complete story of the modifications. More info on http://www.cvshome.org.

  • In the ObjCryst++ CVS (which includes Fox) (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/objcryst/), there are 3 different development stages (The 'make update' command gets the latest version):
    • - The latest version ("HEAD"), with all most recent modifications. This can be unstable, as I tend to make a lot of small modifications.
    • - The "TESTING" version, which includes all recent modifications which I deem stable enough on a few cases, but for which no thorough check has been made. This should not be more than a few modifications behind the latest version.
    • - the "RELEASE" version, which corresponds to the latest released version of Fox or ObjCryst++.
  • To test Fox, or get recent features, you should either get the TESTING version or the latest (not for the faint of heart, though).

  • The cvs access is anonymous, with a blank password. If you want to do the cvs update yourself, note that there are two modules, 'ObjCryst' and 'Fox' which you will need, as well as the See the CVS notes on sourceforge (http://sourceforge.net/cvs/?group_id=27546).

  • client for windows: you need a CVS client. The simplest is to get the command-line client which uses the same options as the linux one (see above), at http://www.cvshome.org/downloads.html.You may also use wincvs (http://www.wincvs.org), which I have not tested.

Documentation © Vincent Favre-Nicolin , generated on 13 Dec 2003 by doxygen 1.2.18
This project is hosted on SourceForge and mirrored on CCP14 ( UK, Canadian Mirror, US Mirror)