Did you know ... | Search Documentation: |
Structure of a pack |
A pack is a directory that has two obligatory components:
prolog
. When the pack is attached,
this directory is added to the library
file search path.
This implies that any .pl
file that appears in this
directory can be loaded into Prolog using :-
use_module(library(file)).
Alternatively, a file from a specific
package can be loaded using e.g.,
:- use_module(pack(environ/prolog/environ)).
pack.pl
. This file provides the meta data
for the pack. See section
15.5.1 for details.In addition, a pack may, and often does, include foreign code. The current system provides support for classical Unix make files, GNU autoconf/automake and CMake. See section 15.5.2 for details. This build infrastructure is also used to test the package.
A pack can be made accessible in two ways
.tgz
(gzipped tar archive) or .zip
.
<pack>-<version>.<ext>
The pack contains the contents of the package. The root of the
archive is identified by locating the file pack.pl
.
Extraction ignores the path leading to this file. Typically, the archive
contains a single directory named after the package name without
version.
Installing packs from archives requires that SWI-Prolog has the
archive
extension installed. When a package is registered
with the central package server the server identifies it by the SHA1
hash of the archive. It is therefore important that the archive is never
modified after registration. If any modification is required
(including comments, documentation, etc,) the user
must create a new version.