I am also using Tkx on perl 5.10 & Tcl 8.5.5.0 on Windows XP...I'm also interested (and a bit frustrated) in trying to use the img::jpeg package.
When I execute the following line from the script below: vfs::mk4::Mount $tkkit tkkit; I get an error stating that the c:/tcl/lib/teapot/package/win32-ix86/lib/vfs1.3/mk4vfs.tcl file does not exist ... which is correct. Is it possible to just edit an instance of "pkgIndex.tcl" ? If so, which one? Any help is appreciated. Thanks, Mike -----Original Message----- From: Jeff Hobbs [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2008 11:48 PM To: Sylvain Thibault Cc: tcltk@perl.org Subject: Re: using packages with Tkx The lines below needed one more package id that I forgot. Add the following line in the list of packages: package ifneeded img::base 1.3 [list load $dir/tkimg13.dll] Jeff Jeff Hobbs wrote: > OK, you are right and the issue is that things became a bit more > complex > with the ActiveTcl 8.5 release. We moved to a teapot-based install that > obfuscates the exact location. You can see the full set of locations > with "puts [join $::auto_path \n]" in a tclsh85 shell. > > In any case, as I look at the latest tkkits, I see that for some silly > reason it has all the necessary binaries embedded, it just simply lacks > the registering of those packages via pkgIndex.tcl. Here is a simple > script that will add img::jpeg (and other formats) to the tkkit. Run > with tclsh85. There should be no line breaks in the code. The same > could run on any platform, but you'd have to point to the right tkkit > and use the .so instead of .dll library names. > > Jeff > > ################################## > package require vfs > set tkkit "C:/Perl10/lib/auto/Tcl/tkkit.dll" ; # set to correct path > file attributes $tkkit -readonly 0 ; # needs to be writable > vfs::mk4::Mount $tkkit tkkit ; # mounts file as dir 'tkkit' set pkg > tkkit/lib/Img1.3/pkgIndex.tcl set fid [open $pkg w] > puts $fid {# Img package bits > package ifneeded pngtcl 1.2.24 [list load $dir/pngtcl1224.dll] > package ifneeded zlibtcl 1.2.3 [list load $dir/zlibtcl123.dll] > package ifneeded tifftcl 3.8.2 [list load $dir/tifftcl382.dll] > package ifneeded jpegtcl 1.0 [list load $dir/jpegtcl10.dll] > package ifneeded img::bmp 1.3 [list load $dir/tkimgbmp13.dll] > package ifneeded img::gif 1.3 [list load $dir/tkimggif13.dll] > package ifneeded img::ico 1.3 [list load $dir/tkimgico13.dll] > package ifneeded img::jpeg 1.3 [list load $dir/tkimgjpeg13.dll] > package ifneeded img::pcx 1.3 [list load $dir/tkimgpcx13.dll] > package ifneeded img::pixmap 1.3 [list load $dir/tkimgpixmap13.dll] > package ifneeded img::png 1.3 [list load $dir/tkimgpng13.dll] > package ifneeded img::ppm 1.3 [list load $dir/tkimgppm13.dll] > package ifneeded img::ps 1.3 [list load $dir/tkimgps13.dll] > package ifneeded img::sgi 1.3 [list load $dir/tkimgsgi13.dll] > package ifneeded img::sun 1.3 [list load $dir/tkimgsun13.dll] > package ifneeded img::tga 1.3 [list load $dir/tkimgtga13.dll] > package ifneeded img::tiff 1.3 [list load $dir/tkimgtiff13.dll] > package ifneeded img::window 1.3 [list load $dir/tkimgwindow13.dll] > package ifneeded img::xbm 1.3 [list load $dir/tkimgxbm13.dll] > package ifneeded img::xpm 1.3 [list load $dir/tkimgxpm13.dll] package ifneeded img::base 1.3 [list load $dir/tkimg13.dll] > } > close $fid > vfs::unmount tkkit > exit > ###################################