Hi,
Looking at the issues with windows resources I have found that the
changes to the windows resource build in version 1.013 only work in
fairly recent versions of Strawberry Perl.
Other binutils installations may suffer from a couple of bugs/problems:
1) Older versions of windres (as included with early Strawberry releases
or any non-recent mingw) do not check for resource includes ( manifest
and icon files) in the same directory as the resource ( .rc ) file so
cannot find the pp manifest and icon files.
2) Some versions of binutils (including some of the latest releases)
have a bug that prevents using the two-step resource creation method. (
rc to res file; res file to object )
The attached patch fixes both issues and is tested against recent and
old versions of Strawberry Perl, and a custom Perl using mingw + gcc
4.6.2 + binutils 2.22.51.20111108
It doesn't fix any of the recently discussed Windows resource issues -
it just fixes a basic build failure for several mingw versions so I
thought it worth posting A.S.A.P.
Regards
Mark
Index: myldr/Makefile.PL
===================================================================
--- myldr/Makefile.PL (revision 1354)
+++ myldr/Makefile.PL (working copy)
@@ -115,8 +115,13 @@
if( $^O =~ /^(?:MSWin|cygwin)/ ){
$res = 'ppresource.coff';
$pre_res = qq(winres\\pp.res);
- $rt_cmd = qq(windres -F pei-i386 -i winres\\pp.rc -o $pre_res);
- $res_cmd = qq(windres -o ppresource.coff $pre_res);
+
+ # some versions of binutils cannot handle two-step creation
+ #$rt_cmd = qq(windres -F pei-i386 -i winres\\pp.rc -o $pre_res);
+ #$res_cmd = qq(windres -o ppresource.coff $pre_res);
+ $rt_cmd = qq(windres -o ppresource.coff -i winres\\pp.rc);
+ $res_cmd = q(-$(NOOP));
+
$res_section = $res;
}
$mt_cmd = '-$(NOOP)';
Index: myldr/winres/pp.rc
===================================================================
--- myldr/winres/pp.rc (revision 1354)
+++ myldr/winres/pp.rc (working copy)
@@ -5,7 +5,7 @@
#define PP_MANIFEST_FILEFLAGS 0
#include <windows.h>
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "pp.manifest"
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "winres\\pp.manifest"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,0
@@ -37,5 +37,5 @@
END
END
-WINEXE ICON pp.ico
+WINEXE ICON winres\\pp.ico