Genkit - Step 3

3.1. WRAP IT UP

At this point, all the platform-specific ingredients are ready. The following is highly recommended (but not mandatory)...

Wrap all the build output logs and all the essential binaries into a tar file:

        sh genkit C

You will end up with a file called result-$HOSTNAME.tar.gz of probably under 2 Mb.

There is a growing collection of ready-made tclkit builds on the https://www.equi4.com/ website. If you are willing to contribute your build, please send this tar file to me, at <[email protected]>.


3.2. A QUICK TEST

The resulting binary is incomplete, in that the runtime files of tcl, tk, etc. have not yet been added to the constructed executable.

Let's fix that, and let's run a quick sanity check:

    $ sh genkit D
      fetching tars/runtime.kit ... ok
      info loaded = {{} zlib} {{} vfs} {{} rechan} {{} pwb} {{} Mk4tcl}
      tclkit_version = 200211.224
    tcl_platform(byteOrder) = littleEndian
    tcl_platform(machine)   = i686
    tcl_platform(os)        = Linux
    tcl_platform(osVersion) = 2.4.20
    tcl_platform(platform)  = unix
    tcl_platform(user)      = jcw
    tcl_platform(wordSize)  = 4
      package Itcl = 3.3
      *** DISPLAY has not been defined, skipping Tk test ***
      running dummy-teevie.equi4.local
    $

Both Metakit-based VFS and dynamic loading have been exercised once you see the above output.

Note that one more file ("runtime.kit") is fetched from the internet if it is not found in tars/. This is a pre-packaged VFS starkit containing all the platform-independent runtime files used in tclkit, i.e. lib/tcl8.4/init.tcl, etc.

To try out Tk, specify a suitable value for the DISPLAY environment variable:

    DISPLAY=localhost:0 sh genkit D

On the other hand, if you get Tk errors, you can skip the test and unset instead:

    unset DISPLAY; sh genkit D

3.3. AT LAST

At this point you have an incomplete tclkit called dummy-$HOSTNAME, which is missing the Incrtcl and Tk extensions.

Let's build the real thing now, by merging those two modules into the VFS runtime:

    $ sh genkit E
      tclkit-teevie.equi4.local: 1124193 -> 1544745
    $

The output reports the name of the tclkit executable. The last number is its final size.

THAT'S IT!