
   #############################################################
   #      Artenum's VTK compilation and packaging script       #
   #                           for                             #
   #                         Keridwen                          #
   #                (see http:/www.artenum.com)                #
   #                      Version 1.0.3                        #
   #                        2011/02/15                         #
   #   (c) artenum sarl, France, 2011                          #
   #############################################################



I - Introduction / presentation of the purpose of the script

This UNIX (i.e bash) script will perform the following actions:

1) Check if all tools needed for the VTK compilation (e.g cmake...)
2) Recover online (download) the VTK source code from a given release
if you have a Web access or from a local source tarball
3) Perform Cmake with pre-configurated settings  to obtain a VTK binary 
release compliant with Kerdiwen 2.0 (see http://www.artenum.com/kerdiwen).
4) Perform the compilation
5) Re-pack the binary releases compliant with Kerdiwen 2.0 
6) zip the generated releases and compute the corresponding MD5


II - Pre-requisites and paths

The present script requieres several external tools that should be installed 
before and be present in your path. The script will try to detect them and, 
if all are found, perform the configuration and compilation process.

The following tools are requiered and should be avialable in the PATH:

    - gcc
    - g++
    - make
    - cmake
    - java
    - javac

In addition, the developments layers for OpenGL/MesaGL and X11 should be 
installed. See the relevant software installation system command or the 
relevant Web site. 

In add, the JAVA_HOME path should be properly defined toward your local 
JDK (see section IV). It is recomanded to use a JDK 1.6 and higher. 


III - Use and execution

To perform the whole configuration-compilation-packaging process, please type
the following command:

      ./makeVTKForKeridwen.bash

or, if you have no access to the Web and/or have already a local tarball of 
vtk source codes:

      ./makeVTKForKeridwen.bash PATH_TO_MY_LOCAL_VTK_SRC_TAR_BALL_FILE

To clean all downloaded/generated files, please the command: 

      ./deepClean.bash

Please see and edit the makeVTKForKeridwen.sh to set/change the list of actions
to be performed, the cmake and other compilation flags and settings. 

NB: Additionnal platform informations (e.g version of glibc) are added to 
the packaged releases for a better OS/hardware trackking and support. See 
README.TXT file in each release folders.

NB: In downloading mode, the script downloads the VTK source tarball only 
one time, store it under the tmp-vtk-X.X.X.tar.gz file (where X.X.X is the 
version) and will reuse this file as reference source. To force a new
download, you only need to remove this file. 


IV - Specific comments regarding the Java configuration

If your local Java Development Kit (JDK) is found by the script, any
additional setting is needed. However, on some systems (e.g. RedHat or CentOS)
addtionnal paths should be set using the interactive mode of Cmake. 

To access to Cmake in iterative mode, move to the build sub-directory and
execute the following command: 

      ccmake -i ../VTK

Toggle the advanced mode by typing the t-key and edit the following variables: 

       JAVA_AWT_LIBRARY =====> PATH_TO_MY_JDK/jre/lib/amd64/libjawt.so
       
       JAVA_JVM_LIBRARY =====> PATH_TO_MY_JDK/jre/lib/amd64/server/libjvm.so

Where PATH_TO_MY_JDK is the path to your local JDK. 

Configure (c-key) and generate (g-key) the make files.

Edit the actionList in the makeVTKForKeridwen.bash script as follow
to perform only the end of the compilation and packaging procedure. 

See the Cassandra's Web or Kerdiwen's web pages for further informations
and advices regarding the VTK compilation. 

    http://dev.artenum.com/projects/cassandra/documentation/vtk_compilation


V - License and Warranties

This script is release under the license given in the License directory. 

This script is provided without any guaranty and Artenum, and any of its
employees, can be considered as responsible of any damages or lost of data
resulting from the use of the present script.

VI - Credits

(c) Artenum sarl, France, 2011

Done at Paris, the 30th january 2011. 

contact/questions/bugs/feedbacks: contact@artenum.com


