Introduction

Starkits are an innovative packaging mechanism created by Equi4 Software for distributing Tcl applications as a single file. Typically Tcl/Tk applications consist of a number of files and packages which need to be installed just so along with a certain version of the Tcl/Tk runtime. Such an application has no protection against the end-user upgrading any of the dependent packages and potentially breaking the shipped application. By using a starkit to distribute the application the developer can bind together a snapshot of a running system into a virtual filesystem. This snapshot can contain known compatible versions of al the dependent packages and it is even possible to bind a given version of the Tcl/Tk runtime to create a starpack and make our application a single file executable.

Windows

As a demonstration I have created such a starpack for aMSN. This is a single Windows executable that runs on Windows 98, XP and even Vista. It requires no local installation of Tcl and no additional packages. It still supports the end-user installation of plugins.

Linux

There is also a starkit for linux x86. This can be made by installing to a temporary directory and rearranging the structure a bit. The following should do it

% ./configure --prefix=/tmp/amsn --with-tcl=/opt/tcl/lib
% make ; make install
% mv /tmp/amsn/share /tmp/amsn.vfs
% cat >/tmp/amsn.vfs/main.tcl<<EOF
package require starkit
if {[starkit::startup] ne "sourced"} {
    source [file join $starkit::topdir amsn amsn]
}
EOF
% cd /tmp ; sdx wrap amsn.kit

For good measure I added the tls package to the Linux starkit as tclkit doesn't look outside the virtual filesystem for packages unless explicitly told to do so (by modifying the auto_path variable).

Files


filenamedescription
amsn.kit (gpg) Starkit - run using tclkit
amsn.exe (gpg) Starpack - single-file Windows executable.
amsn-x86-linux.kit Linux (intel architecture) starkit. You may need to get tclkit