root/tags/lgt2281/INSTALL.txt

Revision 3046, 6.8 KB (checked in by pmoura, 2 years ago)

Updated Logtalk release number to 2.28.1.

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