Version 47 of Starkit

Updated 2003-07-23 13:55:42

http://www.equi4.com/images/starkit-nextgen.png

A Starkit is a single-file packaging of Tcl scripts, platform-specific compiled code and application data; designed to facilitate simple deployment of cross platform applications. The name comes from STandAlone Runtime.

Starkits are interpreted using TclKit - a single file Tcl/Tk interpreter. You will need a version of TclKit for each platform that you want to run a Starkit on. Have a look at the TclKit download area where there are versions for over a dozen platforms.

A Starpack is a single (platform-specific) executable file containing both TclKit and a Starkit. They are useful when you want to deploy a single executable for an application. Starpacks can be built on any platform supporting TclKit.

The Starkit home page is http://www.equi4.com/starkit/

The best reference for starkits, starpacks, and tclkits is the paper Steve Landers presented at the Tcl/Tk 2002 conference in Vancouver - on his site at [L1 ].


In case you're wondering

  • The term scripted document is obsolete - it's now a Starkit
  • The term custom tclkit is obsolete - it's now a Starpack

See http://www.equi4.com/mailman/listinfo/starkit for information concerning a mailing list specifically to discuss tclkit/starkit/starpack ideas, development, use.


When storing Starkits on a MacOS machine, to what are people generally setting the type and creator values?

Try type "TEXT" and creator "Tkd4" (sdx sets them that way too) -jcw


Check out my hints on Sexy Starkits --Ro


But what is a Starkit? Quoting Scripted Documents Are Obscure: what we have here is simply a Tcl version of Java ".jar" files, with the runtime environment optionally bound in. ... As for "simply jar files": not quite, SD's are r/w with transaction-safe commit/rollback because there's a database engine underneath. That means they can also store config info, update themselves, and store extensive datasets. -jcw

In other words: a way of distributing a Tcl/Tk app as a single file, instead of as a bunch of files. And, the user doesn't have to unpack it before it can be used. (But is it still convenient for users to study/edit?


Recently while playing with kitten, I was seeing an error when I attemped to package require one of the extensions, but was getting an error. I mused to jcw that it would be nice if there were a way to cd into the directory where tclkit was reporting a problem to browse, and he replied that I should be able to do just that. After some experimenting (and a false trail due to my forgetfulness) I found this indeed works:

 $ tclkit
 % source /home/lwv26/kitten.kit
 % cd /home/lwv26/kitten.kit/lib
 % glob *
 Class1.0 ClassyTk1.0 Extral2.0 Mpexpr10 Tktable2.7 app-kitten ascenc-0.11 autoproxy autoscroll blowfish-0.10 bwidget-1.3.0 cgi1.6 dyncall-0.11 efftcl-1.0 expect-5.31 gbutton gk5.1 hexdump-0.10 ihash-0.11 itcl-3.2 itk-3.2 itk-3.3 iwidgets3.0.1 iwidgets4.0.1 lzrw1-0.10 mathf-0.11 mclistbox-1.02 md5c-0.11 mentry2.4 mkWidgets1.3 mvec-0.12 narray-0.81 scratch-0.10 supertext-1.0.1 tablelist2.7 tcldom-2.0 tclexpat1.1 tcllib1.3 tclsoap1.6.5 tclx8.4 tclxml2.0 tdom0.7 tix8.2 tkhtml0.0 tls-1.4 wcb2.8 wikit
 % 

This may help you when attempting to debug strange errors.

Also, note that when I tried doing ls or exec ls, the ls command did not see the directories, etc. within the lib. This seems to me to be bad news for someone wanting to merge using exec, open |, or other external calls with VFS mounted filesystems.

(See VFS, exec and command pipelines for discussion on this issue; if someone wants to contribute the time/code, at least some sort of functionality ought to be possible and useful there).


LV I discovered this week that ActiveTcl 8.4.1.0 ships with the necessary framework to allow one to say:

  /path/to/activetcl8.4.1.0/bin/tclsh sdx.kit

or any other starkit, and the starkit executes. No requirement for a Tclkit. The Tclkit, of course, is still a superior distribution mechanism. Hopefully there will be tools one day that one can use to generate a starkit based on the Tcl environment available and the script(s) being wrapped.


stevel: See Demonstrating Starkits for some ideas on how to present Starkits to the uninitiated.


As it is not mentioned on the sdarchive page I thought I would add that on windows, you can of course as usual "register" the extension kit, as an alternative to writing bat files, hence enabling the windows-double klick behaviour. - VL


David Zolli mentiones, on the starkit mailing list, these steps for adding encodings (since tclkit only has a subset of the encodings that normal tcl has - one of the (few) differences between Tcl and Tclkit...)

I've tried and tested this, and it's works :

 1) Unpack your starkit if is not already done.
 2) Create this directory : .../appname.vfs/lib/tcl8.4/encoding
 3) Copy the needed encoding(s) .enc file(s) in this directory (from an
 existing tcl installation or from tcl CVS repository here : 
 http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcl/tcl/library/encoding/
 if you using the last tclkit).
 4) re-wrap your starkit with these new files.

Then, these encoding are available in you starkit/starpack and your starkit can be launched with a 'standard' tclkit.


Category Tclkit | Category Glossary |