Wize /
Running
Search:  

1.  Running Wize

Wize offer a lot of flexibility for packaging and running application scripts, eg.

 wize                   ; # Run interactive shell (then type: console show)
 wize file.tcl          ; # Run a script
 wize file.gui          ; # Run gui script
 wize file.zip          ; # Mount zip file and run main.tcl/.gui
 wize file.zip:         ; # Mount zip file and browse for script.
 wize file.zip:x.tcl    ; # Mount zip file and run x.tcl
 wize file.so           ; # Load dll, then mount and run main.tcl
 wize file.so:          ; # Load dll, mount, and browse, 

Wize treats any .zip/.so file as a wizapp. ie. it looks for main.tcl in the top directory (or single subdirectory). Alternatively, a .tcl or .gui file of the same prefix as the .zip file will be used. If found, it is executed.

To browse instead, just append a colon.

1.1  Relayed Links to Wize

A wize executable can use a file link to run a .zip file indirectly. For example, suppose you've developed a Tcl application in the subdirectory foo (and it contains a foo/main.tcl). And assume that wize is located in ~/bin. You can create a new foo command using:

  zip -r ~/bin/foo.zip foo/
  ln -s ~/bin/wize ~/bin/foo

See Admin if you don't have zip on your system, or can't use ln (eg. on Windows).

1.2  Command-line Eval

Tcl can be evaluated from the command-line via:

  wize /zvfs/wiz/eval.tcl 'pack [button .b -text Hello-World]'

Wize can also for run applications via http, eg:

   wize http://pdqi.com/w/Download/hangman.zip

Note, this will download hangman.zip to the curent directory and then runs it.

© 2008 Peter MacDonald

Page last modified on September 27, 2010, at 03:31 PM