root/tags/lgt2305/INSTALL.txt

Revision 3824, 6.7 KB (checked in by pmoura, 16 months ago)

Updated Logtalk release number to 2.30.5.

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