| 1 | ================================================================ |
|---|
| 2 | Logtalk - Open source object-oriented logic programming language |
|---|
| 3 | Release 2.30.5 |
|---|
| 4 | |
|---|
| 5 | Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved. |
|---|
| 6 | ================================================================ |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | The recommended way of installing Logtalk is to use, whenever possible, one |
|---|
| 10 | of the provided installers. This file contains detailed instructions for |
|---|
| 11 | manual installation and configuration of Logtalk. You should also consult |
|---|
| 12 | the "scripts/NOTES.txt" and "integration/NOTES.txt" files for a description |
|---|
| 13 | of a set of shell scripts that might be used for Logtalk installation on |
|---|
| 14 | some operating-systems and for easy Logtalk integration with popular Prolog |
|---|
| 15 | compilers. |
|---|
| 16 | |
|---|
| 17 | Note that the broad compatibility of Logtalk, both with Prolog compilers and |
|---|
| 18 | operating-systems, together with all the possible user scenarios, means that |
|---|
| 19 | installation can vary from very simple by running a couple of scripts to the |
|---|
| 20 | need of patching both Logtalk and Prolog compilers to workaround the lack of |
|---|
| 21 | strong Prolog standards. |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | 1. LOGTALK BASIC INSTALLATION |
|---|
| 25 | |
|---|
| 26 | Installing Logtalk can be as simple as decompressing the downloaded archive |
|---|
| 27 | and copying the resulting directory to a suitable location. This location |
|---|
| 28 | depends on the working environment and on the number of users. The Logtalk |
|---|
| 29 | directory can reside in any user accessible location. Whenever possible, it |
|---|
| 30 | is recommended that Logtalk be installed by a user with administrative rights, |
|---|
| 31 | as described below. This leads to a setup where each Logtalk user may freely |
|---|
| 32 | try and modify the provided examples, library, and configuration files with |
|---|
| 33 | the option of, at any time, restoring the files to its original state by |
|---|
| 34 | simply running one of the provided scripts. |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | * Installing for a single user with no administrative rights: |
|---|
| 38 | |
|---|
| 39 | In the case of a single user with no administrative rights, the Logtalk |
|---|
| 40 | directory may simply be copied to the user home directory. |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | * Installing for one or more users by a user with administrative rights: |
|---|
| 44 | |
|---|
| 45 | In the case of installation by a user with administrative rights, the Logtalk |
|---|
| 46 | directory can be copied to any location that its accessible by all the users |
|---|
| 47 | (assuming that copying the Logtalk directory to each user home directory is, |
|---|
| 48 | for some reason, not feasible or desired). |
|---|
| 49 | |
|---|
| 50 | The "scripts" sub-directory contains shell scripts for easy installation of |
|---|
| 51 | Logtalk on POSIX operating systems (see the "scripts/NOTES.txt" file for |
|---|
| 52 | details). Starting from the Logtalk directory, type: |
|---|
| 53 | |
|---|
| 54 | % cd scripts |
|---|
| 55 | % sudo ./install.sh |
|---|
| 56 | |
|---|
| 57 | This installation script makes all files read-only for non-admin users in |
|---|
| 58 | order to avoid user tempering. This is a convenient setup for computer labs, |
|---|
| 59 | given that making directories world-writable is a security risk. |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | 2. SETTING LOGTALK ENVIRONMENT VARIABLES |
|---|
| 63 | |
|---|
| 64 | You need to set two environment variables, LOGTALKHOME and LOGTALKUSER. The |
|---|
| 65 | environment variable LOGTALKHOME should be set to the Logtalk installation |
|---|
| 66 | directory. The environment variable LOGTALKUSER should point to a directory |
|---|
| 67 | in your home directory where you want to store the user-specific Logtalk files |
|---|
| 68 | (by default, ~/logtalk). Both environment variables may be set for all users |
|---|
| 69 | by a user with administration privileges. The two environment variables can |
|---|
| 70 | have the same value if you are the only Logtalk user on your computer and if |
|---|
| 71 | you have full permissions to the Logtalk installation directory. In addition, |
|---|
| 72 | you may want to add the Logtalk sub-directory "xml", which contains useful |
|---|
| 73 | scripts for processing XML documenting files, to your execution path. |
|---|
| 74 | |
|---|
| 75 | >> POSIX systems: |
|---|
| 76 | |
|---|
| 77 | If you use a csh shell, add the following line to your ~/.cshrc file: |
|---|
| 78 | |
|---|
| 79 | setenv LOGTALKHOME /your/logtalk/installation/directory |
|---|
| 80 | setenv LOGTALKUSER $HOME/logtalk |
|---|
| 81 | setenv PATH $PATH:$LOGTALKHOME/xml:$LOGTALKHOME/scripts |
|---|
| 82 | |
|---|
| 83 | If you use a bash shell, add the following lines to your ~/.profile file: |
|---|
| 84 | |
|---|
| 85 | LOGTALKHOME=/your/logtalk/installation/directory |
|---|
| 86 | LOGTALKUSER=$HOME/logtalk |
|---|
| 87 | PATH=$PATH:$LOGTALKHOME/xml:$LOGTALKHOME/scripts |
|---|
| 88 | export PATH LOGTALKHOME LOGTALKUSER |
|---|
| 89 | |
|---|
| 90 | When using the provided shell script for installing Logtalk, a symbolic link |
|---|
| 91 | to the Logtalk installation directory is automatically created. The link is |
|---|
| 92 | named "logtalk". In this case, you may use this symbolic link to define the |
|---|
| 93 | LOGTALKHOME environment variable in order to avoid breaking it when upgrading |
|---|
| 94 | Logtalk. |
|---|
| 95 | |
|---|
| 96 | >> Windows systems: |
|---|
| 97 | |
|---|
| 98 | In Windows 2000/XP, environment variables are defined using the System |
|---|
| 99 | properties control panel. If you are a system administrator, the Windows |
|---|
| 100 | GUI installer sets the LOGTALKHOME environment variable for all users and |
|---|
| 101 | also sets the LOGTALKUSER environment variable for the administrator user |
|---|
| 102 | running the installer. |
|---|
| 103 | |
|---|
| 104 | |
|---|
| 105 | 3. END-USER SETUP (COPYING LOGTALK USER-MODIFIABLE FILES TO USERS HOME DIRS) |
|---|
| 106 | |
|---|
| 107 | If you installed Logtalk on your home directory, then skip this step if you |
|---|
| 108 | have set both Logtalk environment variables (LOGTALKHOME and LOGTALKUSER) to |
|---|
| 109 | point to the same directory. |
|---|
| 110 | |
|---|
| 111 | Each user must make a local copy of the Logtalk user-modifiable files to its |
|---|
| 112 | home directory. This setup allows each user to easily and independently |
|---|
| 113 | customize Logtalk to its needs. These copies can be easily made by instructing |
|---|
| 114 | end-users to simply run the shell scripts "cplgtdirs.*" (which are described |
|---|
| 115 | in the "scripts/NOTES.txt" file). |
|---|
| 116 | |
|---|
| 117 | >> POSIX systems: |
|---|
| 118 | |
|---|
| 119 | % cplgtdirs |
|---|
| 120 | |
|---|
| 121 | >> Windows: |
|---|
| 122 | |
|---|
| 123 | C:\> cplgtdirs |
|---|
| 124 | |
|---|
| 125 | The local copies made by the "cplgtdirs" scripts have both read and write |
|---|
| 126 | permissions for the user running the script. When used with one of the |
|---|
| 127 | back-end Prolog compilers for which an integration script is provided on |
|---|
| 128 | the "integration" directory, this setup as the advantage of allowing each |
|---|
| 129 | end-user to independently customize default compilation options and library |
|---|
| 130 | paths. |
|---|
| 131 | |
|---|
| 132 | Windows (non-admin) users may also use the Logtalk GUI installer to setup |
|---|
| 133 | their Logtalk user folder and the LOGTALKUSER environment variable. |
|---|
| 134 | |
|---|
| 135 | |
|---|
| 136 | 4. CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK |
|---|
| 137 | |
|---|
| 138 | Most Prolog compilers allows the user to define an initialization file |
|---|
| 139 | that is automatically consulted at startup. These initialization files |
|---|
| 140 | may contain directives for loading other files, such as the Logtalk |
|---|
| 141 | configuration file and the Logtalk compiler. The "$LOGTALKHOME/integration" |
|---|
| 142 | sub-directory contains several pre-made scripts (named "*lgt.*") for running |
|---|
| 143 | Logtalk with selected back-end Prolog compilers. You can use these scripts |
|---|
| 144 | as examples when creating initialization files for other Prolog compilers. |
|---|
| 145 | Be sure to read the "configs/NOTES.txt" file notes on the Prolog compilers |
|---|
| 146 | that you intend to use. You may also simply follow the steps described in |
|---|
| 147 | the "QUICK_START.txt" file. |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | 5. CUSTOMIZING LOGTALK |
|---|
| 151 | |
|---|
| 152 | Please see the file "CUSTOMIZE.txt" for details on how to customize your |
|---|
| 153 | Logtalk installation and working environment. |
|---|