On 17 Mar 2004 at 15:00, Autrijus Tang wrote:
> > Can we advertise this change and the PP_TK_ICONFIX switch on the
> > mailing list for the debuggers to see what the odds are on working?
>
> Sure! Please post it on the list. :)
>
> Thanks,
> /Autrijus/
>
OK.
Prior to PAR 0.80, there was a change to pp that enabled the "-i" option to change the
icons in the Tk.dll, as well as the .exe itself for Win32 Tk apps. That changes the
icon in the upperleft corner of the Tk window. It worked for me, but not for Autrijus.
If anyone out there is packing Tk apps, please try it out and let us know how it goes.
Please make the following patch at line 168 of pp, to accommodate Win32::Exe v0.07:
replace:
elsif (
basename($map{$pfile}) =~ /^Tk\.dll$/i and opt(i)
and eval { require Win32::Exe; 1 }
and $ENV{PP_TK_ICONFIX}
) {
# XXX - broken on my WinXP but worked for Alan. hmm.
my $tkdll = Win32::Exe->new($map{$pfile});
my $ico = Win32::Exe::IconFile->new(opt(i));
$tkdll->set_icons(scalar $ico->icons);
$zip->addString($tkdll->dump => $root."lib/$pfile");
}
with:
elsif (
basename($map{$pfile}) =~ /^Tk\.dll$/i and opt(i)
and eval { require Win32::Exe; require Win32::Exe::Iconfile; 1 }
and $ENV{PP_TK_ICONFIX}
) {
# XXX - broken on my WinXP but worked for Alan. hmm.
my $tkdll = Win32::Exe->new($map{$pfile});
my @icons = Win32::Exe::IconFile->new(opt(i))->icons;
$tkdll->set_icons([EMAIL PROTECTED]) if @icons;
$zip->addString($tkdll->dump => $root."lib/$pfile");
$size += length $tkdll->dump;
}
As you can see, this feature is off by default. Set PP_TK_ICONFIX=1 before running pp
to enable it.
If you look in Tk.dll, you will see that there are three icons (low_res_color,
high_res_color, black_and_white) compared to the usual two color icons in simple .exe
files. If you never run the Tk app on a b/w screen, replacing them with only two icons
should look OK.
Alan Stewart