Starkits and Starpacks

Tcl scripts are typically interpreted by the Tcl shell, tclsh.

Starkits are single files that contain a virtual filesystem populated with Tcl scripts and other files. Starkits are interpreted by Tclkits, which are single files containing entire Tcl installations.

A Starpack is a Starkit joined to a Tclkit. It is a single executable file that contains a script and the interpreter needed to run it.

Why

Packaging Tcl/Tk scripts as Starkits is advantageous because it allows the set of files that comprise an application to be distributed and installed as a single file.

Likewise, Tclkits allow the complex set of files that comprise a Tcl/Tk installation to be managed as a single file. This confers advantages to the developer (easily test against different interpreter releases) and to the user (installation is simple—as is uninstallation).

Because they have no prerequisites, Starpacks are ideal for distribution to casual users. Since each Starpack contains a generic Tclkit, expert users may opt to save space by installing a single Tclkit to execute individual application Starkits.

How

Tclkits come in many flavors. You can run a Starkit with a Tclkit of your choice by calling it explicitly:

./tclkit-darwin-univ Starkit.kit

If a Tclkit is installed as tclkit, it is used implicitly when you execute a Starkit directly:

cp tclkit-darwin-univ /usr/local/bin/tclkit
./Starkit.kit

Starpacks are executed directly:

./Starpack

The leading ./ characters imply that the executable is in the current directory.

Starkits and Starpacks can be created and disassembled with SDX, itself a Starkit. You can use SDX to create a Starpack of itself.

Posted on Monday, October 1st, 2007. Tags: , .