Starpacks are standalone executables, which makes them even easier to distribute and use than Starkits. This convenience does introduce a number of trade-offs:
Starpacks use the same packaging mechanism as Starkits. their content can be listed and extracted with the SDX utility. The main difference is that the "header" is a large executable file, and that the files stored inside include all the standard Tcl/Tk runtime support files.
[https://www.magicsplat.com/blog/starpack-example/%|%Building Tcl 8.6 single file applications - a step-by-step guide], by [apn%|%Ashok P. Nadkarni], 2020-12-28: Six steps to getting the job done.
sbron 2005-08-17: Code can tell if it's running out of a starpack by checking the variable ::starkit::mode. In a starpack it's set to "starpack", and in a starkit it's set to (surprise!) "starkit".
LV 2006-11-14: Anyone willing to write a tutorial on creating a starpack that is designed to phone home (i.e. contact a web site) to check for updates? There are at least two scenarios I can see where this would be useful. The first, of course, is checking to see if there are new versions... sort of the functionality that sdx provides. The second would be simple updates of data files.
I suspect there are tricky parts - the application probably can't update the file that is being executed, so some messing around with renaming is probably necessary. The tclvfs is in the tclkit, right?, so that should make getting to the data a bit easier, if so. Anyways, a link to a tutorial on this subject would really be helpful.
The original term for a starpack was custom tclkit
Reason: MacOS files have a "data fork" and a "resource fork". The .bin files are an exchange format which ties them together (along with a bit of "finder info"). Catenating anything a the end probably will simply be ignored on unpack - which is what happens once you take it to the mac and unpack through StuffIt Expander or some such (Mac browsers tend to do that automatically, right after download).
If you do it on the Mac, while the forks are distinct, sdx will concatenate after the data fork. Then you can run it through StuffIt to create the transferable .bin version.
Running SDX on the Mac takes some trickery, since SDX is command-line driven, and the Mac has only tclkit:
In its console, type:
set argv [list wrap myapp -prefix mytclkit] source sdx.kit
The sdx starkit will perform its work (and exit, I think)
Some time later, CL notes the availability of How to Build Tcl/Tk Application Bundles: the Mac Way
The author thinks it has some VFS version problems with Windows Tclkits, but he hasn't had an opportunity to work them out. (Any advice or information on that would be useful.) He uses it on Mac OS X.
LV Thanks. I am still stuck, however, trying to figure out what I am trying to do. eskil is a stand alone Tcl/Tk late 8.5 or 8.6 based application that allows the user to compare two files and show, using color highlighting, the differences. I would like to create a starpack of the application. Since I've not found a working version of tclkit for Solaris 8 that is new enough to use for this purpose, I was hoping to be able to replace the tclkit in the sdx wrap command with kbskit to get the same effect. Is this something that is doable, or do I indeed face having to build a specialized kbskit that includes eskil in the resulting binary?
RZ: download eskil24.kit and then type
tclkit sdx.kit unwrap eskil24.kit tclkit sdx.kit wrap eskil24 -runtime kbsvq8.5-gui
You get a starpack called 'eskil24'.
MHo 2012-05-07: I got the following on RHEL linux with tclkit 8.5.9:
root@tqs-test /# ./tclkitlinux % info pa 8.5.9 % info commands tell socket subst open eof pwd glob list pid exec auto_load_index time unknown eval lassign lrange fblocked lsearch auto_import gets case lappend proc break variable llength auto_execok return linsert error catch clock info split array if fconfigure concat join lreplace source fcopy global switch auto_qualify update close cd for auto_load file append lreverse format unload read package set binary namespace scan apply trace seek zlib while vlerq chan flush after vwait dict continue uplevel foreach lset rename rechan fileevent regexp lrepeat upvar encoding expr unset load regsub history interp exit puts incr lindex lsort tclLog string % exit '''libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped)''' root@tqs-test /#
With 8.5.10, it's slightly different:#
root@tqs-test /# ./tclkitshlinux2 ./tclkitshlinux2: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory root@tqs-test /#