2 Running setup-plt from Scheme
The setup/setup-unit library provides setup-plt in unit form. The associated setup/option-sig and setup/option-unit libraries provides the interface for setting options for the run of setup-plt.
For example, to unpack a single ".plt" archive "x.plt", set the archives parameter to (list "x.plt") and leave specific-collections as null.
Link the options and setup units so that your option-setting code is initialized between them, e.g.:
... |
(link ... |
[(OPTIONS : setup-option^) setup:option@] |
[() my-init-options@ OPTIONS] |
[() setup@ OPTIONS ...]) |
...) |
#<part-start>
Imports
and exports nothing. Invoking setup@ starts the setup process.
2.1 Options Unit
Imports nothing and exports setup-option^.
2.2 Options Signature
setup-option^ : signature |
Provides parameters used to control setup-plt in unit form.
on? : any/c
If on, prints message from make to stderr. The default is #f.
(make-verbose) → boolean?
(make-verbose on?) → void?
on? : any/c
If on, verbose make. The default is #f.
(compiler-verbose on?) → void?
on? : any/c
If on, verbose compiler. The default is #f.
on? : any/c
If on, delete ".zo" and ".so"/".dll"/".dylib" files in the specified collections. The default is #f.
(compile-mode) → (or/c path? false/c)
(compile-mode path) → void?
If a path is given, use a ".zo" compiler other than plain compile, and build to (build-path "compiled" (compile-mode)). The default is #f.
on? : any/c
If on, compile ".zo". The default is #t.
on? : any/c
If on, compile ".so"/".dll" files. The default is #f.
(make-launchers on?) → void?
on? : any/c
If on, make collection "info.ss"-specified launchers. The default is #t.
(make-info-domain on?) → void?
on? : any/c
If on, update "info-domain/compiled/cache.ss" for each collection path. The default is #t.
(call-install) → boolean?
(call-install on?) → void?
on? : any/c
If on, call collection "info.ss"-specified setup code. The default is #t.
(force-unpack) → boolean?
(force-unpack on?) → void?
on? : any/c
If on, ignore version and already-installed errors when unpacking a ".plt" archive. The default is #f.
(pause-on-errors on?) → void?
on? : any/c
If on, in the event of an error, prints a summary error and waits for stdin input before terminating. The default is #f.
(specific-collections coll) → void?
coll : (listof path-string?)
A list of collections to set up; the empty list means set-up all collections if the archives list is also empty The default is null.
(archives) → (listof path-string?)
arch : (listof path-string?)
A list of ".plt" archives to unpack; any collections specified by the archives are set-up in addition to the collections listed in specific-collections. The default is null.
(current-target-directory-getter thunk) → void?
thunk : (-> . path-string?)
A thunk that returns the target directory for unpacking a relative ".plt" archive; when unpacking an archive, either this or the procedure in current-target-plt-directory-getter will be called. The default is current-directory.
→
(listof path-string?) . -> . path-string?)
(current-target-plt-directory-getter proc) → void?
proc
:
(listof path-string?) . -> . path-string?)
A procedure that takes a preferred path, a path to the parent of the main "collects" directory, and a list of path choices; it returns a path for a "plt-relative" install; when unpacking an archive, either this or the procedure in current-target-directory-getter will be called, and in the former case, this procedure may be called multiple times. The default is (lambda (preferred main-parent-dir choices) preferred).