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 for details.
Suppose that you have been provided with the following license information:
Your license information for platform 'extended_runtime_sicstus4.0_x86-win32-nt-4' is as follows: Site name: MySite License code: a111-b222-c333-d444-e444 Expiration date: permanent
Following is a list of common tasks.
Create a file extended_license.pl containing the following:
%% LICENSE BEGIN site('MySite'). product('extended_runtime_sicstus4.0_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.
% 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.
On UNIX platforms, it is possible to install the license information using the splm tool so that you don't 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, 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 for details. Also see Locating the License Information for additional ways of making the license information available.
% 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 spld.