Node:Runtime Systems on Target Machines, Next:Generic Runtime Systems, Previous:Windows notes, Up:Windows notes
This section describes how to launch a runtime system on a so called target machine, i.e. a machine which does not have SICStus installed. An alternative approach to what is presented here is to package the whole application as an all-in-one executable; see All-in-one Executables.
In order to locate all relevant files, the following directory structure
should be used.
myapp.exe sprt39.dll sp39\ +--- bin\ | +--- sprt.sav +--- library\ +--- <files from %SP_PATH%\library>
if support for multiple SICStus instances is needed, then the run-times
named e.g. sprt39_instance_01_.dll
, need to be available as
well, in the same place as sprt39.dll
.
myapp.exe
is typically created by a call to spld
:
% spld --main=user [...] -o ./myapp.exe
If the directory containing sprt39.dll
contains a directory
called sp39
, SICStus assumes that it is part of a Runtime System
as described in the picture. The runtime library (sprt.sav
) is
then looked up in the directory (sp39/bin
), as in the
picture. Furthermore, the initial library_directory/1
fact will
be set to the same directory with sp39/library
appended.
The directory structure under library/
should look like in a
regular installed SICStus, including the platform-specific subdirectory
(x86-win32-nt-4
in this case). If your application needs to use
library(system)
and library(random)
, your directory
structure may look like:
myapp.exe sprt39.dll sp39\ +--- bin\ | +--- sprt.sav +--- library\ +--- random.po +--- system.po +--- x86-win32-nt-4 \ +--- random.dll +--- system.dll
The sp*
files can also be put somewhere else in order to be
shared by several applications provided the sprt39.dll
can be
located by the DLL search.
The 39 in the file names above is derived from SICStus Prolog's major and minor
version numbers, i.e. currently 3 and 9. Naming the files with version
number enables applications using different SICStus versions to install
the sp*
files in the same directory.