===========================
*** For developers only ***
===========================

Getting Tom
===========

To get the current source tree of Tom via anonymous svn, use the commands:
svn checkout svn://scm.gforge.inria.fr/svn/tom/jtom/trunk jtom

Developer access is possible via SSH. See
http://gforge.inria.fr/scm/?group_id=78 for detailed instructions.

Installing Tom
==============

The source distribution of Tom consists of the following directory layout:

  jtom
   +--- stable   // contains the stable version
   |
   +--- src      // contains the development branch
   |
   +--- examples // contains examples of Tom use
   |
   +--- application // contains main applications written in Tom
   |
   +--- test     // the test set (used by junit)

Prepare for the build
---------------------
  The Tom build process uses ant (http://ant.apache.org). This build process is
  specified by the build.xml file. You will need to install apache ant and java
  1.4 in order to compile Tom.

  The next optional step is to copy the local.properties_template file, found
  at the root of jtom to local.properties, and edit it to reflect your local
  setup: you can for instance specify the java compiler to use

Build
-----
  To compile the stable distribution of Tom, you have to use the build.sh
  script.
  $ ./build.sh stable

  To build and install the source distribution, you have to do the following:
  $ ./build.sh stable
  $ ./build.sh src.dist

  To list all the available targets for the build:
  $ ./build.sh -projecthelp

  NOTE: for Windows, just use "build.bat" instead of "build.sh"

Setup
-----
Before you can run Tom there is some additional set up you will need
to do:
  - Add the stable/dist/bin and src/dist/bin directories to your path.
    They contains the 'tom' and 'tom.src' scripts, to use Tom.
  - Set the TOM_HOME environment variable to either the stable/dist directory
    or the src/dist directory. Using stable/dist is the safest option. If you
    use src/dist, the 'tom' command will be equivalent to the 'tom.src'
    command, and the source version will always be used. (If you do not set
    TOM_HOME, stable/dist will be the default).
  - Optionally, set the JAVA_HOME environment variable.
    This should be set to the directory where your JDK is installed.
  - To run the examples, we also suggest you to define a TOM_LIB variable
    and update your CLASSPATH:
(bash)
  for i in "${TOM_HOME}"/lib/*.jar
  do
    TOM_LIB="$TOM_LIB:$i"
  done
  export CLASSPATH=${TOM_LIB}:${CLASSPATH}

(csh)
  set TOM_LIB=`echo ${TOM_HOME}/lib/*.jar | tr ' ' ':'`
  setenv CLASSPATH ${TOM_LIB}:${CLASSPATH}

(windows)
  The TOM_LIB variable is automatically set by the script "tom.bat" to contain
  all the jars in the "%TOM_HOME%\lib" folder.
