source: tags/lgt2433/INSTALL.txt @ 6565

Revision 6478, 7.0 KB checked in by pmoura, 8 months ago (diff)

Updated the version number to 2.43.3 in preparation for the next stable release.

  • 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.43.3
4
5Copyright (c) 1998-2011 Paulo Moura.        All Rights Reserved.
6Logtalk is free software.  You can redistribute it and/or modify
7it under the terms of the "Artistic License 2.0" as published by
8The Perl Foundation. Consult the "LICENSE.txt" file for details.
9================================================================
10
11
12The recommended way of installing Logtalk is to use, whenever possible, one
13of the provided installers. This file contains detailed instructions for
14*manual* installation and configuration of Logtalk. You should also consult
15the "scripts/NOTES.txt" and "integration/NOTES.txt" files for a description
16of a set of shell scripts that might be used for Logtalk installation on
17some operating-systems and for easy Logtalk integration with popular Prolog
18compilers.
19
20The POSIX shell scripts assume that "/bin/bash" is available.
21
22
231. LOGTALK BASIC INSTALLATION
24
25Manual installation of Logtalk can be accomplished by decompressing the
26downloaded archive (or checking out a Logtalk working copy from the official
27Subversion server), running an installation script, and defining a couple of
28environment variables. You can install Logtalk in any user accessible location.
29Whenever possible, it is recommended that Logtalk be installed by a user with
30administrative rights, as described below. This leads to a setup where each
31Logtalk user may freely try and modify the provided examples, library, and
32configuration files with the option of, at any time, restoring the files to
33its original state by simply running one of the provided scripts.
34
35
36* Installing for a single user with no administrative rights:
37
38For POSIX systems, first, open a terminal, change the current directory to
39the Logtalk directory, and then type:
40
41    % cd scripts
42    % ./install.sh $HOME
43
44This will install Logtalk into the $HOME/share and $HOME/bin directories (the
45$HOME/bin path must be in your PATH environment variable).
46
47If you're using Windows, you can simply use the provided installer (which
48supports both admin and non-admin users) to perform a full installation.
49
50
51* Installing for one or more users by a user with administrative rights:
52
53For POSIX systems, first, open a terminal, change the current directory to
54the Logtalk directory, and then type:
55
56    % cd scripts
57    % sudo ./install.sh
58
59This installation script makes all files read-only for non-admin users in
60order to avoid user tempering. This is a convenient setup for computer labs,
61given that making directories world-writable is a security risk. The install
62script accepts an installation prefix as argument. For example:
63
64    % sudo ./install.sh /opt/local
65
66If no prefix is given, the default installation prefix depends on the
67operating-system:
68
69    Mac OS X:               /opt/local
70    Debian distributions:   /usr
71    Other POSIX systems:    /usr/local     
72
73The script installs Logtalk in the "$prefix/share" directory with useful
74scripts written to the "$prefix/bin" directory, which should be in your path.
75
76If you're using Windows, you can simply use the provided GUI installer (which
77supports both admin and non-admin users) to perform a full installation.
78
79
802. SETTING LOGTALK ENVIRONMENT VARIABLES
81
82You need to set two environment variables, LOGTALKHOME and LOGTALKUSER. The
83environment variable LOGTALKHOME should be set to the Logtalk installation
84directory. The environment variable LOGTALKUSER should point to a directory
85in your home directory where you want to store the user-specific Logtalk files
86(by default, "$HOME/logtalk" on POSIX systems and "My Documents\Logtalk" on
87Windows"). Both environment variables may be set for all users by a user with
88administration privileges.
89
90For POSIX systems, 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:$LOGTALKHOME/integration
95    MANPATH=$MANPATH:$LOGTALKHOME/man
96    export LOGTALKHOME LOGTALKUSER PATH MANPATH
97
98If you use instead a csh shell, add the following line to your ~/.cshrc file:
99
100    setenv LOGTALKHOME /your/logtalk/installation/directory
101    setenv LOGTALKUSER $HOME/logtalk
102    setenv PATH $PATH:$LOGTALKHOME/xml:$LOGTALKHOME/scripts:$LOGTALKHOME/integration
103    setenv MANPATH $MANPATH:$LOGTALKHOME/man
104
105Don't use relative paths such as ../ or ./ in the definition of the environment
106variables. Some Prolog compilers don't expand environment variables, resulting
107in "file not found" errors when attempting to use the Logtalk integration scripts.
108
109When using the provided shell script for installing Logtalk, a symbolic link
110to the Logtalk installation directory is automatically created. The link is
111named "logtalk". In this case, you may use this symbolic link to define the
112LOGTALKHOME environment variable in order to avoid breaking it when upgrading
113Logtalk.
114
115If you're using Windows, the provided GUI installer (which supports both admin
116and non-admin users) takes care of the definition of the environment variables.
117
118
1193. END-USER SETUP (COPYING LOGTALK USER-MODIFIABLE FILES TO USERS HOME DIRS)
120
121If you installed Logtalk on your home directory, then skip this step if and only
122if you have set both Logtalk environment variables (LOGTALKHOME and LOGTALKUSER)
123to point to the same directory.
124
125Each user must make a local copy of the Logtalk user-modifiable files
126(examples, libraries, and other supporting files) in his/her home directory.
127These copies can be easily made by running the "logtalk_user_setup" shell
128script  (see the "scripts/NOTES.txt" file for details):
129
130>> POSIX systems:
131
132    % logtalk_user_setup
133
134>> Windows:
135
136    C:\> logtalk_user_setup
137
138The local copies made by the "logtalk_user_setup" scripts have both read and
139write permissions for the user running the script. When used with one of the
140back-end Prolog compilers for which an integration script is provided on
141the "integration" directory, this setup as the advantage of allowing each
142end-user to independently customize default compilation options, library
143paths, and modify and experiment with the provided libraries and examples.
144
145Windows (admin and non-admin) users may also use the Logtalk GUI installer
146to setup their Logtalk user folder and the LOGTALKUSER environment variable.
147
148
1494. CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK
150
151Most Prolog compilers allows the user to define an initialization file that
152is automatically consulted at startup. These initialization files may contain
153directives for loading other files, such as the Logtalk configuration file
154and the Logtalk compiler. The "$LOGTALKHOME/integration" sub-directory
155contains several pre-made scripts (named "*lgt.*") for running Logtalk with
156selected back-end Prolog compilers. You can use these scripts as examples
157when creating initialization files for other Prolog compilers. Be sure to
158read the "configs/NOTES.txt" file notes on the Prolog compilers that you
159intend to use.
160
161
1625. CUSTOMIZING LOGTALK
163
164Please see the file "CUSTOMIZE.txt" for details on how to customize your
165Logtalk installation and working environment.
Note: See TracBrowser for help on using the repository browser.