<h3>What is a toadkit?</h3>
A toadkit is a self-contained executable with a complete software application. Toadkits are an update of the Tcl as One Big Executable (TOBE) concept. (See Tcl/Tk is statically compiled along with enough tools to mount the executable as a virtual file system. This virtual file system contains Tcl/Tk code, application resources. Binary packages can be either statically linked to the executable, or distributed as shared libraries in the VFS.
<p>
All of this code is packaged in a single file that the user can double-click on, or drag and drop files on top of.
<p>
<h3>Building a toadkit.</h3>
These instructions used to be a bit more involved. But the process has been integrated into the automations of ODIE.
<p>
<verbatim>
mkdir odie
mkdir odie/download
mkdir odie/build
mkdir odie/tclconfig
fossil clone
fossil clone
cd odie/tclconfig
fossil open practcl
cd ../build
fossil open
tclsh make.tcl toadkit
</verbatim>
<p>
This build process assumes the following: you have access to fossil and git in your local environment, as well as
<p>
In the process of building the basekit, odie will download the Tcl/Tk core, and sources for the included packages. Source code is downloaded to the <b>sandbox</b> which is the same directory that <i>odie</i> was unpacked to. In the <b>build</b> folder will by a series of <b>pkg.*</b> folders, on per binary package. That is where Odie compiles the binary packages. In addition is PKGROOT, which is a virtual file system where binary packages are "installed" so they can be copied into a waiting VFS.
<p>
For details on what is inside, see: [Anatomy of a Toadkit project]
<p>
To wrap your own program using the basekit, create a VFS directory. (Say myproduct.vfs)
<p>
<verbatim>
cp -a myproject.vfs
tclsh wrap clevername myproject.vfs
</verbatim>
This will produce an execuable named <b>clevername</b>. If myproject.vfs includes a file called "main.tcl" in the root, the executable will load that file instead of reverting to the standard tcl interactive shell behavior. <b>main.tcl</b> will be able to respond to the command line. As part of the kitbuilding process, the entire VFS is scanned, and a file <b>packages.tcl</b> is produced, and placed in the root of the VFS. This is the master manifest of all packages that are included in the VFS. This file will be read automatically when the process starts.
<p>
If a file named "main.tcl" is present in the root of the VFS, the process will source this file after loading the package manifest. TOBE behaves like any other tcl process, it can respond to arguments on the command line (look in the argv variable.)
<p>
If no main.tcl is present, toadkits behave as a standard Tcl shell. Tk is statically linked, but not loaded automatically. It can be accessed with a simple "package require Tk".