AMANITH FRAMEWORK INSTALLATION GUIDE
************************************

________
:: UNIX
========

1.Extract all files into a directory (for example: tar -xzf amanith.tar.gz).

2.Export the environment variable AMANITHDIR according to the directory where you have extracted all files (for example: /home/frank/amanith).
  Add $AMANITHDIR/lib path to the LD_LIBRARY_PATH variable.

    2a.For bash/ksh/zsh/sh shells this can be easily done editing the file ~/.profile (see below)

        ...
        QTDIR=/usr/local/qt
        MANPATH=$QTDIR/doc/man:$MANPATH
        PATH=$QTDIR/bin:$PATH
        AMANITHDIR=/home/frank/amanith
        LD_LIBRARY_PATH=$QTDIR/lib:$AMANITHDIR/lib:$LD_LIBRARY_PATH
        export AMANITHDIR QTDIR PATH MANPATH LD_LIBRARY_PATH
        ...

    2b.For csh/tcsh shells edit the file ~/.login (see below)
    
        ...
        setenv QTDIR /usr/local/qt
        setenv MANPATH $QTDIR/doc/man:$MANPATH
        setenv PATH $QTDIR/bin:$PATH
        setenv AMANITHDIR /home/frank/amanith
        setenv LD_LIBRARY_PATH $QTDIR/lib:$AMANITHDIR/lib:$LD_LIBRARY_PATH
        ...

 After you have done this, you will need to login again, or re-source the profile before continuing, so that at least $AMANITHDIR is set.
 
 Note that under IRIX the additional LD_LIBRARYN32_PATH and LD_LIBRARY64_PATH variables are used to specify library search paths.
 Set the variable that matches your configuration, or see the rld(5) man page for more information.

 On AIX set LIBPATH and on HP-UX set SHLIB_PATH instead of LD_LIBRARY_PATH.
 After these settings reboot the system and you have done.

3.Now you are ready to compile the entire framework.
  Note that QMAKE is needed to build AMANITH LIBRARY and QT is needed to build all EXAMPLES.
  First check the file $AMANITHDIR/config/settings.conf, this file contains the settings that you can change to match your preferences.

    3a.To specify Amanith build mode, use this line (dynamic/static and release/debug options are available):

        ...
        BUILD_MODE = dynamic release
        ...

    3b.To specify Amanith real type (FLOAT/DOUBLE), use this line:

        ...
        REAL_TYPE = FLOAT
        ...

    3c.To build Amanith using QT4 libraries (else the system will use QT3 by default), uncomment the line: 

        ...
        # DEFINES += USE_QT4
        ...

  When done follow those steps:
  
    cd $AMANITHDIR
    qmake amanith.pro
    make

 NB: before execute "qmake amanith.pro" BE ABSOLUTELY SURE that $AMANITHDIR env variable is correctly set, else wrong Makefile(s) will be
 generated by qmake. If wrong Makefile(s) have been generated, you need to do "make clean" AND to delete all generated Makefile(s) (and 
 Makefile.Release/Makefile.Debug too), this is due to the fact that qmake do not overwrite already generated Makefile(s).
 A simple way to clean your bad build could be:
 
    make clean
    find ./ -name "Makefile" -delete
    find ./ -name "Makefile.Release" -delete
    find ./ -name "Makefile.Debug" -delete

 Then, you can retry.
 
4.If all operations have been a successful ending, you can found compiled libs into $AMANITHDIR/lib and plugins in $AMANITHDIR/plugins.
  You can start looking some examples in $AMANITHDIR/examples directory or just visit http://www.amanith.org to get tutorials, documentation
  and support. If examples didn't start it's possible that link editor (ld) can't see Amanith shared library, make sure that LD_LIBRARY_PATH
  is correctly set or make a symbolic link to Amanith shared library inside your system default libraries directory.

5.Don't forget to read LICENSE.QPL to understand the license terms.


___________
:: MACOS X
===========

1.Extract all files into a directory (for example: tar -xzf amanith.tar.gz).

2.Export the environment variable AMANITHDIR according to the directory where you have extracted all files (for example: /Users/frank/amanith)
  Add $AMANITHDIR/lib path to the DYLD_LIBRARY_PATH variable.

    2a.For bash shell this can be easily done editing the file ~/.profile (see below)

        ...
        QTDIR=/Developer/qt
        PATH=$QTDIR/bin:$PATH
        AMANITHDIR=/Users/frank/amanith
        DYLD_LIBRARY_PATH=$QTDIR/lib:$AMANITHDIR/lib:$DYLD_LIBRARY_PATH
        export AMANITHDIR QTDIR PATH LD_LIBRARY_PATH
        ...

    2b.For csh/tcsh shells edit the file ~/.login (see below)

        ...
        setenv QTDIR /Developer/qt
        setenv MANPATH $QTDIR/doc/man:$MANPATH
        setenv PATH $QTDIR/bin:$PATH
        setenv AMANITHDIR /Users/frank/amanith
        setenv LD_LIBRARY_PATH $QTDIR/lib:$AMANITHDIR/lib:$LD_LIBRARY_PATH
        ...

3.Set the environment variables for the Finder, so all programs that use Amanith can be executed without problems through Finder.
  Apple provides a mechanism for this via a special file, ~/.MacOSX/environment.plist (Careful, it's case sensitive, of course). This XML file
  can be created with the Property List editor, or your favorite text editor. Here's a sample:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>QTDIR</key>
            <string>/Developer/qt</string>
            <key>AMANITHDIR</key>
            <string>/Users/frank/amanith</string>
            <key>DYLD_LIBRARY_PATH</key>
            <string>/usr/local/lib:/Developer/qt/lib:/Users/frank/amanith</string>
        </dict>
    </plist>

  After these settings reboot the system and you have done.

4.Now you are ready to compile the entire framework.
  Note that QMAKE is needed to build AMANITH LIBRARY and QT is needed to build all EXAMPLES.
  First check the file $AMANITHDIR/config/settings.conf, this file contains the settings that you can change to match your preferences.

    4a.To specify Amanith build mode, use this line (dynamic/static and release/debug options are available):

        ...
        BUILD_MODE = dynamic release
        ...

    4b.To specify Amanith real type (FLOAT/DOUBLE), use this line:

        ...
        REAL_TYPE = FLOAT
        ...

    4c.To build Amanith using QT4 libraries (else the system will use QT3 by default), uncomment the line: 

        ...
        # DEFINES += USE_QT4
        ...
  
  When done follow those steps:
  
    cd $AMANITHDIR
    qmake amanith.pro
    make

 NB: before execute "qmake amanith.pro" BE ABSOLUTELY SURE that $AMANITHDIR env variable is correctly set, else wrong Makefile(s) will be
 generated by qmake. If wrong Makefile(s) have been generated, you need to do "make clean" AND to delete all generated Makefile(s) (and 
 Makefile.Release/Makefile.Debug too), this is due to the fact that qmake do not overwrite already generated Makefile(s).
 A simple way to clean your bad build could be:

    make clean
    find ./ -name "Makefile" -delete
    find ./ -name "Makefile.Release" -delete
    find ./ -name "Makefile.Debug" -delete

 Then, you can retry.
 
4.If all operations have been a successful ending, you can found compiled libs into $AMANITHDIR/lib and plugins in $AMANITHDIR/plugins.
  You can start looking some examples in $AMANITHDIR/examples directory or just visit http://www.amanith.org to get tutorials, documentation
  and support. If examples didn't start it's possible that link editor (ld) can't see Amanith shared library, make sure that DYLD_LIBRARY_PATH
  is correctly set or make a symbolic link to Amanith shared library inside your system default libraries directory.

6.Don't forget to read LICENSE.QPL to understand the license terms.


___________
:: WINDOWS
===========

1.Extract all files into a directory (for example: C:\Amanith).

2.Export the environment variable AMANITHDIR in according with the directory where you have extracted all files, this can be easily done with
  regedit.exe following those steps:

    search key HKEY_CURRENT_USER\Environment
    add new Expandible String (REG_EXPAND_SZ)
    rename this to "AMANITHDIR"
    set the value to "C:\Amanith"

  now add AMANITHDIR\lib to the PATH

    add the value "C:\Amanith\lib" to "PATH"

  After this, the key HKEY_CURRENT_USER\Environment can be look like this:

    ...
    "LIB"="C:\Programs\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\"
    "INCLUDE"="C:\Programs\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\"
    "PATH"="C:\Qt\3.3.1\bin;C:\Amanith\lib"
    "QTDIR"="C:\Qt\3.3.1"
    "QMAKESPEC"="win32-msvc.net"
    "AMANITHDIR"="C:\Amanith"
    ...

3.Now you need to logout/login your user to be sure that all environment variables will be recognized by the system; after this step you are ready to
  compile the entire framework. If you want to compile Amanith without QT libraries, you can use the visual studio solution %AMANITHDIR%/amanith.sln
  ignoring the rest of this document, but in this case all options are fixed (dynamic build and double real type), else note that QMAKE is needed
  to build AMANITH LIBRARY and QT is needed to build all EXAMPLES.
  First check the file %AMANITHDIR%/config/settings.conf, this file contains the settings that you can change to match your preferences.

    3a.To specify Amanith build mode, use this line (dynamic/static and release/debug options are available):

        ...
        BUILD_MODE = dynamic release
        ...

    3b.To specify Amanith real type (FLOAT/DOUBLE), use this line:

        ...
        REAL_TYPE = FLOAT
        ...

    3c.To build Amanith using QT4 libraries (else the system will use QT3 by default), uncomment the line: 

        ...
        # DEFINES += USE_QT4
        ...
  
    3d.To build Amanith using MinGW compiler (not officially supported), uncomment the line:

        ...
        # DEFINES += WIN32_MINGW
        ...

  When done follow those steps:

    cd %AMANITHDIR%
    qmake amanith.pro
    nmake

 NB: before execute "qmake amanith.pro" BE ABSOLUTELY SURE that %AMANITHDIR% env variable is correctly set, else wrong Makefile(s) will be
 generated by qmake. If wrong Makefile(s) have been generated, you need to do "make clean" AND to delete all generated Makefile(s) (and 
 Makefile.Release/Makefile.Debug too), this is due to the fact that qmake do not overwrite already generated Makefile(s).
 A simple way to clean your bad build could be:

    nmake clean
    del /S Makefile
    del /S Makefile.Release
    del /S Makefile.Debug

 Then, you can retry.

4.If all operations have been a successful ending, you can found compiled libs into %AMANITHDIR%/lib and plugins in %AMANITHDIR%/plugins.
  You can start looking some examples in %AMANITHDIR%/examples directory or just visit http://www.amanith.org to get tutorials, documentation
  and support. If examples didn't start it's possible that windows can't see Amanith shared library, make sure to have %AMANITHDIR%/lib in your
  PATH.

5.Don't forget to read LICENSE.QPL to understand the license terms.
