================================================================= Logtalk - Object oriented extension to Prolog Release 2.29.2 Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved. ================================================================= 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 the "scripts/NOTES" file 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. 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. 1. LOGTALK BASIC INSTALLATION 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. * Installing for a single user with no administrative rights: In the case of a single user with no administrative rights, the Logtalk directory may simply be copied to the user home directory. * Installing for one or more users by a user with administrative rights: 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). The "scripts" sub-directory contains shell scripts for easy installation of Logtalk on MacOS X, Windows, Linux, and Unix-like (POSIX) operating systems (see the "scripts/NOTES" file for details). >> POSIX systems installation (starting from the Logtalk directory): % cd scripts % sudo ./lgt_install.sh >> Windows installation (starting from the Logtalk directory): C:\logtalk> cd scripts C:\logtalk> cscript lgt_install.js RESTART The "scripts/lgt_install.*" installation scripts make all files read-only in order to avoid user tempering. This is a convenient setup for computer labs, given that making directories world-writable is a security risk. 2. SETTING LOGTALK ENVIRONMENT VARIABLES You need to set two environment variables, LOGTALKHOME and LOGTALKUSER. The environment variable LOGTALKHOME should point to the Logtalk installation directory. The environment variable LOGTALKUSER should point to a directory in your home directory where you want to store the user-specific Logtalk files (for example, ~/logtalk). Both environment variables may be set for all users 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. >> POSIX systems: If you use a csh shell, add the following line to your ~/.cshrc file: setenv LOGTALKHOME /your/logtalk/installation/directory setenv LOGTALKUSER $HOME/logtalk setenv PATH $PATH:$LOGTALKHOME/xml:$LOGTALKHOME/scripts If you use a bash shell, add the following lines to your ~/.profile file: LOGTALKHOME=/your/logtalk/installation/directory LOGTALKUSER=$HOME/logtalk PATH=$PATH:$LOGTALKHOME/xml:$LOGTALKHOME/scripts export PATH LOGTALKHOME LOGTALKUSER When using the provided shell script for installing Logtalk, a symbolic link to the Logtalk installation directory is automatically created. The link is named "logtalk". In this case, you may use this symbolic link to define the LOGTALKHOME environment variable in order to avoid breaking it when upgrading Logtalk. >> Windows systems: In Windows 2000/XP, environment variables are defined using the System properties control panel. If you are a system administrator, the "scripts/ lgt_install.js" JScript install script sets the LOGTALKHOME environment variable for all users and also sets the LOGTALKUSER environment variable for the administrator user running the script. 3. COPYING THE LOGTALK USER-MODIFIABLE FILES TO USERS HOME DIRECTORIES 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. 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 in the "scripts/NOTES" file). >> 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 Prolog compilers for which an integration script is provided on the "scripts" directory, this setup as the advantage of allowing each end-user to independently customize default compilation options and library paths. 4. CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK Most Prolog compilers allows the user to define an initialization file that is automatically consulted at startup. This initialization file may contain directives for loading other files, such as the Logtalk configuration file and the Logtalk compiler. The "$LOGTALKHOME/scripts" sub-directory contains several scripts (named "make_*lgt.*") for automating the creation of these initialization files for some Prolog compilers. In addition, be sure to read the "configs/NOTES" file notes on the Prolog compilers that you intend to use. There are also "makeall_lgt.*" scripts that try to run all the individual "make_*lgt.*" scripts: >> POSIX systems: % cd $LOGTALKHOME/scripts % sudo ./makeall_lgt.sh >> Windows: C:\> cd %LOGTALKHOME%\scripts C:\> cscript makeall_lgt.js This assumes that your favorite Prolog compilers are supported by the "make_*lgt.*" scripts. If that is not the case, don't worry: just follow the steps described in the "QUICK_START" file. 5. CUSTOMIZING LOGTALK Please see the file "CUSTOMIZE.txt" for details on how to customize your Logtalk installation and working environment.