Previous: , Up: Runtime Systems on Target Machines   [Contents][Index]


6.7.2.2 Runtime Systems on Windows Target Machines

In order to locate all relevant files, the following directory structure should be used:

myapp.exe
sprt4-6-0.dll
sp-4.6.0\
+--- bin\
|    +--- sprt.sav
+--- library\
     +--- <files from %SP_PATH%\library>                

If support for multiple SICStus instances is needed, then the runtimes named e.g. sprt4-6-0_instance_01_.dll need to be available as well, in the same place as sprt4-6-0.dll.

If the runtime system needs to be debugged, then the above file system layout should be complemented as follows: The file spds.sav from the development system should be copied and placed in the same folder as sprt.sav and the license information must be made available. See Debugging Runtime Systems for details.

myapp.exe is typically created by a call to spld:

% spld --main=user […] -o ./myapp.exe

If the directory containing sprt4-6-0.dll contains a directory called sp-4.6.0, then SICStus assumes that it is part of a runtime system as described in the picture below. The (extended) runtime library, sprt.sav (spre.sav), is then looked up in the directory (sp-4.6.0/bin), as in the picture. Furthermore, the initial library_directory/1 fact will be set to the same directory with sp-4.6.0/library appended.

The directory structure under library/ should look like in a regularly installed SICStus, including the platform-specific subdirectory (x86-win32-nt-4 in this case). If your application needs to use library(timeout)8 and library(random), then your directory structure may look like:

myapp.exe
sprt4-6-0.dll
sp-4.6.0\
+--- bin\
|    +--- sprt.sav
+--- library\
     +--- random.po
     +--- timeout.po
     +--- x86-win32-nt-4 \
          +--- random.dll

The sp* files can also be put somewhere else in order to be shared by several applications provided the sprt4-6-0.dll can be located by the DLL search.

Naming the files with version number enables applications using different SICStus versions to install the sp* files in the same directory.

When a runtime system is redistributed to third parties, only the following files may be included in the distribution. All filenames are relative to %SP_PATH%:

bin\sprt.sav
bin\spre.sav
bin\jasper.jar
bin\prologbeans.jar
bin\*.dll
bin\*.po
library\*.{tcl,po,pl,bas}

Except license.pl!

library\*\*.dll
library\*\*.{po,pl}

Please note: you cannot redistribute spds.sav or license.pl.


Footnotes

(8)

Prior to release 4.4, library(timeout) also used a foreign resource. This is no longer the case.



Send feedback on this subject.