6.7.3.4 Extended Runtime Systems

An extended runtime system is a variant of a runtime system with additional capabilities, including the presence of the Prolog compiler. Extended runtime systems are created with spld in a way similar to how ordinary runtime systems are created.

Since SICStus Prolog 4.0.5, extended runtime systems need to have a license available at run-time. 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 use the license information. We intend to improve this procedure in a future release.

The example assumes that you are already familiar with the procedure for creating an ordinary runtime system, as described above.

Suppose the following extende runtime license information:

        Your license information for platform
        'extended_runtime_sicstus4.1_x86-win32-nt-4' is as follows:
     
        Site name:          MySite
        License code:       a111-b222-c333-d444-e444
        Expiration date:    permanent
1.
Make the license available in the development system. Create a file extended_license.pl containing the following:
            %% LICENSE BEGIN
            site('MySite).
            product('extended_runtime_sicstus4.1_x86-win32-nt-4',
                    'permanent',
                    'a111-b222-c333-d444-e444').
            %% LICENSE END

This file can be located anywhere, e.g. in the folder containing your source code.

2a.
Build an extended runtime system using spld that embeds the 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 run-time. This is the preferred method, and can be used also to create an all-in-one executable; see All-in-one Executables.

On UNIX platforms, it is possible to install the license information using splm, so that you do not need create the file extended_license.pl and do not need to pass it to spld. However, a separate license file may be needed anyway if the license cannot be embedded; see below.

2b.
Build an extended runtime system that does not embed the license information. The resulting runtime system will need a way to find the license file at run-time. 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! ...

3.
Ensure that the license information is available at run-time.

If the license information has been embedded, e.g. using method 2a, then no special steps are needed.

If the license information has not been embedded, e.g. using method 2b or because the extended run-time system was not built with spld, then you need to distribute the license file along with the run-time system.

To make the license file available it should be located in the library folder and named license.pl. That is, copy the extended_license.pl created above into the file library/license.pl in the folder tree available at run-time. For further information, see Runtime Systems on Target Machines.

As usual it is possible to 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, i.e. without using spld.


Send feedback on this subject.