Wize /
Wize
Search:  


WIZE

A wize binary is a self contained, standalone Tcl/Tk application. WIZE, or Wish Inside Zip Executable is a binary that internally appends a zip archive containing all required runtime support files for a Tcl/Tk application. At runtime, the zip archive portion self-mounts on the Tcl VFS mount-point /zvfs.

Contents

The wize build provided on PDQI is the same as the Weld build except it uses a standard copy of Tcl/Tk: version 8.5a5. In addition, the following packages are included:

  • img 1.2.4 - image extension
  • libz 1.1.3 - compression library
  • memchan 2.2a4 - memory channels
  • openssl 0.9.8a - ssl library
  • sqlite 2.8.6 - sql database
  • tbcload 1.3 - load compiled bytecode
  • tcltk 8.5a5 - tcl
  • tclvfs 1.3 - virtual file system
  • tkhtml 3-a14 - html widget for tcl
  • tktable 2.9 - table widget
  • tls 1.41 - ssl/tcl extension
  • vu 2.1.0 - pie charts, etc.
  • wize 2.0 - the wize extension, formerly tobe.

The licenses for all of the above are BSD compatible or public domain. They can be viewed individually here.

Running

Wize executables offer fantastic flexibility for packaging and running application scripts. For example, all of the following are valid uses of wize:

 wize                      ; # Run interactive shell
 wize file.tcl            ; # Run a script
 wize file.zip           ; # Mount zip file and run file.tcl or main.tcl
 wize file.zip:x.tcl    ; # Mount zip file and run x.tcl from archive

A wize executable can also use file links to appear to be different programs. For example, the weld executable contains a copy of ted internally that can be run by creating a link to weld. eg.

 ln -s weld wted            ;# Calling wted runs the editor via weld.
 ln -s weld wtdb            ;# Calling wtdb runs the debugger via weld.
 ln -s ted.zip wted.zip   ;# Calling wted now runs editor from ted.zip via weld.

This last one requires a little explanation. Calling wtdb will invoke weld, which upon seeing it has been called via a link, checks for a .zip file having the same prefix-name in the wize directory. If found, it mounts the zip file and tries to run the script wted.tcl or main.tcl. The zip file ted.zip contains multiple entry point scripts eg. ted.tcl, tdb.tcl, wted.tcl and wtdb.tcl.

Using links provides wize with an easy way to run applications from .zip files indirectly. For weld, allows ted to be builtin and allow it's update, without requiring a download of a new wize binary.

Versions

Multiple versions of an application may be easily installed and run in the same directory. The version suffix is perserved during installation, but when run wize will trim off any suffix characters in 0-9. before sourcing local scripts. Thus:

 wize --wize-update ted1.1.zip
 ted1.1 file.tcl

© 2008 Peter MacDonald

Page last modified on November 26, 2007, at 08:26 PM