root/tags/lgt2223/INSTALL

Revision 1826, 7.4 KB (checked in by pmoura, 4 years ago)

Updated release number to 2.22.3.

  • 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.22.3
4
5Copyright (c) 1998-2004 Paulo Moura.  All Rights Reserved.
6=================================================================
7
8
9This file contains detailed instruction for installing and configuring
10Logtalk.
11
12
131. LOGTALK INSTALLATION
14
15Installing Logtalk is just a matter of decompressing the downloaded archive
16and copying the resulting directory to a suitable location.
17
18The Logtalk directory can reside in any user accessible location. This
19location depends on the working environment and on the number of users.
20
21
22* Installing for a single user:
23
24In the case of a single user, the Logtalk directory may simply be copied to
25the user home directory. In alternative, assuming a user with administrative
26rights, the same setup described below for multiple users may be applied.
27This has the advantage of allowing the user to freely try and modify the
28provided examples, library, and configuration files with the option of, at
29any time, restoring the files to its original state by simply running one of
30the provided scripts.
31
32
33* Installing for multiple users:
34
35In the case of multiple users, the Logtalk directory can be copied to any
36location that its accessible by all the users (assuming that copying the
37Logtalk directory to each user home directory is, for some reason, not
38feasible or desired).
39
40The "misc" sub-directory contains shell scripts for easy installation of
41Logtalk on Windows, Unix, and Unix-like operating systems (for details,
42see the misc/NOTES file). These scripts make all files read-only in order
43to avoid user tempering. However, Logtalk directories such as "library"
44or "examples" must be user-writable as compiling Logtalk source files
45generates intermediate Prolog files, which are written to the same location
46as the source files. In addition, it is convenient that directories such as
47"configs", "libpaths", and "xml" be user-writable in order to allow each
48user to customize Logtalk to its needs. Given that making directories
49world-writable is a security risk, one solution is to copy the directories
50that need to be user-writable to each user home directory. The "misc" sub-
51directory contains shell scripts (named "cplgtdirs.*") which may be called
52by the end-users for making such copies. This is the preferred setup for a
53computer lab. When used with one of the Prolog compilers for which an
54integration script is provided on the "misc" directory, this setup allows
55end-users to independently customize default compilation options and
56library paths.
57
58
592. LOGTALK CONFIGURATION
60
612.1 Setting environment variables
62
63You need to set two environment variables, LOGTALKHOME and LOGTALKUSER. The
64environment variable LOGTALKHOME should point to the Logtalk installation
65directory. The environment variable LOGTALKUSER should point to a directory
66in your home directory where you want to store the user-specific Logtalk files
67(for example, ~/logtalk). Both environment variables may be set for all users
68by a user with administration privileges. The two environment variables can
69have the same value if you are the only Logtalk user on your computer and if
70you have full permissions to the Logtalk installation directory. In addition,
71you may want to add the Logtalk sub-directory "xml", which contains useful
72scripts for processing XML documenting files, to your execution path.
73
74* Unix and Unix-like systems:
75
76If you use a csh shell, add the following line to your ~/.cshrc file:
77
78    setenv LOGTALKHOME /your/logtalk/installation/directory
79    setenv LOGTALKUSER $HOME/logtalk
80    setenv PATH $PATH:$LOGTALKUSER/xml:$LOGTALKHOME/misc
81
82If you use a bash shell, add the following lines to your ~/.profile file:
83
84    LOGTALKHOME=/your/logtalk/installation/directory
85    LOGTALKUSER=$HOME/logtalk
86    PATH=$PATH:$LOGTALKUSER/xml:$LOGTALKHOME/misc
87    export PATH LOGTALKHOME LOGTALKUSER
88
89When using the provided shell script for installing Logtalk, a symbolic link
90to the Logtalk installation directory is automatically created. The link is
91named "logtalk". In this case, you may use this symbolic link to define the
92environment variable in order to avoid breaking it when upgrading Logtalk.
93
94* Windows systems:
95
96In Windows 95/98/ME, environment variables are defined in the "autoexec.bat"
97file (you will need to reboot after editing the file):
98
99    SET LOGTALKHOME=C:\your\installation\folder\
100    SET LOGTALKUSER=%HOMEPATH%\logtalk
101
102In Windows 2000/XP, environment variables are defined using the System
103properties control panel (if you are a system administrator, you should use
104the JScript install script provided in the "misc" sub-directory; this script
105sets the LOGTALKHOME environment variable for all users and also sets the
106LOGTALKUSER environment variable for the administrator user running the
107script).
108
109
1102.2 Setting library paths
111
112In Logtalk, a library is simply a directory containing source files. Library
113paths can be declared using a dynamic predicate. This allows compiling and
114loading of libraries and library files to be performed without worries about
115library paths. In the "$LOGTALKUSER/libpaths" directory you will find a sample
116file which, when loaded, defines the library paths for the Logtalk standard
117library and for all the supplied examples. This file may need to be edited to
118match your Logtalk installation and your Prolog compiler and operating-system
119requirements. For more details, see the file "$LOGTALKUSER/libpaths/NOTES".
120
121
1222.3 Customizing Prolog configuration files
123
124Logtalk interfaces with a specific Prolog compiler via a configuration file
125that can be found on the "$LOGTALKUSER/configs" directory. These configuration
126files can be customized by changing the values of the default flags and
127compiler options which are used by Logtalk when compiling source files. For
128a full description of these default flags and compiler options, consult the
129"Running and debugging Logtalk programs" section of the User Manual. Some of
130the default flags that you may want to change are: "portability", "altdirs",
131"underscore_vars", "startup_message", "smart_compilation", and the set of
132documentation-related flags ("xml", "xsl", "xmlspec", and "doctype"). Be sure
133to read the "$LOGTALKUSER/configs/NOTES" file for Prolog specific notes; some
134Prolog compilers do not support the whole range of compilation flags. 
135
136
1372.4 Customizing documentation processing scripts and supporting files
138
139Logtalk provides, in the "$LOGTALKUSER/xml" directory, a set of shell scripts,
140CSS and XSLT style-sheets, and DTD and XML Schema files for processing the XML
141documenting files that are automatically generated when you compile source
142files. You may want to customize these scripts and their supporting files to
143modify the layout or style of the resulting PDF/(X)HTML files or to write new
144scripts and transformations to generate other formats. For more details, see
145the file "$LOGTALKUSER/xml/NOTES".
146
147
148CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK
149
150Most Prolog compilers allows the user to define an initialization file that
151is automatically consulted at startup. This initialization file may contain
152directives for loading other files, such as the Logtalk configuration file
153and the Logtalk compiler. The "misc" sub-directory contains several scripts
154for automating the creation of these initialization files for some Prolog
155compilers. In addition, be sure to read the "configs/NOTES" file notes on the
156Prolog compilers that you intend to use.
Note: See TracBrowser for help on using the browser.