Basic Installation
==================

   Installation instructions depend on the platform.
	

FisPro web site
===============
The full distribution is available on line, http://www.inra.fr/internet/mia/M/fispro/

Requirements
============

1-A Java 2 virtual machine (at least version 1.6) is required for executing FisPro. It is available on many operating systems. 
To check:
* Open a command window (Windows) or a terminal window (Linux/UNIX)
* Type java -version
If it returns a string >=1.6, you have a Java virtual machine compatible with the FisPro distribution and you do not need to install a new one.

Note that administrator privileges are required to install the Java Virtual Machine.

Java 2 virtual machines can be found for any platform at http://sun.java.com

The java3d extension must be installed for 3d graphic viewing. If not
installed, 3d functionalities will be disabled.
It is provided in the  FisPro distribution.
If Java3D is not installed, FisPro will work except for the 3D graphs.

2-A html browser

To display FisPro help files,  an html browser is needed, such as FireFox or Internet Explorer.

3-The GSL (Gnu Scientific Library) library 

Both shared libraries (libgsl and libgslcblas) are required by FisPro at runtime. They are included in the win32 FisPro distribution, and installed as dependencies by rpm or debian packages. For other platforms, the gsl package must be installed.

DATA
========

The subdirectory DATA contains data, configuration file examples and a sample script to try out FisPro.

Installation on Windows
=======================

1-Two binary distributions of FisPro (32 and 64 bits) are available, provided as self-installing packages. They have been tested on Windows XP and Windows 7 (32 bit or 64 bit).
Unpacking will create a fispro directory and an entry in the Start Program.

2- Execution
To run FisPro, double click on the Desktop shortcut, or run the FisPro entry in the Start program. 


Installation on Linux/UNIX
==========================
 1- Several binary pre-compiled packages are available for Linux distributions, as rpm or debian packages.
These packages were built using the OpenSuse on line build service, and they are available at:

http://download.opensuse.org/repositories/home:/mistea/

Note for debian/ubuntu users:
----------------------------- 
The following procedure is required to access the download repository.

edit /etc/apt/sources.list
to add as last line the repository address, for instance for Ubuntu >=10.04
deb http://download.opensuse.org/repositories/home:/mistea/xUbuntu_10.04 ./user@
or for Ubuntu 9.10
deb http://download.opensuse.org/repositories/home:/mistea  xUbuntu_9.10/ 


eventually add the key (available on FisPro web site)
sudo apt-key add Release.key

Note for CentOS rpm installation:
---------------------------------
The following error message "cannot restore segment prot after reloc" appears on some CentOs distributions when running FisPro installed from the rpm binary package. The reason is that the fispro rpm provides a shared object library. A workaround is to disable SElinux. For permanent solution, login as root, edit the /etc/selinux/config to set SELINUX=disabled on the file. Do a reboot after editing the file.


If there is no available binary package for your distribution of Linux, or to use FisPro on Unix,  the C++ sources will have to be compiled to create the shared library needed by the Java interface, as explained below.
pile the C++ sources, as explained below.

2- If you installed Fispro from a pre-compiled binary  package, the installation directory is:

/opt/fispro-3.5

There is a script called fispro in /opt/fispro-3.5/bin, which was linked to /usr/bin during Fispro installation.

For rpm based distributions and kde menus, a menu entry is created in the Applications section to run FisPro.
You can also run the FisPro interface by calling the /usr/bin/fispro script from a terminal.

3- C++ programs are available in /opt/fispro-3.5/bin. 


Sources
=======
* FisPro sources are available. 

To compile sources, first copy directory hierarchy onto the hard disk.
Java sources are in the java subdirectory of the FisPro root directory, and C++ sources are in the cpp subdirectory.

1-Requirements: 
* an ansi C++ compiler which can handle exceptions (gcc version >=3.0 for instance).
* the gsl development library (http://www.gnu.org/software/gsl). 
* a java 2 development kit (jdk) with the java3d extension. (http:/sun.java.com).
They must be installed prior to compiling FisPro sources.


2-To compile C++ sources:

* Change directory 

cd cpp

* on Linux, with a gcc compiler, check that gcc-v returns gcc version >=3.0. this is necessary for exception handling. If your version of gcc is <3.0, you need to install a newer version.

If necessary:
Edit the JDK line of the makefile.gcc to point onto the Java Development Kit root directory.
Edit the GSL line of the makefile.gcc to point onto the gsl directory.
make 

Option: to use a shared library for C++ binaries, set the NODYN variable to false:
------
make NODYN=false

to install binaries:
--------------------
from fispro root directory:

make install DESTDIR=$HOME/fispro-3.5

will install fispro jni library, script to run fispro and C++ binaries in the DESTDIR directory.
Then edit the $DESTDIR/bin/fispro script, and change the first line
export FISPRO=/opt/fispro-3.5
into
export FISPRO=$HOME/fispro-3.5

* on WindowXX:
- with the gcc compiler (available at http://www.mingw.org)
Edit the JDK line of the makefile.bc to point onto the Java Development Kit root directory.
Edit the GSL line of the makefile.gcc to point onto the gsl directory.
Set the environnement variable OS to WIn32:
- with the msys shell, type
OS=WIN32
- or by modifying the makefile, uncommenting the line
OS=WIN32

Then
make 

The binary program and dynamic library size can then be reduced by using the gnu utility strip (see stripexec.bat in the bin subdirectory).
The make utility will create a shared library (jnifis.dll on Windows, libjnifis.so on Linux/UNIX), and separate binaries. Those binaries use a shared library (libfisprob.so) on Linux/UNIX, but not on Windows.



3-To compile java sources:
The java interface is distributed as a jar file, created with java 1.6.0.14, and usable on any platform to run with a virtual machine java1.5 or later. 
If you do not modify the java sources, you do not need to compile them. To compile, follow the steps below. 
The compilation procedure will create a jar file which contains all FisPro java classes.
To compile java sources you need a jdk (java 2 development kit) with the java3d extension.

* Change directory 

cd java

* on WindowXX
Note : a WindowXX make utility for Window is distributed with FisPro, and available in the java top directory.

Edit the JAVA_PATH line of the makefile.java.win file to point to the Java Virtual Machine root directory, then type:

make -f makefile.util.java.win
make -f makefile.java.win 
this creates the fispro.jar file and puts it in the bin/jar directory

* on Linux/UNIX
Edit the JAVA_PATH line of the makefile.java file to point to the Java Virtual Machine root directory, then type:

make -f makefile.util.java
make -f makefile.java 
this creates the fispro.jar and util.jar files and puts them in the bin/jar directory




Notes for Linux/UNIX users
=========================

1-if you get  messages such as
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific] not found
when launching fispro,
you should edit the font.properties file located in the java virtual machine runtime jre/lib sudirectory.
A font.properties file which corrects this java bug is distributed with FisPro.


Known Problems
==============

1- 3D plots used in the Fis Menu (System response -> Surface) and in
the Data Menu (View - XYZ plots) require the official java3D extension to the Java virtual machine
(JVM). A link to java3D is available on FisPro web site.

2-Test the FisPro installation by running the steps described in the TEST file, and follow the advices given in that file. Common problems are due to the decimal separator choice (. or ,) and/or to the jvm 1.6.


Note for MacOs X
----------------
FisPro uses a JNI library, to be loaded by the Java Virtual  Machine at execution time. 
To build the library, please see the file README-building-MacOSX.
