Version 30 of How to create my first Starpack

Updated 2004-10-18 21:40:35

Purpose: define the steps for one to take to create their first starpack.

  1. Read Steve Landers' paper - PDF: [L1 ], HTML: [L2 ].
  2. Download a tclkit for your platform.
  3. Download sdx
  4. Assemble a starkit [L3 ] based on the examples in the paper
  5. Use sdx to make a starpack from this starkit.

You can even use your own application for the initial time through; "starkitting" is straightforward enough that people have been successful doing it for the first time even with applications which involve several auxiliary files, extensions (but only stubsified ones?), and so on.


I'll break this down a slightly different way:

  1. Install tclkit and sdx so they're available in your PATH.
       On Unix, these may be installed as ''tclkit'' and ''sdx'', while 
       on Windows, these are more likely installed as ''tclkit.exe'' and
       ''sdx.kit''.  On Unix, remember to change the permission modes of
       tclkit to be executable.
  1. Put sdx.kit in your working directory.
  2. Create example.tcl:
            package require Tk
            pack [button .b -text "That's all for now" -command exit]
  1. Wrap:
Unix
tclkit sdx.kit qwrap example.tcl
                or
                 tclkit     sdx     qwrap example.tcl
        Windows: tclkit.exe sdx.kit qwrap example.tcl
        Now you have an example.kit Starkit (and, if you did this
        on a Windows host, an example.bat).  That's the Starkit.
  1. Create a standard unwrapping:
Unix
tclkit sdx.kit unwrap example.kit
        Windows: tclkit.exe sdx.kit unwrap example.kit
  1. Make a seperate copy of the tclkit executable for your target platform.
        You might want to call it something different, like ''tclkitcopy''
        to keep things straight.
        Keep in mind that Starpacks look "native"; they are platform-
        specific.  If you're working on Windows, and you're making a
        Starpack for Windows, just copy tclkit.exe into your local,
        working directory, at least for this demonstration.
  1. Produce the starpack:
Unix
tclkit sdx.kit wrap example -runtime tclkitcopy
          Windows: tclkit.exe sdx.kit wrap example.exe -runtime tclkitcopy.exe

Of course, on Unix-like systems, you will eventually learn that if you have your environment set properly, and sdx.kit permission modes set to execute, then you will be able to skip that initial word of the command and abbreviate things to:

Unix
sdx.kit wrap example -runtime tclkitcopy

or even

Unix
sdx wrap example -runtime tclkitcopy

How should your application look so that it makes a good starpack? "Starting effective starkit-based pure-Tcl development: the starkit::* namespace" addresses that question.


Category Tclkit