6.7 API for Installing ".plt" Archives

► |  | raco: Racket Command-Line Tools

1 | raco make: Compiling Source to Bytecode
2 | raco exe: Creating Stand-Alone Executables
3 | raco distribute: Sharing Stand-Alone Executables
4 | raco planet: Automatic Package Distribution
5 | raco pkg: Package Management
6 | raco setup: Installation Management
7 | raco decompile: Decompiling Bytecode
8 | raco demod: Demodularizing Programs
9 | raco link: Library Collection Links
10 | raco pack: Packing Library Collections
11 | raco unpack: Unpacking Library Collections
12 | raco ctool: Working with C Code
13 | raco test: Run tests
14 | raco docs: Documentation Search
15 | raco expand: Macro Expansion
16 | raco read: Reading and Pretty-Printing
17 | raco scribble: Building Documentation
18 | Adding a raco Command
19 | Installation Configuration and Search Paths

▼ | 6 | raco setup: Installation Management

6.1 | Running raco setup
6.2 | Installing ".plt" Archives
6.3 | Controlling raco setup with "info.rkt" Files
6.4 | "info.rkt" File Format
6.5 | Package Dependency Checking
6.6 | API for Setup
6.7 | API for Installing ".plt" Archives
6.8 | API for Finding Installation Directories
6.9 | API for Reading "info.rkt" Files
6.10 | API for Relative Paths
6.11 | API for Collection Names
6.12 | API for Collection Searches
6.13 | API for Platform Specifications
6.14 | API for Cross-Platform Configuration
6.15 | API for Cross-References for Installed Manuals
6.16 | API for Materializing User-Specific Documentation
6.17 | Layered Installations
6.18 | Tethered Installations

► | 6.7 | API for Installing ".plt" Archives

6.7.1 | Non-GUI Installer

On this page:

6.7.1 Non-GUI Installer
run-single-installer
install-planet-package
reindex-user-documentation
clean-planet-package

Racket
top contents ← prev up next →

### 6.7 API for Installing ".plt" Archives🔗ℹ

The setup/plt-single-installer module provides a function for installing a single ".plt" file.

#### 6.7.1 Non-GUI Installer🔗ℹ

(require setup/plt-single-installer) | package: base

> > procedure
> > (run-single-installer |
> > |  | file |
> > |  | get-dir-proc |
> > | [ | #:show-beginning-of-file? show-beginning-of-file?]) |
> → void?
> file : path-string?
> get-dir-proc : (-> (or/c path-string? #f))
> show-beginning-of-file? : any/c = #f

Creates a separate thread and namespace, runs the installer in that thread with the new namespace, and returns when the thread completes or dies. It also creates a custodian (see Custodians) to manage the created thread, sets the exit handler for the thread to shut down the custodian, and explicitly shuts down the custodian when the created thread terminates or dies.

The get-dir-proc procedure is called if the installer needs a target directory for installation, and a #f result means that the user canceled the installation. Typically, get-dir-proc is current-directory.

If show-beginning-of-file? is a true value and the installation fails, then run-single-installer prints the first 1,000 characters of the file (in an attempt to help debug the cause of failures).

> procedure (install-planet-package file directory spec) → void?
> file : path-string?
> directory : path-string?
> | spec |  | : |  |
> (list/c string? string?
> (listof string?)
> exact-nonnegative-integer?
> exact-nonnegative-integer?)

Similar to run-single-installer, but runs the setup process to install the archive file into directory as the PLaneT package described by spec. The user-specific documentation index is not rebuilt, so reindex-user-documentation should be run after a set of PLaneT packages are installed.

> procedure (reindex-user-documentation) → void?

Similar to run-single-installer, but runs only the part of the setup process that rebuilds the user-specific documentation start page, search page, and master index.

> procedure (clean-planet-package directory spec) → void?
> directory : path-string?
> | spec |  | : |  |
> (list/c string? string?
> (listof string?)
> exact-nonnegative-integer?
> exact-nonnegative-integer?)

Undoes the work of install-planet-package. The user-specific documentation index is not rebuilt, so reindex-user-documentation should be run after a set of PLaneT packages are removed.
top contents ← prev up next →