Open Design and Integration Environment

Artifact [38e9f9d855]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com or submit via the online form
by Aug 20.

Artifact 38e9f9d855ef526fd858b9e4ec67b7c8d6754f71:

Wiki page [toadkits] by hypnotoad 2017-08-30 21:43:49.
D 2017-08-30T21:43:49.640
L toadkits
P f2c2d9deb7e1018ce138559a78fd614abbc4d3bd
U hypnotoad
W 3103
<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 http://www.hwaci.com/sw/tobe/). 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 http://fossil.etoyoc.com/fossil/tclconfig tclconfig/download/tclconfig.fos
fossil clone http://fossil.etoyoc.com/fossil/odie odie/download/odie.fos
cd odie/tclconfig
fossil open ../download/tclconfig.fos practcl
cd ../build
fossil open ../download/odie.fos
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/src myproject.vfs
tclsh ../odie/make.tcl 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".
Z 9976392d6ecb1e715a8a83d817f88da4