Re: New Tcl::Tk to follow?

[email protected] ("Michael Carman")
Newsgroups perl.tcltk
Message-ID <112520091515.20411.4B0D4A0D00008C8200004FBB223245003003010CD2079C080C03BF020E039D0E0C0603@mchsi.com>
jeff <[email protected]> wrote:
> could someone post a short blurb of what dlls (& dylibs for Aqua)
> would be required for packaging Tcl::Tk stand-alones with perlapp
> or PAR?

I've packaged Tkx apps using PAR. Tcl::Tk apps should work the same way. You need to explicitly bundle Tcl.dll and tkkit.dll when invoking pp. For example:

    -l C:/Perl/lib/auto/Tcl/Tcl.dll
    -l C:/Perl/lib/auto/Tcl/tkkit.dll

Unfortunately, it's not quite that simple due to the way PAR unpacks shared libraries. You need to modify your script to detect when it's running under PAR and tell the Tcl module where to find the libs:

    use File::Spec::Functions;
    
    BEGIN {
        if (exists $ENV{PAR_PROGNAME}) {
            use Config ();
            $ENV{PERL_TCL_DL_PATH} = catfile(
                $ENV{PAR_TEMP},
                'tkkit.' . $Config::Config{dlext}
            );
        }
    }

-mjc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.