A '''starpack''' is a special version of a [Starkit]. A Starpack combines a Starkit with a [Tclkit] runtime into a single file. Some people want only to know "[How to create my first Starpack]". Starpacks are standalone executables which run out of the box, making them even easier to distribute and use than Starkits. This convenience does introduce a number of trade-offs: * Starpacks only work on the platform for which they have been built * Starpacks cannot modify themselves * Starpacks must be updated as a whole, and are (much) larger than most Starkits Note that 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. Instructions on how to create a starpack are at [http://equi4.com/papers/skpaper4_7.html] <> [AEC], 7/22/2002: I have a tcl/tk edit application which opens a file which may be passed in on the command line (i.e. app.exe somefile.tcl). The file is opened by the app and not sourced. When I create a starpack with my app, it tries to source the file on the command line and fails. Is there a way to change this behavior of the starpack? [LV] writes: AEC, at the Starkit page there is a pointer to a mailing list where starkit developers discuss issues - you might want to report your problem there. [AEC]: Thanks. I'll look into that. ''This bug should be gone in Tclkit 8.4.x, i.e. Sept 2002 or later.'' [Wojciech Kocjan] [qstarpack] is a small script that eases migrating from freewrap to starpacks. ---- Also, from the [Tcl chatroom]: [stevel]: To wrap a script into a Starkit .... sdx qwrap myscript.tcl this gives you myscript.kit - which can be run with Tclkit. To unwrap ... sdx unwrap myscript.kit this gives you a "virtual filesystem" directory structure unpacked into myscript.vfs. To wrap back into a Starpack (i.e. application + Tclkit) then use sdx wrap myscript.kit -runtime /path/to/tclkit where /path/to/tclkit is the Tclkit for your target plaform ...One caveat, the Tclkit can't be the one you are running sdx with - just make a copy ... but you can generate for platforms other than the one you are running on. Well, except for MacOS 9.0 and earlier - where the binary needs a resource fork for some reason, and that can't be generated except on a Mac... (On OS X this is no longer true, although resource forks remain available for backwards compatibility.) ---- [LV] from the [starkit] mailing list, [jcw] says: You're going to have to create starpacks on the Mac. [For OS 9] 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: 1. Launch tclkit 2. In its console, type: set argv [list wrap myapp -prefix mytclkit] source sdx.kit 3. 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" [http://tk-components.sourceforge.net/tk-bundle-tutorial/index.html]. ---- Note that not all the useful info on [starkit]s, starpacks, etc. is here on this web site. For instance, an article titled ''Custom icons for win32 starpacks'' can be found here [http://www.equi4.com/267] . ---- [Custom Icons For Win32 Starpacks - The Real Story] The info given in the Equi4.com article mentioned above is DODGY! I can't correct that page itself, because it's not on the Wiki, and not editable. So click [Custom Icons For Win32 Starpacks - The Real Story], if you want a method of customising the icons in a Starpack that:- * Actually works, * Works with ANY RUNTIME (whether or not it's got a tclkit.ico in the tclkit's topdir), and; * Allows you to ADD any icons you want to the runtime - and DELETE any that you don't want - to get exactly the set of (zero or more) icons you want. ''It would be nice if you (no name given) could please explain what does and does not work for you in http://www.equi4.com/267 - I'm also more than happy to explain how tclkit.ico can be used in any runtime (it's quite simple) if that's what you're after -[jcw]'' ---- Thanks [jcw]. My name's Peter Newman. The runtimes I want to use are BIKIT.EXE or DQKIT.EXE - cause I need BLT. Neither of those runtimes have that six icon tclkit.ico your method requires in the $starkit::topdir. So your method, as you've described it, won't work with these. But if there's a modified method that will, let me know. Also, I couldn't get your method to work with TCLKIT-WIN32.UPX.EXE - a recent version which I downloaded a few weeks ago (early February 2004). But that might be my fault. I didn't try very hard - since it's BIKIT.EXE and DQKIT.EXE I want the icons for. ''I've added some more details about how this is all supposed to work in SDX at [http://www.equi4.com/267]. -[jcw]'' ---- Could someone post some clues on how to automate the creation of starpacks/starkits through the use of a Makefile? Currently I use mktclapp which is okay, but getting dated. Discussion moved to [Building Starkits and Starpacks using a Makefile]. ---- [sbron] 17 Aug 2005: 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] Nov 14, 2006 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. ---- See also [Differences between a starkit and a starpack]. ---- http://anoved.net/2008/03/starpacker.html is a utility (based on [sdx]) for making starpacks. 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. ---- [MHo] 2008-07-04: Still using the latest 8.4 tclkit, which seems to be 8.4.17 from [http://www.equi4.com/tclkit/download.html]. And I still have the icon problem (48bit icons are not found and replaced by SDX), which was discussed here [http://www.nabble.com/Windows-ICONS-48x48-td16091357.html] and there [http://wiki.tcl.tk/10922] - I couldn't get it to work. I don't want to switch to 8.5 for this reason... anybody out there with a solution? [APN] The only method I've found that consistently works across all starpack versions is that in [Custom Icons For Win32 Starpacks - The Real Story]. I've a makefile that does all the steps. The other solutions seem simpler but I spent so much time struggling every time I changed the base kits to get things working again. Perhaps it was pilot error, I don't know. But after switching to the [Custom Icons For Win32 Starpacks - The Real Story] method, I've had no problems. [MHo] Thanks. For now, I found a tclkit 8.4.19 at http://www.patthoyts.tk/tclkit.html - this behaves as expected. ---- see also [StarPack helper] made by [JR] ---- [LV] 2009 Oct 6 I am trying to get the following command line to work as expected: ====== /projects/sprs_lwv/bin/sdx.kit qwrap file.tcl /projects/sprs_lwv/bin/sdx.kit unwrap file.kit /projects/sprs_lwv/bin/sdx.kit wrap file.exe -runtime /mydir/bin/kbskit86.exe ====== Perhaps I am misunderstanding what sdx should do. I expected the result of the sdx wrap to be a stand alone executable. Instead, what I get is a part shell/part binary executable which still tries to make use of an external tclkit. That in my case is a problem, since I've not seen a tclkit released for my platform that understands Tcl 8.5 or 8.6. While I could certainly rename kbskit86.exe to tclkit, my application still won't be stand alone, since I will have to write some sort of shell wrapper around it to make certain the PATH is updated so the particular tclkit needed can be found. That seems less than obvious to me. Can someone provide a bit of clarification so I understand better what is going on? [RZ] 'file.exe' does not work. Use your 'dir.vfs' instead. Also the given binary in '-runtime' should not be the same used for running 'sdx.kit'. Thanks - I had written the above line based on one of the starpack pages I'd read. In my case, I create the file.vfs before running the wrap. I've modified the above information a bit to show what I am doing. I've seen some pages use ====== sdx wrap file.kit -runtime /path/to/tclkit ====== but I didn't want a starpack produced called file.kit. It would be nice if I didn't have to have the .vfs created to generate the starpack, but it sounds like it is required. Also, after modifying my process to use file.vfs, I ended up with a file called '''file.vfs.vfs''' which is an executable, but one that dies with the error: ====== $ ./eskil24.exe ld.so.1: eskil24.exe: fatal: libgcc_s.so.1: open failed: No such file or directory Killed ====== [RZ] sdx.kit tries to build the used directory with appending .vfs to the given file. So the following should work. At first, set up your project for tclkit (my.vfs/ dir with my.vfs/main.tcl and my.vfs/lib/* for used packages). Then get two tclkit's (one for sdx.kit and one for -runtime). You can also make a second copy if you have only one tclkit. Then run: tclkit1.exe sdx.kit wrap my -runtime tclkit2.exe [LV] are you missing the '''wrap''' argument there? [RZ] yes, sorry To use it with kbs, put your 'my.vfs/' under the kbs sources directory and create a package definition file like: source [file join sources kbskit0.3.1 kbskit.kbs] Package my0.1 { Require { Use kbskit8.5 sdx.kit tcllib1.11 tklib0.5 } Source { Link my.vfs } Configure {} Make { Kit my tcllib1.11/cmdline tklib0.5/autoscroll tklib0.5/tooltip} Install { Kit my -vq-gui } Clean { Kit my } } The given packages will be included in the final executable. You can see what happens with: ./kbs.tcl -v -pkgfile=your_package_file -r install my0.1 [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? Thanks! [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'. <> Application | Deployment | Tclkit