TOL Project
About TOL

Other Links
Trac Guide
Wiki Tree


TolPackage is a TOL module (part of TolCore) for the TOL-packages management: installation, updating and upgrading, loading, creation, etc.


TolPackage has different versions linked to the package design evolution and requirements (see History).

The main functionalities described below are available from TolPackage version 2 onwards.

Package installation

A package is automatically installed the first time it is required (#Require).

#Require <package>;

However, an installation can be carried out manually via the InstallPackage function, indicating the identifier (name and version) of the package desired for installation:

Real TolPackage:InstallPackage(<packageIdentifier>);

If you don't know the most recent version we can use the InstallLastCompatible function and simply indicate the package name:

Real TolPackage:InstallLastCompatible(<packageName>);

Update and upgrade

Periodically, new versions of a package are created. So, you need update and upgrade your packages to stay up to date.

TolPackage identifies two replacement mechanisms:

  • A package update, consisting of the substitution of the package for another more recent one, which has the same version numbers.
  • A package upgrade, consisting of the installation of a new version of the package. Note that the previous version is not uninstalled.

A package update usually includes important corrections, since the reconstruction of a package with the same version discards the previous one.

To update a package we can use the Update function, indicating the package name:

Real TolPackage::Update(<packageName>);

We can also update all the packages we have installed using the UpdateAll function:

Real TolPackage::UpdateAll(?);

A package upgrade is equally recommendable, as in many cases they include important advances in the implemented procedures and algorithms.

To improve a unique package we can use the Upgrade function:

Real TolPackage::Upgrade(<packageName>);

And in a similar way, the UpgradeAll function, to improve all of the installed packages:

Real TolPackage::UpgradeAll(?);

Low version upgrade

In case of you wish to upgrade the low-version (second version number) of a package maintaining the high-version as it is, you have the LowUpgrade function. It is called using the package name and the first version number (high-version number):

Real TolPackage::LowUpgrade(<packageName.highVersion>);

Bear in mind that if you do not indicate a high-version when use LowUpgrade, an attempt would be made to upgrade the low-version of all of the installed high-versions.

If you wish to obtain all of the upgrades for a package, you have the function FullUpgrade which joins calls to Upgrade and LowUpgrade:

Real TolPackage::FullUpgrade(<packageName>);

You also have functions for low- or full-upgrade all installed packages: LowUpgradeAll and FullUpgradeAll.


The TolPackage module evolves with the TOL-package design and enhacements, causing different versions with their own mechanisms and functionalities.

These versions are briefly described below.

Version 1

TolPackage first version has been distributed from TOL version 2.0.1 (see [2224]) to TOL versión 3.1 p009 (see [4535]).

This was the development version and it shows different enhancements in its two different subversions: 1.0 and 1.1.

Version 2

From TOL version 3.1 p010 (see [4622]) a new version of TolPackage: 2 is available. This version was created to solve some difficulties with previous version.

Version 3

To solve an OIS incompatibility in early patchs of TOL version 3.2 a new version of TolPackage: 3 was created. This third version was used simultaneously with version 2.

See tickets: #1541, #1533.

The mentioned incompatibility was solved in [5428] and since then the TolPackage duality (versions 2 and 3 simultaneity) is no longer necessary.

Version 4

New TOL versions for Windows (MinGW compiled) incorporate an incompatibility with TOL packages including binary libraries (.dll files).

This difficulty causes the development of a new version: 4. See ticket: #1821.

TolPackage.4 provides the possibility of managing different TOL-package variants (compatible with different TOL platforms) for the same TOL-package version.