		INSTALLING the NIST Data Flow System II

This document explains how to install the NDFS-II under Linux and Mac OS-X.

Depending on the permissions od the directories where you choose
to install the NDFS-II, you may need to be logged as root.

1. First you need to install ACE (Adaptative Communication Environment) 5.* 
   libraries and Qt4 libraries on your system.

   The latest version of ACE can be downloaded here: 
        http://www.cs.wustl.edu/~schmidt/ACE.html
   You need to compile it and install it. You may find some rpm of ACE 
   depending on your operating system. If you download the rpm, you will 
   get the ACE library, you need to install the header files (the devel package).
   Once ACE is installed you need to set up the $ACE_ROOT variable. 
   If you install ACE in /opt/ACE you need to add in your .login,
    .profile or .tcshrc (in case your shell is csh or tcsh)
	
	setenv ACE_ROOT /opt/ACE
	
	setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${ACE_ROOT}/lib       (for linux/unix)
	setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${ACE_ROOT}/lib   (for Mac OS)


   If your shell is bash, you need to add the following lines in 
   your .login, .profile or .bashrc:

        ACE_ROOT=/opt/ACE

	LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ACE_ROOT}/lib         (for linux/unix)
	DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${ACE_ROOT}/lib     (for Mac OS)

	export ACE_ROOT
   
2. After you installed ACE, you need to make sure Qt3 is installed 
   on your system. Qt3 is present by default on most Linux system.
   If Qt is not present, you need to download it from here:
	
	ftp://ftp.trolltech.com/qt/source/	

   Install Qt and make sure to properly set up environment variables. 
   If you install qt in /opt/qt, you need to add the following lines 
   in your .login, .profile or .bashrc (in case your shell is bash):

	QTDIR=/opt/qt
        PATH=$QTDIR/bin:$PATH
   
        #for linux/unix
	LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
	#for Mac OS
	DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH

	#for linux/unix
        export QTDIR PATH MANPATH LD_LIBRARY_PATH   
	#for Mac OS	
	export QTDIR PATH MANPATH DYLD_LIBRARY_PATH   

  If your shell is csh or tcsh, you need to add the 
  following lines in your .tcshrc, .login or .profile

	setenv QTDIR /opt/qt
        setenv PATH $QTDIR/bin:$PATH
       
	#for linux/unix
        setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH
	#for Mac OS
	setenv DYLD_LIBRARY_PATH $QTDIR/lib:$DYLD_LIBRARY_PATH

3. After Qt and ACE are properly installed, you can take care of 
   the NDFS-II. First you need to unpack the archive if you 
   haven't already done it:

	cd /opt                      #if you want to install it in /opt
	tar -xzf Smartflow2.tar.gz   #uncompress and unpack the archive

   After that, you have the directory /opt/Smartflow2 
   containing the files from the archive.

4. Now you need to set up some environment variables for the NDFS-II. 
   You need to set up the $SF2_ROOT library.
   Add this following lines to your .login, .profile 
   or .tcshrc file (if your shell is csh or tcsh):

	setenv SF2_ROOT /opt/Smartflow2

	#for linux/unix
 	setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${SF2_ROOT}/lib:${SF2_ROOT}/lib/messages:${SF2_ROOT}/lib/flows 
	#for Mac OS
	setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${SF2_ROOT}/lib:${SF2_ROOT}/lib/messages:${SF2_ROOT}/lib/flows 

        setenv PATH ${PATH}:${SF2_ROOT}/bin/admin

   If you use bash, add the following lines to 
   your .login, .profile or .bashrc

	SF2_ROOT=/opt/Smartflow2
        
	#for linux/unix
	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SF2_ROOT/lib:$SF2_ROOT/lib/messages:$SF2_ROOT/lib/flows
        #for Mac OS
	DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$SF2_ROOT/lib:$SF2_ROOT/lib/messages:$SF2_ROOT/lib/flows
	
	PATH=$PATH:$SF2_ROOT/bin:$SF2_ROOT/bin/admin
	
	#for linux/unix
	export SF2_ROOT LD_LIBRARY_PATH PATH
	#for Mac OS
	export SF2_ROOT DYLD_LIBRARY_PATH PATH	

   Note: If you don't want to edit your .profile, .login, .tcshrc 
   or .bashrc. You can customize the files env.csh 
   (if you have csh or tcsh shell), or env.sh (if you have a bash shell).

5  For Mac OS X only. If you are buiding the data flow on Mac OS X, it is 
   recommanded to set the environment variable MACOSX_DEPLOYMENT_TARGET:
   
   #For bash
   export MACOSX_DEPLOYMENT_TARGET=10.4
   
   For tcsh
   setenv MACOSX_DEPLOYMENT_TARGET 10.4

6. You are now ready to compile the NDFS-II system.
   
   Qmake is used to generate the Makefiles. 
   Run 'qmake' in the root directory of the NDFS-II 
   and wait for the build to finish. 
  
   Once the Makefile are created, run 'make to build the NDFS-II. 
   It will first compile the NDFS-II library, then the server 
   (and duplicator), the flows, the client nodes and finally the tools.

   There will be few warnings coming from "unused arguments" 
   or "unused variables.

7. We used Doxygen to create the API documentation.
   Run "doxygen" in the root directory of the NDFS-II,
   and start browsing the documentation at 
   Documentation/API/html/index.html

8. That's it! The NDFS-II is now ready to be used. Enjoy!

   Before launching any client node, you need to launch a SmartFlow-II server.
   Read README for further information.
