Extended runtime systems need to have a license available at runtime. This license can be embedded in the extended runtime executable or located in a separate file. The following describes the steps needed in order to enter the license information. The example assumes that you are familiar with the procedure for building runtime systems. See The Application Builder in the SICStus Prolog Manual for details.
Suppose that you have been provided with the following license information:
Dear SICStus Prolog customer, Your extended runtime license information for platform 'PLATFORM' is as follows: Site name: MySite License code: a111-b222-c333-d444-e444 Expiration date: permanent Corresponding to a file 'extended_license.pl' with the following contents: %% LICENSE BEGIN site('MySite'). product('extended_runtime_sicstusMAJOR.MINOR_PLATFORM', 'permanent', 'a111-b222-c333-d444-e444'). %% LICENSE END
Please note: The license information differs between SICStus
versions and platforms. The PLATORM is one of
darwin (for Apple
solaris. The MAJOR
.MINOR is the major and minor
version of SICStus, currently
Following is a list of common tasks.
Create a file extended_license.pl with the contents specified in the email, that is:
%% LICENSE BEGIN site('MySite'). product('extended_runtime_sicstusMAJOR.MINOR_PLATFORM', 'permanent', 'a111-b222-c333-d444-e444'). %% LICENSE END
This file can be located anywhere, e.g. in the folder containing your source code.
spldwhich embeds license information from the above file:
% spld -E --license-file ./extended_license.pl […]
This will read the license information and embed the information in the created executable. No separate license file will be needed at runtime. This is the preferred method. This method can be used also to create an all-in-one executable; see All-in-one Executables in the SICStus Prolog Manual.
On UNIX platforms, it is possible to install the license information
splm tool so that you do not need create the file
extended_license.pl and pass it to
spld. However, a
separate license file may be needed anyway if the license cannot be
embedded; see below.
The resulting runtime system will need a way to find the
license file at runtime. This variant is useful when the executable is
not built with
spld, e.g. when builing a DLL (Windows) or DSO (UNIX):
% spld -E --no-embed-license […]
The resulting executable will produce output similar to the following if it cannot find the license file:
License error: License file not found! […]
If the license information has been embedded, then no special steps are needed. Otherwise, you need to distribute the license file along with the runtime system. To make the license file available it should be located in the library folder and named license.pl. That is, copy extended_license.pl as created above into the file library/license.pl in the folder tree available at runtime. See Runtime Systems on Target Machines in the SICStus Prolog Manual for details. Also see Locating the License Information in the SICStus Prolog Manual for additional ways of making the license information available.
spld. As usual, you can use:
% spld --verbose --keep […]
in order to see exactly what steps are performed by
spld. This is
useful if you want to embed the license but need to build the
executable manually, instead of using