This project provides tools for zipfs-based starkits:
- Starkit zkk.kit v4.0.x (a minimal zipfs counterpart to sdx.kit which was for mk4/vlerq kits)
- Package starkit v2.3.x (for loading zipfs-based starkits, the counterpart of starkit v1.3.x which was for mk4/vlerq kits)
How to use these tools
- zkk.kit works in the same way as sdx.kit, but currently offers only five subcommands: qwrap, wrap, unwrap, sync, and help.
- zkk.kit is a wrapper for package zkk which implements its commands as a namespace ensemble. Thus a command such as zkk wrap can be called equally well from the command line or from a Tcl script.
- The starkit package is intended for inclusion in the basekit.
License
These files are derivative works of sdx.kit and starkit.tcl by JCW and others which did not carry a licensing statement. Modifications by Keith Nash are licensed by the Tcl or Tcllib licenses, or by any terms intended by the earlier authors for their original works.
On tclkits, basekits, starkits, and starpacks
Before Tcl 9
- A basekit is a single binary file that implements Tcl and may include Tk and other Tcl packages.
- A tclkit is a basekit that has a standard set of packages. Tclkit was the original basekit.
- A starkit is a single-file application that can be run by a basekit, and consists of a brief script header, followed by the delimiting character Control-Z, and then by a file archive. Typically this archive contains only Tcl/Tk code, though it may also include binary packages for one or more platforms.
- A starpack is a standalone single-file application. It is the merger of a basekit and a starkit, and is a binary executable with a file archive appended.
- The tool sdx is used to construct these files.
This system was developed more than 20 years ago by Jean-Claude Wippler (JCW) and others, and is described in detail in this paper by Steve Landers:
https://tca1.tcl-lang.org/tcl2002/09thTcl-2002-Vancouver/landers-tclkit/tclkit.pdf
The system uses compressed file archives constructed from a database system called MetaKit 4 ("mk4"), or a later compatible (but read-only) alternative called vlerq; combined with a vfs (virtual file system) Tcl package that allows the files held in the database to be mounted by the tclkit in the filesystem seen by its interpreter.
With Tcl 9
Tcl 9 has built-in facilities that replace the additional packages mk4/vlerq and vfs: the zipfs command manages zip-based archives appended to other files and can mount them in its interpreter's filesystem. The construction of basekits, starkits, and starpacks requires some small additional tools, which this project provides.
FAQs
- Q: Can a zipfs basekit run a mk4-based starkit?
A: No, the starkit package is not equipped to run mk4-based starkits. In any case this starkit code usually has minor incompatibilities with Tcl 9, making it necessary to unpack the starkit, edit its code, and repack it. The repacking might as well use zkk.kit to create a starkit in the new zipfs format.
Q: Can a mk4/vlerq basekit run a zipfs-based starkit?
A: Unfortunately, no. The basekit could in principle use package vfs::zip to mount and run zip-based starkits, but it faces three obstacles:
- vfs::zip measures offsets from the start of the starkit file, not from the character after the Control-Z delimiter (i.e. from the "PK" characters that mark the beginning of a zip archive).
- the basekit expects to find packages in the lib/ directory of a starkit. In contrast, zipfs-based starkits place packages at the top level of the starkit filesystem.
- the starkit may contain code written for Tcl/Tk 9.0 that is not compatible with a Tcl 8.x basekit.