(********************************************************************)
(*                                                                  *)
(*  install.txt                                                     *)
(*                                                                  *)
(*  Copyright (C) 1990 - 1994  Thomas Mertes                        *)
(*  All rights reserved.                                            *)
(*                                                                  *)
(*  Documentation: Installation of the Seed7 interpreter            *)
(*                                                                  *)
(*  This file is distributed "AS IS" in the hope that it will be    *)
(*  useful, but WITHOUT ANY WARRANTY; without even the implied      *)
(*  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.*)
(*                                                                  *)
(********************************************************************)


INSTALLATION
============

    The Seed7 package consists of a lot of files. There are two
  ways to install them. In a simple installation just use the seed7
  directorys 'src', 'prg', 'lib'  and 'doc' from the tar file.
  To compile the interpreter just go to the 'src' directory and type:

    make depend
    make

  When the interpreter is compiled just go to the 'prg' directory
  and start a program like hello.sd7 with:

    hi hello

  The programs find their include files in the 'lib' directory.
  It is not necessary to add a directory to the PATH variable.
  It is just necessary that the PATH variable contains '.' .
  When the PATH variable does not contain '.' a program can be
  started with:

    ./hi hello

  This installation can be used for playing a little bit with
  the example programs.

    In a professional installation Seed7 programs can be executed
  direct with their name from any directory and from any user.
  This means that the programs can be used for production
  programs.

    To do a professional installation the following things must
  be done:

    1. Put the seed7 directory at some place. For example:
       /usr/local/src (or /usr/src or your home directory):

         cd /usr/local/src
         su ...
         tar -xvzf seed7_05_yyyymmdd.tgz
         chown -R ... seed7
         exit

    2. Compile the interpreter at this place:

         cd /usr/local/src/seed7/src
         make depend
         make

       The hi interpreter has now the path to the 'lib' directory
       hardcoded as /usr/local/src/seed7/lib. If the 'hi'
       interpreter was compiled at a different place it is
       possible to use the SEED7_LIBRARY environment variable
       as path to a library directory.

    3. Put a link to the interpreter (seed7/src/hi) in a directory
       with public access which is in the search path. In our
       example we chose /usr/local/bin:

         cd /usr/local/bin
         su
         ln -s /usr/local/src/seed7/src/hi .
         exit

       The advantage of being in the search path is that direct
       calls of hi (Like: hi myprog) can be done from any
       directory (Provided that myprog is there).

    To generate a Seed7 program which can be called from any
  directory and from any user the following things must be done:

    1. The first line in the program must be:

         #! /usr/bin/env hi

       The first line informs the (unix like) operating system
       to start the 'env' program which itself searches for 'hi'
       in the directorys of the PATH variable. Then the 'hi'
       interpreter is started to execute the desired program.
       To avoid a search in the PATH variable the path to the
       'hi' interpreter can also be hardcoded as first line:

         #! /usr/local/src/seed7/src/hi

       To suppress the compiling information it is possible to
       add as second line:

         $ info off;

       This is not necessary but we can assume that the program
       is tested and the compiling information is not wanted in
       a production program. If the program wants to search for
       include files at additional directorys it is possible to
       add lines like the following one:

         $ library "../mylib";

    2. Rename the file to the name you want and put it in a
       directory which is member of the path (For example:
       /usr/local/bin).

    3. Make the file executable with

         chmod 755 myprog

    4. Test it by calling from another directory
