Knowing the Starpack technology
As mentioned in the previous section, the starkit file has a small header containing the initialization script that executes the externally available tclkit
. What would happen if we replaced this header with a binary code of Tclkit? In such cases, we would get a Starpack, a self-contained starkit, and a Tcl interpreter—all in one single file. This is the solution we are searching for in this chapter—a standalone executable file without any dependencies that does not require installation or configuration!
A Starpack file can be created in the standard way using the wrap
command, but with the additional flag -runtime
, which specifies what Tclkit binary should be put together with the starkit that is being produced. A typical usage is:
c:\workspace\TclHelloWorld>tclkitsh-win32.upx.exe sdx.kit wrap hello.exe runtime tclkitsh-win32.upx.copy.exe 5 updates applied
Note that the Tclkit specified with -runtime
must be different from the one actually executing this...