On 22/02/2012 21:35, Roderich Schupp via RT wrote:
Wed Feb 22 16:35:26 2012: Request 75193 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: [PATCH] Fix build on Win32/VC++
Broken in: 1.012
Severity: Important
Owner: RSCHUPP
Requestors: [email protected]
Status: open
Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=75193>
On 2012-02-22 09:04:04, [email protected] wrote:
Works fine for
me, except that 20-pp.t still fails test 32 as before. Is that
supposed to be fixed now? Do I need a newer Win32-Exe than I've got?
I'm using 0.17.
That's the most recent version.
Test 32 checks "pp --gui", right?
(The error is different now: it now complains about
not being a valid Win32 executable, rather than complaining that its
side-by-side configuration is incorret.)
Yeah, I see that sometimes, too. And always with "pp --info ...".
Somehow Win32::Exe seems to corrupt the executable - it's workings
are black magic to me.
I read the pp code as concatenating chunks of the final exec onto itself
whenever the --gui option is called. This results in a huge corrupt
executable. I never quite figured out why mingw compiled base
executables would still run in this state but MSVC ones would not.
I sort of got side tracked from working out a fix as I could not
implement a whole solution. Win32::Exe cannot get at the code for the
Perl executable that will be extracted at run time so just setting the
icon, privileges etc. of the main executable seemed unsatisfactory.
The full solution I thought of was that on Windows, the Perl exe, Perl
dll plus libgcc etc where appropriate sould be added to the executable
as resources. It is then possible to update some or all of these
resources as required.
I guess just fixing the bug in the basic pp building code is needed though.
There doesn't seem to exist a standard command
on Windows to change icon or properties of an executable,
the only MS sanctioned way seems to set them from a resource file
when linking the executable.
BeginUpdateResource() if you have Win XP or above.
usage demonstrated in Win32::Exe & Win32::Resources
Cheers, Roderich
Regards
Mark