item2
Next»

contents

 

Introduction - 1

Background - 2

Deployment - 3

Starkits - 4

Tclkit - 5

Advanced topics - 6

Repositories - 7

Server apps - 8

Who uses this - 9

Examples - 10

Conclusion - 11

 

Acknowledgements

References

4.1 - Starkits overview

The name Starkit is an acronym for STandAlone Runtime.

Starkits let you "seal" a complete directory tree into a runnable form. The Tcl/Tk interpreter which can "run" such documents is called Tclkit. Tclkit itself is little more than a wrapped version of Tcl, Tk, the IncrTcl object oriented extension and a few more extensions - plus all the necessary runtime library scripts.

The essence of Starkits is that they contain a “filesystem-inside-a-file”. This filesystem contains a copy of all files that form an application, but in normal use it never gets unpacked at all. The Tclkit runtime contains a complete Tcl/Tk system, and it too can function without ever being unpacked. The command "tclkit myappfile" is the Starkit way of "running the application", although on Unix the same effect can be achieved simply by making the Starkit executable ("chmod +x") and having Tclkit available path.

Having an application in just two files has a number of benefits:

  • Tclkit is a generic runtime - the same file works with all Starkits
  • there is one Tclkit build for each platform
  • if an application contains only portable scripts then the Starkit is portable

If multi-platform deployment is an issue, one can deploy the application as a file which runs on all platforms - just by launching it with the appropriate Tclkit.

The philosophy behind Starkits is that deployment is an integral part of the development process.

Applications get built and extended over time, in whatever way a developer sees fit, but with a certain directory structure as the storage convention. Development can take place using any Tcl/Tk installation (including Tclkit itself). Tcl commands such as "package require", "source", and "load" can be used - as always.

When the time comes to deploy, all one does is wrap the entire application directory tree into a Starkit. The resulting file is compressed and ready for deployment. In fact, it is runnable. Deployed applications run in nearly the same way as they do during the development process.

This is achieved through the Tcl Virtual File System facility[8] - a feature that allows you to divert all filesystem access away from the native operating system to something else. On start-up, the Starkit gets “mounted” so that it appears to contain a directory structure. This internal internal filesystem can be read or written like a normal files system. The VFS "mount" concept makes running from a real filesystem and running from inside a Starkit almost indistinguishable.

see also

Starkit Home Page

Tclkit Home Page

Metakit Home Page

SDX Utility

Wikit Home Page

Tclers' Wiki

Author's Website

Papers & Presentations