Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Freewrap, Iwidgets, and itcl

Status
Not open for further replies.

rubberscissors

Technical User
Oct 11, 2001
21
US
I've come up with a little Tcl script, and it runs fine if you have Tcl 8.3.4.2 installed on your machine...however, I'd like to use Freewrap to distribute it. When the wrapped program is used on a station which doesn't have Tcl installed, however, people get the error:

Error: can't find package Iwidgets 4.0

I used a .txt file which includes the path to all the files in the Iwidgets package, and included the following line in the script:

lappend auto_path /tcl/lib/iwidgets4.0.0
package require Iwidgets 4.0

Then used the command freewrap <script>.tcl -f <txtfile>.txt

The file gets much larger, so it seems the package was wrapped, but I still get the same error.

So, I upgraded Freewrap to 5.1; now, when I try and wrap the script and the package, it works, but I get this error in the WISH console when I launch the executable:

Error sourcing /TCL/lib/mine/pop.tcl: Can't find a usable itcl.tcl in the following directories:
/itcl3.2 C:/Tcl/lib/mine/../lib/itcl3.2 C:/Tcl/lib/mine/../library C:/Tcl/lib/mine/../../library C:/Tcl/lib/mine/../../itcl/library C:/Tcl/lib/mine/../../../itcl/library
This probably means that Itcl/Tcl weren't installed properly.
If you know where the Itcl library directory was installed,
you can set the environment variable ITCL_LIBRARY to point
to the library directory.

I tried including the itcl files in the text file along with their paths, but no matter what I do, I keep getting this error.

Anyone have any experiences like this?
 
Not exactly this but I used freewrap with Tktable. What I did was based on not much analysis but it seemed to work: put the linked files (packages, dlls, whatever) in the same directory as your script. Change all your references to reflect that (i.e., take out the path references). Then wrap. What I think is happening is that the wrapped program doesn't know from the source file system. It doesn't put the pieces of itself in the target file system. So I try to avoid file system references. Anyway, it seemed to work with my wrapped tktable example.
Good luck. Bob Rashkin
rrashkin@csc.com
 
Thanks for the advice...I tried that; it wrapped, but then when I launched the executable, I got this error in the console:

Error sourcing /TCL/lib/x01/x.tcl: can't find package Iwidgets 4.0

This seems to be because of the line in the script:

package require Iwidgets 4.0

However, if I remove that line, even with the files local, I still get an error stating I've used an 'invalid command' when I try to use one of the widgets (combobox, for instance - I have a line which says iwidgets::combobox with parameters...if I remove the iwidgets reference there, it still complains that 'combobox' is an invalid command)
 
Looking at the FREEWRAP doc's, I think you need to use the -p option rather than the -f option. That tells FREEWRAP that you have a package to wrap. Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top