Sylvain Thibault wrote:
Sylvain Thibault wrote:
Sylvain Thibault wrote:
I am using Tkx with ActivePerl 5.10 and tkkit.dll on Windows XP.  I
want to use the package img::jpeg but tkkit only has PNG, ICO and XPM
support.  How do I add the Img package (or any package) so that it is
accessible to Tkx.  The Img package is in Tk85.dll.  I have tried
Tkx::lappend('::auto_path', 'C:/Tcl/bin')  C:/Tcl/bin/tk85.dll and
quite a few other combination with no success.
...
You want to lappend to ::auto_path as shown above, but 'C:/Tcl/lib' is the place to add. There is a way to extend the tkkit with additional modules as well if you are familiar with Tcl's core virtual file system APIs (needs to be done from a Tcl interpreter). I should add this info to the tkkit docs.
        ...
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.
        ... [script removed] ...

Ok, now running the above script,
I get: 'can't find package vfs'

in Tclsh85:
% package require Tcl
8.5.4
%package require vfs
can't find package vfs

Same when I run it directly as a Tcl script

I tried 'package require vfs' in the working demo widget.tcl and it fails also.

No vfs package? Looking at my dist, that _should_ be one of the standard shipped libraries.

I also tried adding the teapot lib directory returned by "puts [join $::auto_path \n]" with Tkx::lappend('::auto_path', ...) with no success... I guess it is more obfuscated than that :-)

Can you send what that list looks like?  I would expect something like:

C:/Tcl/lib/tcl8.5
C:/Tcl/lib
c:/tcl/lib/teapot/package/win32-ix86/lib
c:/tcl/lib/teapot/package/tcl/lib

As to resolving the vfs issue, it should be possible to do:

        > teacup install vfs

at the DOS prompt to get the package you need.

Sorry about the round-about confusion ... wondering why you have no VFS in the current version. Actually, before doing the teacup install, can you verify that there is no "vfs1.3" directory at:

        C:\Tcl\lib\teapot\package\win32-ix86\lib

Thanks,

Jeff

Reply via email to