%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%W  install.tex            GAP documentation                  Greg Gamble
%%
%H  $Id: install.tex,v 4.6 2006/01/31 11:18:12 gap Exp $
%%
%Y  Copyright (C) 2001, School of Math & Comp. Sci., St Andrews, Scotland
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Installing and Loading the Example Package}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Installing the Example Package}

To install the {\Example} package, unpack the archive file, which  should
have a name of form `example-<XXX>.zoo' for some version number <XXX>, by
typing

\){\kernttindent}unzoo -x example-<XXX>

in the `pkg' directory of your version of {\GAP}~4,  or  in  a  directory
named `pkg' (e.g.~in your home directory). (The only essential difference
with installing {\Example} in a `pkg' directory different to the {\GAP}~4
home directory is that one  must  start  {\GAP}  with  the  `-l'  switch,
e.g.~if your private `pkg' directory is a subdirectory of `mygap' in your
home directory you might type:

%begintt
\){\kernttindent}gap -l ";<myhomedir>/mygap"
%endtt

where <myhomedir> is the  path  to  your  home  directory,  which  (since
{\GAP}~4.3) may be replaced  by  a  tilde.  The  empty  path  before  the
semicolon is  filled  in  by  the  default  path  of  the  {\GAP}~4  home
directory.)

After unpacking the archive, go to the newly created `example'  directory
and call `./configure <path>' where <path> is the path to the {\GAP} home
directory. So for example if you install the package in  the  main  `pkg'
directory call

\begintt
./configure ../..
\endtt

This will fetch the architecture type for which {\GAP} has been  compiled
last and create a `Makefile'. Now simply call

\begintt
make
\endtt

to compile the binary and to install it in the appropriate place.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Loading the Example Package}

To use the {\Example} Package you have to request it explicitly. This  is
done by calling

\beginexample
gap> LoadPackage("example");
----------------------------------------------------------------
Loading  Example 2.0
by Werner Nickel (http://www.mathematik.tu-darmstadt.de/~nickel)
   Greg Gamble (http://www.math.rwth-aachen.de/~Greg.Gamble)
For help, type: ?Example package 
----------------------------------------------------------------
true
\endexample

The `LoadPackage' command is described  in  Section~"ref:LoadPackage"  in
the {\GAP} Reference Manual.

If {\GAP} cannot find a working binary, the call  to  `LoadPackage'  will
still succeed but a warning is issued informing that  the  `HelloWorld()'
function will be unavailable.

If you want to load the {\Example} package by default, you  can  put  the
`LoadPackage' command  into  your  `.gaprc'  file  (see  Section~"ref:The
.gaprc file" in the {\GAP} Reference Manual).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%E
