3.3 Installation-Specific Launchers for Scheme Code
The launcher/launcher library provides functions for
creating launchers, which are similar to stand-alone
executables, but sometimes smaller because they depend permanently on
the local PLT Scheme installation. In the case of Unix, in particular,
a launcher is simply a shell script. The mzc tool provides no
direct support for creating launchers.
3.3.1 Creating Launchers
Creates the launcher dest, which starts MrEd with the
command-line arguments specified as strings in args. Extra
arguments passed to the launcher at run-time are appended (modulo
special Unix/X flag handling, as described below) to this list and
passed on to MrEd. If dest exists already, as either a file
or directory, it is replaced.
The optional aux argument is an association list for
platform-specific options (i.e., it is a list of pairs where the first
element of the pair is a key symbol and the second element is the
value for that key). See also build-aux-from-path. See
create-embedding-executable for a list that applies to both
stand-alone executables and launchers under Windows and Mac OS X MrEd;
the following additional associations apply to launchers:
'independent? (Windows) – a boolean; #t
creates an old-style launcher that is independent of the
MzScheme or MrEd binary, like setup-plt.exe. No other
aux associations are used for an old-style launcher.
'exe-name (Mac OS X, 'script-3m or
'script-cgc variant) – provides the base name for a
'3m-/'cgc-variant launcher, which the script
will call ignoring args. If this name is not provided,
the script will go through the MrEd executable as usual.
'relative? (all platforms) – a boolean, where
#t means that the generated launcher should find the
base MrEd executable through a relative path.
For Unix/X, the script created by make-mred-launcher detects
and handles X Windows flags specially when they appear as the initial
arguments to the script. Instead of appending these arguments to the
end of args, they are spliced in after any X Windows flags
already listed listed in args. The remaining arguments (i.e.,
all script flags and arguments after the last X Windows flag or
argument) are then appended after the spliced args.
Like
make-mred-launcher, but for starting MzScheme. Under Mac
OS X, the
'exe-name aux association is ignored.
Same as
Same as
3.3.2 Launcher Path and Platform Conventions
Returns a pathname for an executable in the PLT Scheme installation
called something like name. For Windows, the ".exe"
suffix is automatically appended to name. For Unix,
name is changed to lowercase, whitespace is changed to
-, and the path includes the "bin" subdirectory of
the PLT Scheme installation. For Mac OS X, the ".app" suffix
is appended to name.
Returns the same path as
(mred-program-launcher-path name)
for Unix and Windows. For Mac OS X, the result is the same as for
Unix.
Returns #t if MrEd launchers for the current platform are
directories from the user’s perspective. For all currently supported
platforms, the result is #f.
Returns #t if MrEd launchers for the current platform are
implemented as directories from the filesystem’s perspective. The
result is #t for Mac OS X, #f for all other
platforms.
Like mred-launcher-is-actuall-directory?, but for MzScheme
launchers. The result is #f for all platforms.
Returns a path with a suitable executable suffix added, if it’s not
present already.
Returns three values suitable for use as the
extension,
style, and
filters arguments to
put-file,
respectively.
If MrEd launchers for the current platform were directories form the
user’s perspective, the style result is suitable for use with
get-directory, and the extension result may be a
string indicating a required extension for the directory name.
Like mred-launcher-get-file-extension+style+filters, but for
MzScheme launchers.
3.3.3 Launcher Configuration
Returns #t if the MrEd launcher dest does not need
to be updated, assuming that dest is a launcher and its
arguments have not changed.
The recognized suffixes are as follows:
".icns" → 'icns file for use under Mac
OS X
".ico" → 'ico file for use under
Windows
".lch" → 'independent? as #t
(the file content is ignored) for use under Windows
".creator" → 'creator as the initial
four characters in the file for use under Mac OS X
".filetypes" → 'file-types as
read content (a single S-expression), and
'resource-files as a list constructed by finding
"CFBundleTypeIconFile" entries in 'file-types
(and filtering duplicates); for use under Mac OS X
".utiexports" → 'uti-exports as
read content (a single S-expression); for use under
Mac OS X
A parameter that indicates a variant of MzScheme or MrEd to use for
launcher creation and for generating launcher names. The default is
the result of
(system-type 'gc). Under Unix and Windows, the
possibilities are
'cgc and
'3m. Under Mac OS X, the
'script-3m and
'script-cgc variants are also
available for MrEd launchers.
Returns a list of symbols corresponding to available variants of MrEd
in the current PLT Scheme installation. The list normally includes at
least one of
'3m or
'cgc – whichever is the result
of
(system-type 'gc) – and may include the other, as well as
'script-3m and/or
'script-cgc under Mac OS X.
Returns a list of symbols corresponding to available variants of
MzScheme in the current PLT Scheme installation. The list normally
includes at least one of
'3m or
'cgc – whichever is
the result of
(system-type 'gc) – and may include the other.
3.3.4 Launcher Creation Signature
3.3.5 Launcher Creation Unit
A unit that imports nothing and exports
launcher^.