- Create a child interpreter
- Load Itcl 3.2, Itk 3.2 and Iwidgets 4.0.2 (those seem to match) into the child interpreter
# Trick to force tclkit to use Itcl 3.2 instead of 3.3 # package provide app-interface 1.0 set scriptname [info script] set libname [file dirname [info script]] set applib [file dirname [file dirname [info script]]] set startup [string map [list SCRIPT $scriptname APP $applib LIBX $libname] { package require Tk lappend auto_path APP set env(ITCL_LIBRARY) LIBX set env(ITK_LIBRARY) LIBX package require -exact Itcl 3.2 package require -exact Itk 3.2 package require -exact Iwidgets 4.0.2 source [file join [file dirname SCRIPT] "Archetype.itk"] source [file join [file dirname SCRIPT] "Widget.itk"] source [file join [file dirname SCRIPT] "interface.tcl"] }] interp create INTERFACE interp eval INTERFACE $startupNotes:
- I needed to adjust the pkgIndex.tcl file for the application to load via the new file instead of "interface.tcl"
- I need to require the exact package versions, because otherwise Itcl 3.3 is picked up again.
dqkit includes IWidgetsEric Amundsen 03/16/05 as does Kitten, which can be a lot to haul around. However, I have had good luck unwrapping the Kitten and just taking the pieces I need and wrapping it all back up again.
Cyan Ogilvie After some playing around I got Itk 3.3 working in tclkit by copying in the lib dir and adding "set ::env(ITK_LIBRARY) $dir" at the top of the pkgIndex.tcl. This seems to be what kitten does to get it to work.