contents
| 4.7 - Constructing a Starpack Constructing a Starpack is quite simple, and only marginally different from build a Starkit. If we go back to our hello.tcl example, to create the Starkit we used the following commands $ sdx wrap hello.kit If we want to create Starpack for Windows, we need to tell SDX which Tclkit version to use for its run-time interpreter. In this case, we’ll use tclkit-win32.upx.exe - which is the UPX compressed version of Tclkit for Windows. $ sdx wrap hello.exe \ There is one restriction though - you can’t specify the same Tclkit file as the one which is used to run sdx (since it is already opened by the operating system when it runs sdx). Just create a copy and refer to that. We end up with a self-contained Windows executable hello.exe. The size of this file is less than a megabyte - which is quite reasonable when you consider it includes a complete Tcl/Tk runtime environment. As you can see in the above example, Starpacks for any platform can be built on any platform. It is possible to build a Windows Starpack on Linux (as above), or a MacOSX Starpack on Windows, etc. A convenient technique is to use a Starkit during development of an application - e.g. for distributing interim releases amongst development or testing staff, and then wrapping the application as a Starpack for deployment beyond the development organisation. This has the advantage of using smaller, cross-platform Starkits until the application is released, and then a “sealed” Starpack subsequently. Starpacks have been used to deploy a number of open source and commercial applications, including:
But the best example of a Starpack is Tclkit itself - which is simply a Starpack without application code. | see also | ||||