42aabce1bb
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1973 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
234 lines
15 KiB
HTML
234 lines
15 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
|
|
|
<head>
|
|
<meta http-equiv="content-type" content="application/xml+xhtml; charset=utf-8" />
|
|
<title>Logtalk user manual: installing</title>
|
|
<link rel="stylesheet" href="../screen.css" type="text/css" media="screen"/>
|
|
<link rel="stylesheet" href="../print.css" type="text/css" media="print"/>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="top-left">Logtalk user manual</div>
|
|
<div class="top-right">Installing Logtalk</div>
|
|
<div class="bottom-left"><span class="page"/></div>
|
|
<div class="bottom-right"><span class="page"/></div>
|
|
<div class="navtop"><a href="../index.html">contents</a> > <a href="index.html">user manual</a></div>
|
|
|
|
<h1 id="installing_installing">Installing Logtalk</h1>
|
|
|
|
<p>
|
|
This page provides an overview of Logtalk installation requirements and instructions and a description of the files contained on the Logtalk distribution. For detailed, up-to-date installation and configuration instructions, please see the <code>README.txt</code>, <code>INSTALL.txt</code>, and <code>CUSTOMIZE.txt</code> files distributed with Logtalk. The broad compatibility of Logtalk, both with Prolog compilers and operating-systems, together with all the possible user scenarios, means that installation can vary from very simple by running an installer or a couple of scripts to the need of patching both Logtalk and Prolog compilers to workaround the lack of strong Prolog standards.
|
|
</p>
|
|
<p>
|
|
The preferred installation scenario is to have Logtalk installed in a system-wide location, thus available for all users, and a local copy of user-modifiable files on each user home directory (even when you are the single user of your computer). This scenario allows each user to independently customize Logtalk and to freely modify the provided programming examples. Logtalk installers, installation shell scripts, and Prolog integration scripts favor this installation scenario, although alternative installation scenarios are always possible.
|
|
</p>
|
|
|
|
<h2 id="installing_requirements">Hardware & software requirements</h2>
|
|
|
|
<h3 id="installing_computer">Computer and operating system</h3>
|
|
|
|
<p>
|
|
Logtalk is compatible with almost any computer/operating-system with a modern Prolog compiler available. Currently, the main development environment is an Apple MacBook Pro running MacOS X. Being written in Prolog and distributed in source form, the only issue regarding operating system compatibility are the end-of-line codes in the source text files!
|
|
</p>
|
|
|
|
<h3 id="installing_compiler">Prolog compiler</h3>
|
|
|
|
<p>
|
|
In writing Logtalk I have tried to follow the current ISO Prolog Part 1 standard whenever possible. Capabilities needed by Logtalk that are not defined in the ISO standard are:
|
|
</p>
|
|
<ul>
|
|
<li>access to predicate properties (<code>dynamic</code>, <code>static</code>, <code>built_in</code>)</li>
|
|
</ul>
|
|
<p>
|
|
Logtalk needs access to the predicate property <code>built_in</code> to properly compile objects and categories that contain Prolog built-in predicates calls. In addition, some Logtalk built-ins need to know the dynamic/static status of predicates to ensure correct application. The ISO standard for Prolog modules defines a <code>predicate_property/2</code> predicate that is already implemented by most Prolog compilers. Note that if these capabilities are not built-in the user cannot easily define them.</p>
|
|
<p>
|
|
For optimal performance, Logtalk requires that the Prolog compiler supports <strong>first-argument indexing</strong> for both static and dynamic code (most modern compilers support this feature).
|
|
</p>
|
|
<p>
|
|
Since most Prolog compilers are moving closer to the ISO Prolog standard <a href="../bibliography.html#ISO95">[ISO 95]</a>, it is advisable that you try to use the most recent version of your favorite Prolog compiler.
|
|
</p>
|
|
|
|
<h2 id="installing_installers">Logtalk installers</h2>
|
|
|
|
<p>
|
|
Logtalk installers are available for MacOS X, Linux, and Microsoft Windows 2000/XP/2003. Depending on the chosen installer, some tasks (e.g. setting environment variables or integrating Logtalk with some Prolog compilers) may need to be performed manually.
|
|
</p>
|
|
|
|
<h2 id="installing_sources">Source distribution</h2>
|
|
|
|
<p>
|
|
Logtalk sources are available in a <code>tar</code> archive compressed with <code>gzip</code>, <code>lgt2xxx.tgz</code>. You may expand the archive by using a decompressing utility or by typing the following commands at the command-line:
|
|
</p>
|
|
<pre>% tar -zxvf lgt2xxx.tgz</pre>
|
|
<p>
|
|
This will create a sub-directory named <code>lgt2xxx</code> in your current directory. Almost all files in the Logtalk distribution are text files. Different operating-systems use different end-of-line codes for text files. Ensure that your decompressing utility convert the end-of-lines of all text files to match your operating system.
|
|
</p>
|
|
|
|
<h2 id="installing_organization">Directories and files organization</h2>
|
|
|
|
<p>
|
|
In the Logtalk installation directory, you will find the following files and directories:
|
|
</p>
|
|
<dl>
|
|
<dt><code>BIBLIOGRAPHY.bib</code> - Logtalk bibliography in BibTeX format</dt>
|
|
<dt><code>CUSTOMIZE.txt</code> - Logtalk end-user customization instructions</dt>
|
|
<dt><code>INSTALL.txt</code> - Logtalk installation instructions</dt>
|
|
<dt><code>LICENSE.txt</code> - Logtalk user license</dt>
|
|
<dt><code>QUICK_START.txt</code> - Quick start instructions for those that do not like to read manuals</dt>
|
|
<dt><code>README.txt</code> - several useful information</dt>
|
|
<dt><code>RELEASE_NOTES.txt</code> - release notes for this version</dt>
|
|
<dt><code>UPGRADING.txt</code> - instructions on how to upgrade your programs to the current Logtalk version</dt>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>compiler</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on the current status of the compiler</dd>
|
|
<dd><code>...</code> - compiler source files</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>configs</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on the provided configuration files</dd>
|
|
<dd><code>template.config</code> - template configuration file</dd>
|
|
<dd><code>...</code> - specific configuration files</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>contributions</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on the user-contributed code</dd>
|
|
<dd><code>...</code> - user-contributed code files</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>examples</code></dt>
|
|
<dd><code>NOTES.txt</code> - short description of the provided examples</dd>
|
|
<dd><code>bricks</code></dd>
|
|
<dd><dl>
|
|
<dd><code>NOTES.txt</code> - example description and other notes</dd>
|
|
<dd><code>SCRIPT.txt</code> - step by step example tutorial</dd>
|
|
<dd><code>loader.lgt</code> - loader utility file for the example objects</dd>
|
|
<dd><code>...</code> - bricks example source files</dd>
|
|
</dl></dd>
|
|
<dd><code>...</code> - other examples</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>integration</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on scripts for Logtalk integration with Prolog compilers</dd>
|
|
<dd><code>...</code> - Prolog integration scripts</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>libpaths</code></dt>
|
|
<dd><code>NOTES.txt</code> - description on how to setup library and examples paths</dd>
|
|
<dd><code>libpaths.pl</code> - default library and example paths</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>library</code></dt>
|
|
<dd><code>NOTES.txt</code> - short description of the library contents</dd>
|
|
<dd><code>all_loader.lgt</code> - loader utility file for all library entities</dd>
|
|
<dd><code>...</code> - library source files</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>manuals</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on the provided documentation</dd>
|
|
<dd><code>bibliography.html</code> - bibliography</dd>
|
|
<dd><code>glossary.html</code> - glossary</dd>
|
|
<dd><code>index.html</code> - root document for all documentation</dd>
|
|
<dd><code>...</code> - other documentation files</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>scripts</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on scripts for Logtalk user setup, packaging, and installation</dd>
|
|
<dd><code>...</code> - packaging, installation, and setup scripts</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>wenv</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on the text editor syntax configuration files providing syntax coloring for editing Logtalk source files</dd>
|
|
<dd><code>...</code> - syntax coloring configuration files</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>xml</code></dt>
|
|
<dd><code>NOTES.txt</code> - notes on the automatic generation of XML documentation files</dd>
|
|
<dd><code>logtalk.css</code> - cascade style sheet file for the HTML output of the XSLT conversion of the XML files</dd>
|
|
<dd><code>logtalk.dtd</code> - Document Type Description file describing the structure of the XML files</dd>
|
|
<dd><code>lgthtml.xsl</code> - transformation style sheet to output HTML code from the XML files</dd>
|
|
<dd><code>...</code> - other XSL files</dd>
|
|
<dd><code>lgt2html.sh</code> - shell script for converting XML documenting files to (X)HTML files</dd>
|
|
<dd><code>...</code> - other script files</dd>
|
|
</dl>
|
|
|
|
<h3 id="installing_configs">Configuration files</h3>
|
|
|
|
<p>
|
|
Configuration files provide the glue code between the Logtalk compiler/runtime and a Prolog compiler. Each configuration file contains two sets of predicates: ISO Prolog standard predicates and directives not built-in in the target Prolog compiler and Logtalk-specific predicates.
|
|
</p>
|
|
<p>
|
|
Logtalk already includes ready to use configuration files for most academic and commercial Prolog compilers. If a configuration file is not available for the compiler that you intend to use, then you need to build a new one, starting from the included <code>template.config</code> file. Start by making a copy of the template file. Carefully check (or complete if needed) each listed definition. If your Prolog compiler conforms to the ISO standard, this task should only take you a few minutes. In most cases, you can borrow code from some of the predefined configuration files. If you are unsure that your Prolog compiler provides all the ISO predicates needed by Logtalk, try to run the system by setting the unknown predicate error handler to report as an error any call to a missing predicate. Better yet, switch to a modern, ISO compliant, Prolog compiler. If you send me your configuration file, with a reference to the target Prolog compiler, maybe I can include it in the next release of Logtalk.
|
|
</p>
|
|
<p>
|
|
The configuration files specifies default values for all the Logtalk compiler flags. Most of these compiler flags are described in the <a href="running.html#options">next</a> section. A few of these flags have read-only values which cannot be changed at runtime. These are:
|
|
</p>
|
|
<dl>
|
|
<dt><code>startup_message</code></dt>
|
|
<dd>Controls the messages printed by Logtalk at startup. Possible flag values are <code>flags(verbose)</code> (the usual default; prints the Logtalk banner and a list of all default compiler flags), <code>flags(compact)</code> (a more compact listing of the default compiler flags), <code>banner</code> (prints only the Logtalk banner), and <code>none</code> (suppress all startup messages; useful for batch processing).</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>altdirs</code></dt>
|
|
<dd>Allows the use of alternative directories for storing the Prolog files and the XML documenting files resulting from entity compilation. This flag can only be set for Prolog compilers providing the necessary operating-system access predicates for implementing this feature (specifically, a built-in predicate for creating new directories). Possible option values are <code>on</code> and <code>off</code> (the usual default). The names of the alternative directories are specified using the compiler flags <code>tmpdir</code> and <code>xmldir</code>, which are also defined in the configuration files. Make sure the directory names are valid for your operating system before setting this flag on.</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>break_predicate</code></dt>
|
|
<dd>Informs Logtalk if the Prolog compiler supports a <code>break/0</code> predicate (which can be used by the Logtalk built-in debugger). Possible flag values are <code>true</code> and <code>false</code>.</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>encoding_directive</code></dt>
|
|
<dd>Informs Logtalk if the Prolog compiler supports the <a title="Consult reference manual" href="../refman/directives/encoding1.html"><code>encoding/1</code></a> directive. This directive is used for declaring the text encoding of source files. Possible flag values are <code>unsupported</code>, <code>full</code> (used in both Logtalk source files and compiler generated Prolog files), and <code>source</code> (used only in Logtalk source files).</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>threads</code></dt>
|
|
<dd>Informs Logtalk if the Prolog compiler provides suitable multi-threading programming support. Possible flag values are <code>unsupported</code>, <code>on</code>, and <code>off</code>. The default flag vale for compatible Prolog compilers is <code>off</code>, i.e. multi-threading programming support is disabled by default.</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><code>context_switching_calls</code></dt>
|
|
<dd>Allows context switching calls (<code><</2</code>) to be either allowed or forbidden. Possible flag values are <code>allow</code> and <code>forbid</code>. The default flag vale is <code>allow</code>.</dd>
|
|
</dl>
|
|
|
|
<h3 id="installing_runtime">Logtalk compiler and runtime</h3>
|
|
|
|
<p>
|
|
The <code>compiler</code> sub-directory contains the Prolog source file(s) that implement the Logtalk compiler and the Logtalk runtime. The compiler and the runtime may be split in two (or more) separate files or combined in a single file, depending on the Logtalk release that you are installing.
|
|
</p>
|
|
|
|
<h3 id="installing_library">Library</h3>
|
|
|
|
<p>
|
|
Starting from version 2.7, Logtalk contains a standard library of useful objects, categories, and protocols. Read the corresponding <code>NOTES.txt</code> file for details about the library contents.
|
|
</p>
|
|
|
|
<h3 id="installing_examples">Examples</h3>
|
|
|
|
<p>
|
|
Logtalk 2.x contains new implementations of some of the examples provided with previous 1.x versions. The sources of each one of these examples can be found included in a subdirectory with the same name, inside the directory examples. The majority of these examples include a file named <code>SCRIPT.txt</code> that contains cases of simple utilization. Some examples may depend on other examples and library objects to work properly. Read the corresponding <code>NOTES.txt</code> file for details before running an example.
|
|
</p>
|
|
|
|
<h3 id="installing_entities">Logtalk source files</h3>
|
|
|
|
<p>
|
|
Logtalk source files are text files containing entity definitions (objects, categories, or protocols). The extension <code>.lgt</code> is normally used. Logtalk compiles these files to plain Prolog, replacing the <code>.lgt</code> extension with <code>.pl</code> (the default Prolog extension). If your Prolog compiler expects the Prolog source filenames to end with a specific, different extension, you can set it in the corresponding configuration file.
|
|
</p>
|
|
|
|
<div class="footer">
|
|
<div class="copyright">
|
|
<span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/>
|
|
<span>Last updated on: October 24, 2007</span>
|
|
</div>
|
|
<div class="navbottom">
|
|
<span><a href="documenting.html">previous</a> | <a href="../glossary.html">glossary</a> | <a href="running.html">next</a></span><br/>
|
|
<span><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|