root/tags/lgt2230/INSTALL

Revision 1977, 8.1 KB (checked in by pmoura, 4 years ago)

Updated release number to 2.23.0.

  • 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.23.0
4
5Copyright (c) 1998-2005 Paulo Moura.  All Rights Reserved.
6=================================================================
7
8
9This file contains detailed instruction for installing and configuring
10Logtalk. You should also consult the "misc/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
15
161. LOGTALK INSTALLATION
17
18Installing Logtalk can be as simple as decompressing the downloaded archive
19and copying the resulting directory to a suitable location. This location
20depends on the working environment and on the number of users. The Logtalk
21directory can reside in any user accessible location. Whenever possible, it
22is recommended that Logtalk be installed by a user with administrative rights,
23as described below. This leads to a setup where each Logtalk user may freely
24try and modify the provided examples, library, and configuration files with
25the option of, at any time, restoring the files to its original state by
26simply running one of the provided scripts.
27
28
29* Installing for a single user with no administrative rights:
30
31In the case of a single user with no administrative rights, the Logtalk
32directory may simply be copied to the user home directory.
33
34
35* Installing for one or more users by a user with administrative rights:
36
37In the case of installation by a user with administrative rights, the Logtalk
38directory can be copied to any location that its accessible by all the users
39(assuming that copying the Logtalk directory to each user home directory is,
40for some reason, not feasible or desired).
41
42The "misc" sub-directory contains shell scripts for easy installation of
43Logtalk on Windows, Unix, and Unix-like operating systems (for details,
44see the "misc/NOTES" file). After running the appropriated script for your
45operating-system, the second step will be to run the Prolog integration
46scripts that you find on the "misc" sub-directory, assuming that your
47favorite Prolog compilers are supported (if that is not the case, don't
48worry: just follow the steps described in the "QUICK_START" file). The third
49step is for each user to make a local copy of the Logtalk user-modifiable
50files to its home directory. This allows each user to easily customize
51Logtalk to its needs. These copies can be easily made by instructing end-users
52to simply run the shell command "cplgtdirs" (the corresponding scripts are
53described in the "misc/NOTES" file).
54
55The "misc/lgt_install.*" installation scripts make all files read-only in
56order to avoid user tempering. This is a convenient setup for computer labs,
57given that making directories world-writable is a security risk. Of course,
58the local copies made by the "cplgtdirs" scripts have both read and write
59permissions for the user running the script.
60
61When used with one of the Prolog compilers for which an integration script
62is provided on the "misc" directory, this setup as the advantage of allowing
63each end-user to independently customize default compilation options and
64library paths.
65
66
672. LOGTALK CONFIGURATION
68
692.1 Setting 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* Unix and Unix-like 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:$LOGTALKUSER/xml:$LOGTALKHOME/misc
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:$LOGTALKUSER/xml:$LOGTALKHOME/misc
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 95/98/ME, environment variables are defined in the "autoexec.bat"
106file (you will need to reboot after editing the file):
107
108    SET LOGTALKHOME=C:\your\logtalk\installation\folder\
109    SET LOGTALKUSER=%HOMEPATH%\logtalk
110
111In Windows 2000/XP, environment variables are defined using the System
112properties control panel (if you are a system administrator, you should use
113the JScript install script provided in the "misc" sub-directory; this script
114sets the LOGTALKHOME environment variable for all users and also sets the
115LOGTALKUSER environment variable for the administrator user running the
116script).
117
118
1192.2 Setting library paths
120
121In Logtalk, a library is simply a directory containing source files. Library
122paths can be declared using a dynamic predicate. This allows compiling and
123loading of libraries and library files to be performed without worries about
124library paths. Assuming that you have used the "misc/cplgtdirs.*" shell scripts
125for making a copy of the user-modifiable Logtalk files, you will find in the
126"$LOGTALKUSER/libpaths" directory a sample file which, when loaded, defines
127the library paths for the Logtalk standard library and for all the supplied
128examples. This file may need to be edited to match your Logtalk installation
129and your Prolog compiler and operating-system requirements. For more details,
130see the file "$LOGTALKUSER/libpaths/NOTES".
131
132
1332.3 Customizing Prolog configuration files
134
135Logtalk interfaces with a specific Prolog compiler via a configuration file
136that can be found on the "$LOGTALKUSER/configs" directory. These configuration
137files can be customized by changing the values of the default flags that are
138used by Logtalk when compiling source files. For a full description of these
139default flags, consult the "Running and debugging Logtalk programs" section of
140the User Manual. Some of the default flags that you may want to change are:
141"smart_compilation", "startup_message", "portability", "underscore_vars",
142"altdirs", and the set of documentation-related flags ("xml", "xsl", "xmlspec",
143and "doctype"). Be sure to read the "$LOGTALKUSER/configs/NOTES" file for
144Prolog specific notes; some Prolog compilers do not support the whole range of
145compilation flags. 
146
147
1482.4 Customizing documentation processing scripts and supporting files
149
150Logtalk provides, in the "$LOGTALKUSER/xml" directory, a set of shell scripts,
151CSS and XSLT style-sheets, and DTD and XML Schema files for processing the XML
152documenting files that are automatically generated when you compile source
153files. You may want to customize these scripts and their supporting files to
154modify the layout or style of the resulting PDF/(X)HTML files or to write new
155scripts and transformations to generate other formats. For more details, see
156the file "$LOGTALKUSER/xml/NOTES".
157
158
159CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK
160
161Most Prolog compilers allows the user to define an initialization file that
162is automatically consulted at startup. This initialization file may contain
163directives for loading other files, such as the Logtalk configuration file
164and the Logtalk compiler. The "misc" sub-directory contains several scripts
165for automating the creation of these initialization files for some Prolog
166compilers. In addition, be sure to read the "configs/NOTES" file notes on
167the Prolog compilers that you intend to use.
Note: See TracBrowser for help on using the browser.