root/tags/lgt2291/INSTALL.txt

Revision 3237, 7.0 KB (checked in by pmoura, 2 years ago)

Corrected typo.

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