Updated 2008-07-24 13:10:52 by FPX

I had some difficulty finding out where to put everything, so I thought it might be helpful to summarize. WJP

Your Program edit

If your main program is called "foo.tcl", sdx will create a directory called "foo.vfs". Within "foo.vfs", there will be two entries: a file called "main.tcl", and the subdirectory "lib". Everything that you will want to add goes within the "lib" subdirectory. Initially, "lib" will contain one subdirectory, named "app-foo". Among other things, your original program "foo.tcl" will be found here.

Packages edit

Each package that you include goes in its own directory within lib. If, for example, you want to include the tdom package, you should copy the entire tdom package directory into "lib". At this point, "lib" will contain the two subdirectories:
  app-foo   tdom

Message catalogs edit

Where to put message catalogs depends on where your program looks for them. The key is to observe that your main program is now located in "foo.vfs/lib/app-foo/foo.tcl". This is the location that [info script] will return. If your program follows the common convention of placing the message catalogs in a directory called "msgs" that is a sister of your main program, you could put your message catalogs in "foo.vfs/lib/app-foo/msgs".

Encodings edit

Starkits by default include only nine basic encodings. If you want to supply additional encodings, they should be placed in a subdirectory named "encoding" within any of the package directories that your program always loads. One such directory is the directory for the version of tcl that your program uses. Thus, a safe place to put your encoding files is "foo.vfs/lib/tcl8.4/encoding". Note that although "encodings" with an "s" might make more sense, the correct name for this directory is "encoding" with no plural "s".

Data Files edit

If you supply data files with the program, perhaps as examples, you can make life simpler by including them in the starkit and providing an appropriate setting for the -initialdir option of tk_getOpenFile. If you put your data files in "foo.vfs/DataFiles", they will be visible within your program at:
 [file join $::starkit::topdir DataFiles]

Binary Extensions edit

The motivation is to package a set of precompiled binaries with the starkit so that
package require Extension

works whether it is running on Linux, Windows, or other platform.

See for example Creation of multi-platform Starkitted binary packages.

For obvious reasons, the resulting starkit will only work on platforms that the author of the starkit included the precompiled extension for.