root/tags/lgt2262/INSTALL

Revision 2510, 8.7 KB (checked in by pmoura, 3 years ago)

Updated release number to 2.26.2.

  • 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.26.2
4
5Copyright (c) 1998-2005 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. CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK
112
113Most Prolog compilers allows the user to define an initialization file that
114is automatically consulted at startup. This initialization file may contain
115directives for loading other files, such as the Logtalk configuration file
116and the Logtalk compiler. The "$LOGTALKHOME/scripts" sub-directory contains
117several scripts (named "make_*lgt.*") for automating the creation of these
118initialization files for some Prolog compilers. In addition, be sure to read
119the "configs/NOTES" file notes on the Prolog compilers that you intend to use.
120There are also "makeall_lgt.*" scripts that try to run all the individual
121"make_*lgt.*" scripts:
122
123>> POSIX systems:
124
125    % cd $LOGTALKHOME/scripts
126    % sudo ./makeall_lgt.sh
127
128>> Windows:
129
130    C:\> cd %LOGTALKHOME%\scripts
131    C:\> cscript makeall_lgt.js
132
133This assumes that your favorite Prolog compilers are supported by the
134"make_*lgt.*" scripts. If that is not the case, don't worry: just follow
135the steps described in the "QUICK_START" file.
136
137
1384. COPYING THE LOGTALK USER-MODIFIABLE FILES TO USERS HOME DIRECTORIES
139
140Each user must make a local copy of the Logtalk user-modifiable files to its
141home directory. This setup allows each user to easily and independently
142customize Logtalk to its needs. These copies can be easily made by instructing
143end-users to simply run the shell scripts "cplgtdirs.*" (which are described
144in the "scripts/NOTES" file).
145
146>> POSIX systems:
147
148    % cplgtdirs
149
150>> Windows:
151
152    C:\> cplgtdirs
153
154The local copies made by the "cplgtdirs" scripts have both read and write
155permissions for the user running the script. When used with one of the
156Prolog compilers for which an integration script is provided on the "scripts"
157directory, this setup as the advantage of allowing each end-user to
158independently customize default compilation options and library paths.
159
160
1615. SETTING LIBRARY PATHS
162
163In Logtalk, a library is simply a directory containing source files. Library
164paths can be declared using a dynamic predicate. This allows compiling and
165loading of libraries and library files to be performed without worries about
166library paths. Assuming that you have used the "scripts/cplgtdirs.*" shell
167scripts for making a copy of the user-modifiable Logtalk files, you will find
168in the "$LOGTALKUSER/libpaths" directory a sample file which, when loaded,
169defines the library paths for the Logtalk standard library and for all the
170supplied examples. This file may need to be edited to match your Logtalk
171installation and your Prolog compiler and operating-system requirements. For
172more details, see the file "$LOGTALKUSER/libpaths/NOTES".
173
174
1756. CUSTOMIZING PROLOG CONFIGURATION FILES
176
177Logtalk interfaces with a specific Prolog compiler via a configuration file
178that can be found on the "$LOGTALKUSER/configs" directory. These configuration
179files can be customized by changing the values of the default flags that are
180used by Logtalk when compiling source files. For a full description of these
181default flags, consult the "Running and debugging Logtalk programs" section of
182the User Manual. Some of the default flags that you may want to change are:
183"smart_compilation", "startup_message", "portability", "underscore_vars",
184"altdirs", and the set of documentation-related flags ("xmldocs", "xslfile",
185"xmlspec", and "xmlsref"). Be sure to read the "$LOGTALKUSER/configs/NOTES"
186file for Prolog specific notes; some Prolog compilers do not support the whole
187range of compilation flag values. 
188
189
1907. CUSTOMIZING DOCUMENTATION PROCESSING SCRIPTS AND SUPPORTING FILES
191
192Logtalk provides, in the "$LOGTALKUSER/xml" directory, a set of shell scripts,
193CSS and XSLT style-sheets, and DTD and XML Schema files for processing the XML
194documenting files that are automatically generated when you compile source
195files. You may want to customize these CSS and XSLT files to modify the layout
196or style of the resulting PDF/(X)HTML files or to write new scripts and
197transformations to generate other formats. For more details, see the file
198"$LOGTALKUSER/xml/NOTES".
Note: See TracBrowser for help on using the browser.