2007-06-12 11:39:47 +01:00
|
|
|
================================================================
|
|
|
|
Logtalk - Open source object-oriented logic programming language
|
2007-11-09 19:05:00 +00:00
|
|
|
Release 2.30.8
|
2004-04-26 00:57:46 +01:00
|
|
|
|
2007-01-10 12:46:10 +00:00
|
|
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
2007-06-12 11:39:47 +01:00
|
|
|
================================================================
|
2004-04-26 00:57:46 +01:00
|
|
|
|
|
|
|
|
2006-12-28 13:03:34 +00:00
|
|
|
The recommended way of installing Logtalk is to use, whenever possible, one
|
|
|
|
of the provided installers. This file contains detailed instructions for
|
|
|
|
manual installation and configuration of Logtalk. You should also consult
|
2007-06-12 11:39:47 +01:00
|
|
|
the "scripts/NOTES.txt" and "integration/NOTES.txt" files for a description
|
|
|
|
of a set of shell scripts that might be used for Logtalk installation on
|
|
|
|
some operating-systems and for easy Logtalk integration with popular Prolog
|
|
|
|
compilers.
|
2004-11-29 20:36:31 +00:00
|
|
|
|
2005-08-08 13:13:45 +01:00
|
|
|
Note that the broad compatibility of Logtalk, both with Prolog compilers and
|
|
|
|
operating-systems, together with all the possible user scenarios, means that
|
|
|
|
installation can vary from very simple by running a couple of scripts to the
|
|
|
|
need of patching both Logtalk and Prolog compilers to workaround the lack of
|
|
|
|
strong Prolog standards.
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
|
2005-12-24 18:00:21 +00:00
|
|
|
1. LOGTALK BASIC INSTALLATION
|
2004-11-29 20:36:31 +00:00
|
|
|
|
2005-01-13 12:22:42 +00:00
|
|
|
Installing Logtalk can be as simple as decompressing the downloaded archive
|
|
|
|
and copying the resulting directory to a suitable location. This location
|
|
|
|
depends on the working environment and on the number of users. The Logtalk
|
|
|
|
directory can reside in any user accessible location. Whenever possible, it
|
|
|
|
is recommended that Logtalk be installed by a user with administrative rights,
|
|
|
|
as described below. This leads to a setup where each Logtalk user may freely
|
|
|
|
try and modify the provided examples, library, and configuration files with
|
|
|
|
the option of, at any time, restoring the files to its original state by
|
|
|
|
simply running one of the provided scripts.
|
2004-04-26 00:57:46 +01:00
|
|
|
|
|
|
|
|
2005-01-13 12:22:42 +00:00
|
|
|
* Installing for a single user with no administrative rights:
|
2004-04-26 00:57:46 +01:00
|
|
|
|
2005-01-13 12:22:42 +00:00
|
|
|
In the case of a single user with no administrative rights, the Logtalk
|
|
|
|
directory may simply be copied to the user home directory.
|
2004-04-26 00:57:46 +01:00
|
|
|
|
|
|
|
|
2005-01-13 12:22:42 +00:00
|
|
|
* Installing for one or more users by a user with administrative rights:
|
2004-04-26 00:57:46 +01:00
|
|
|
|
2005-02-10 00:02:06 +00:00
|
|
|
In the case of installation by a user with administrative rights, the Logtalk
|
|
|
|
directory can be copied to any location that its accessible by all the users
|
|
|
|
(assuming that copying the Logtalk directory to each user home directory is,
|
|
|
|
for some reason, not feasible or desired).
|
2004-11-29 20:36:31 +00:00
|
|
|
|
2005-04-23 00:57:45 +01:00
|
|
|
The "scripts" sub-directory contains shell scripts for easy installation of
|
2007-06-12 11:39:47 +01:00
|
|
|
Logtalk on POSIX operating systems (see the "scripts/NOTES.txt" file for
|
|
|
|
details). Starting from the Logtalk directory, type:
|
2005-12-24 18:00:21 +00:00
|
|
|
|
|
|
|
% cd scripts
|
2007-06-12 11:39:47 +01:00
|
|
|
% sudo ./install.sh
|
2004-11-29 20:36:31 +00:00
|
|
|
|
2007-06-12 11:39:47 +01:00
|
|
|
This installation script makes all files read-only for non-admin users in
|
2005-12-24 18:00:21 +00:00
|
|
|
order to avoid user tempering. This is a convenient setup for computer labs,
|
|
|
|
given that making directories world-writable is a security risk.
|
2004-11-29 20:36:31 +00:00
|
|
|
|
2005-12-24 18:00:21 +00:00
|
|
|
|
|
|
|
2. SETTING LOGTALK ENVIRONMENT VARIABLES
|
2004-11-29 20:36:31 +00:00
|
|
|
|
|
|
|
You need to set two environment variables, LOGTALKHOME and LOGTALKUSER. The
|
2007-06-12 11:39:47 +01:00
|
|
|
environment variable LOGTALKHOME should be set to the Logtalk installation
|
2004-11-29 20:36:31 +00:00
|
|
|
directory. The environment variable LOGTALKUSER should point to a directory
|
|
|
|
in your home directory where you want to store the user-specific Logtalk files
|
2007-06-12 11:39:47 +01:00
|
|
|
(by default, ~/logtalk). Both environment variables may be set for all users
|
2004-11-29 20:36:31 +00:00
|
|
|
by a user with administration privileges. The two environment variables can
|
|
|
|
have the same value if you are the only Logtalk user on your computer and if
|
|
|
|
you have full permissions to the Logtalk installation directory. In addition,
|
|
|
|
you may want to add the Logtalk sub-directory "xml", which contains useful
|
|
|
|
scripts for processing XML documenting files, to your execution path.
|
2004-04-26 00:57:46 +01:00
|
|
|
|
2005-12-24 18:00:21 +00:00
|
|
|
>> POSIX systems:
|
2004-08-16 17:41:11 +01:00
|
|
|
|
|
|
|
If you use a csh shell, add the following line to your ~/.cshrc file:
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
setenv LOGTALKHOME /your/logtalk/installation/directory
|
|
|
|
setenv LOGTALKUSER $HOME/logtalk
|
2005-12-24 18:00:21 +00:00
|
|
|
setenv PATH $PATH:$LOGTALKHOME/xml:$LOGTALKHOME/scripts
|
2004-04-26 00:57:46 +01:00
|
|
|
|
|
|
|
If you use a bash shell, add the following lines to your ~/.profile file:
|
|
|
|
|
2004-11-29 20:36:31 +00:00
|
|
|
LOGTALKHOME=/your/logtalk/installation/directory
|
|
|
|
LOGTALKUSER=$HOME/logtalk
|
2005-12-24 18:00:21 +00:00
|
|
|
PATH=$PATH:$LOGTALKHOME/xml:$LOGTALKHOME/scripts
|
2004-11-29 20:36:31 +00:00
|
|
|
export PATH LOGTALKHOME LOGTALKUSER
|
2004-04-26 00:57:46 +01:00
|
|
|
|
|
|
|
When using the provided shell script for installing Logtalk, a symbolic link
|
|
|
|
to the Logtalk installation directory is automatically created. The link is
|
2004-08-16 17:41:11 +01:00
|
|
|
named "logtalk". In this case, you may use this symbolic link to define the
|
2005-01-13 12:22:42 +00:00
|
|
|
LOGTALKHOME environment variable in order to avoid breaking it when upgrading
|
|
|
|
Logtalk.
|
2004-06-13 19:04:28 +01:00
|
|
|
|
2005-12-24 18:00:21 +00:00
|
|
|
>> Windows systems:
|
2004-08-16 17:41:11 +01:00
|
|
|
|
2005-12-24 18:00:21 +00:00
|
|
|
In Windows 2000/XP, environment variables are defined using the System
|
2007-06-12 11:39:47 +01:00
|
|
|
properties control panel. If you are a system administrator, the Windows
|
|
|
|
GUI installer sets the LOGTALKHOME environment variable for all users and
|
|
|
|
also sets the LOGTALKUSER environment variable for the administrator user
|
|
|
|
running the installer.
|
2004-08-16 17:41:11 +01:00
|
|
|
|
|
|
|
|
2007-06-12 11:39:47 +01:00
|
|
|
3. END-USER SETUP (COPYING LOGTALK USER-MODIFIABLE FILES TO USERS HOME DIRS)
|
2005-12-24 18:00:21 +00:00
|
|
|
|
2006-02-10 17:44:05 +00:00
|
|
|
If you installed Logtalk on your home directory, then skip this step if you
|
|
|
|
have set both Logtalk environment variables (LOGTALKHOME and LOGTALKUSER) to
|
|
|
|
point to the same directory.
|
|
|
|
|
2005-12-24 18:00:21 +00:00
|
|
|
Each user must make a local copy of the Logtalk user-modifiable files to its
|
|
|
|
home directory. This setup allows each user to easily and independently
|
|
|
|
customize Logtalk to its needs. These copies can be easily made by instructing
|
|
|
|
end-users to simply run the shell scripts "cplgtdirs.*" (which are described
|
2007-03-28 23:44:31 +01:00
|
|
|
in the "scripts/NOTES.txt" file).
|
2005-12-24 18:00:21 +00:00
|
|
|
|
|
|
|
>> POSIX systems:
|
|
|
|
|
|
|
|
% cplgtdirs
|
|
|
|
|
|
|
|
>> Windows:
|
|
|
|
|
|
|
|
C:\> cplgtdirs
|
|
|
|
|
|
|
|
The local copies made by the "cplgtdirs" scripts have both read and write
|
|
|
|
permissions for the user running the script. When used with one of the
|
2007-06-12 11:39:47 +01:00
|
|
|
back-end Prolog compilers for which an integration script is provided on
|
|
|
|
the "integration" directory, this setup as the advantage of allowing each
|
|
|
|
end-user to independently customize default compilation options and library
|
|
|
|
paths.
|
2005-12-24 18:00:21 +00:00
|
|
|
|
2007-06-12 11:39:47 +01:00
|
|
|
Windows (non-admin) users may also use the Logtalk GUI installer to setup
|
|
|
|
their Logtalk user folder and the LOGTALKUSER environment variable.
|
2005-12-24 18:00:21 +00:00
|
|
|
|
2006-03-26 18:31:34 +01:00
|
|
|
|
2007-06-12 11:39:47 +01:00
|
|
|
4. CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK
|
2006-03-26 18:31:34 +01:00
|
|
|
|
2007-06-12 11:39:47 +01:00
|
|
|
Most Prolog compilers allows the user to define an initialization file
|
|
|
|
that is automatically consulted at startup. These initialization files
|
|
|
|
may contain directives for loading other files, such as the Logtalk
|
|
|
|
configuration file and the Logtalk compiler. The "$LOGTALKHOME/integration"
|
|
|
|
sub-directory contains several pre-made scripts (named "*lgt.*") for running
|
|
|
|
Logtalk with selected back-end Prolog compilers. You can use these scripts
|
|
|
|
as examples when creating initialization files for other Prolog compilers.
|
|
|
|
Be sure to read the "configs/NOTES.txt" file notes on the Prolog compilers
|
|
|
|
that you intend to use. You may also simply follow the steps described in
|
|
|
|
the "QUICK_START.txt" file.
|
2006-03-26 18:31:34 +01:00
|
|
|
|
|
|
|
|
2006-11-07 18:11:49 +00:00
|
|
|
5. CUSTOMIZING LOGTALK
|
|
|
|
|
|
|
|
Please see the file "CUSTOMIZE.txt" for details on how to customize your
|
|
|
|
Logtalk installation and working environment.
|