Skip Menu |

This queue is for tickets about the Alien-wxWidgets CPAN distribution.

Report information
The Basics
Id: 47605
Status: resolved
Priority: 0/
Queue: Alien-wxWidgets

People
Owner: Nobody in particular
Requestors: csjewell [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.43
Fixed in: (no value)



Subject: [patch attached] Making version resource in .dll files more complete under Windows.
The compiled files for wxWidgets do not include a Translation record in their version resource. The reason this is a problem: 1) I'm currently updating Perl::Dist::Padre (which creates a Windows distribution of Perl that includes the Padre editor - which includes Alien::wxWidgets) 2) That module uses the Windows Installer XML (WiX) toolkit to create the distribution as an .msi file. 3) If a .dll or .exe file includes a version resource, a) the XML files that are compiled by WiX have to give a defualt language and b) the version resource has to give a language - and I think a Translation record is the way to give that language code. If this is not done, it gives a scary warning. I'm including a patch from 0.43 to a proposed 0.44. I'll verify that this solves my problem, and get back to you.
Subject: version-rc.patch
diff -u -r -N Alien-wxWidgets-0.43\Changes Alien-wxWidgets-0.44\Changes --- Alien-wxWidgets-0.43\Changes Sun May 10 01:48:22 2009 +++ Alien-wxWidgets-0.44\Changes Sun Jul 05 21:50:53 2009 @@ -1,5 +1,8 @@ Revision history for Perl extension Alien::wxWidgets. +0.44 To be released + - Add a language code to the version resource on Windows (patch by Curtis Jewell). + 0.43 Sun May 10 09:46:05 CEST 2009 - Fix building under recent FreeBSD versions (patch by Cezary Morga). - Correctly handle monolithic build on wxWidgets' 2.9.x. diff -u -r -N Alien-wxWidgets-0.43\lib\Alien\wxWidgets.pm Alien-wxWidgets-0.44\lib\Alien\wxWidgets.pm --- Alien-wxWidgets-0.43\lib\Alien\wxWidgets.pm Sun May 10 01:48:22 2009 +++ Alien-wxWidgets-0.44\lib\Alien\wxWidgets.pm Sun Jul 05 21:52:41 2009 @@ -43,7 +43,7 @@ instantiate => 'config'; our $AUTOLOAD; -our $VERSION = '0.43'; +our $VERSION = '0.44'; our %VALUES; our $dont_remap; diff -u -r -N Alien-wxWidgets-0.43\patches\data Alien-wxWidgets-0.44\patches\data --- Alien-wxWidgets-0.43\patches\data Sun May 10 01:48:23 2009 +++ Alien-wxWidgets-0.44\patches\data Sun Jul 05 21:51:28 2009 @@ -9,11 +9,13 @@ wxMSW-2.8.0-setup_u.patch wxMSW-2.8.10-config.patch wxMSW-2.8.0-makefiles.patch +wxMSW-2.8.10-version.patch ), @common ], ansi => [ qw( wxMSW-2.8.0-setup.patch wxMSW-2.8.10-config.patch wxMSW-2.8.0-makefiles.patch +wxMSW-2.8.10-version.patch ), @common ], }, mac => { unicode => [ qw( diff -u -r -N Alien-wxWidgets-0.43\patches\wxMSW-2.8.10-version.patch Alien-wxWidgets-0.44\patches\wxMSW-2.8.10-version.patch --- Alien-wxWidgets-0.43\patches\wxMSW-2.8.10-version.patch Wed Dec 31 17:00:00 1969 +++ Alien-wxWidgets-0.44\patches\wxMSW-2.8.10-version.patch Sun Jul 05 21:44:13 2009 @@ -0,0 +1,26 @@ +diff -u src/msw/version.rc src/msw/version.rc +--- src/msw/version.rc Fri Mar 06 12:10:00 2009 ++++ src/msw/version.rc Sun Jul 05 21:41:48 2009 +@@ -27,8 +27,12 @@ + + #ifdef _UNICODE + #define LANG "04090000" ++ #define LANG2 0x0409 ++ #define LANG3 0 + #else + #define LANG "040904b0" ++ #define LANG2 0x0409 ++ #define LANG3 1200 + #endif + + 1 VERSIONINFO +@@ -58,5 +62,9 @@ + VALUE "ProductVersion", wxVERSION_NUM_DOT_STRING "\0" + VALUE "SpecialBuild", "\0" + END ++ END ++ BLOCK "VarFileInfo" ++ BEGIN ++ VALUE "Translation", LANG2, LANG3 + END + END
The patch does solve the problem. You may want to send it upstream (to the wxWidgets maintainers), as well.
On Mon Jul 06 13:07:57 2009, CSJEWELL wrote: Show quoted text
> The patch does solve the problem. > > You may want to send it upstream (to the wxWidgets maintainers), as well.
Sorry, but you should submit it upstream, because I haven't the faintest idea if the patch is correct or not (I do not doubt it fixes the warning, but it might a WiX problem if the warning is there in the first place...). Regards, Mattia
On Mon Jul 06 16:21:22 2009, MBARBON wrote: Show quoted text
> On Mon Jul 06 13:07:57 2009, CSJEWELL wrote:
> > The patch does solve the problem. > > > > You may want to send it upstream (to the wxWidgets maintainers), as
well. Show quoted text
> > Sorry, but you should submit it upstream, because I haven't > the faintest idea if the patch is correct or not (I do not doubt > it fixes the warning, but it might a WiX problem if the warning > is there in the first place...). > > Regards, > Mattia
The WiX warning is because of a Windows Installer restriction, as far as I can understand - that the language code is checked in upgrades of files with version resources. I should have made that clear. I can't fight Microsoft very well to make them change that behavior at this point. :) I'll submit the patch file upstream tonight (they should be able to verify correctness) and keep you posted. --Curtis
Upstream bug report (technically, enhancement request) is http://trac.wxwidgets.org/ticket/10970 - they changed the patch, but did accept the intent of it for trunk (their svn revision numbers 61510 and 61511), so you may want to create a new patch from the trunk version and use it - or I can do it and get back to you if you wish.
On Thu Jul 23 20:02:04 2009, CSJEWELL wrote: Show quoted text
> Upstream bug report (technically, enhancement request) is > http://trac.wxwidgets.org/ticket/10970 - they changed the patch, but did > accept the intent of it for trunk (their svn revision numbers 61510 and > 61511), so you may want to create a new patch from the trunk version and > use it - or I can do it and get back to you if you wish.
Had a moment, so I updated the patch to Alien::wxWidgets 0.46. It patches to the svn HEAD version of the version.rc file. (pulled it down from http://svn.wxwidgets.org/viewvc/) It's ready to accept for 0.47 if you want it!
diff -u3 -r -N Alien-wxWidgets-0.46/lib/Alien/wxWidgets.pm Alien-wxWidgets-0.4601/lib/Alien/wxWidgets.pm --- Alien-wxWidgets-0.46/lib/Alien/wxWidgets.pm 2009-11-08 08:25:28.000000000 -0700 +++ Alien-wxWidgets-0.46/lib/Alien/wxWidgets.pm 2009-11-09 11:32:13.246505600 -0700 @@ -43,7 +43,7 @@ instantiate => 'config'; our $AUTOLOAD; -our $VERSION = '0.46'; +our $VERSION = '0.4601'; our %VALUES; our $dont_remap; diff -u3 -r -N Alien-wxWidgets-0.46/patches/data-2.8.10 Alien-wxWidgets-0.4601/patches/data-2.8.10 --- Alien-wxWidgets-0.46/patches/data-2.8.10 2009-11-08 08:25:28.000000000 -0700 +++ Alien-wxWidgets-0.46/patches/data-2.8.10 2009-11-09 11:30:07.976376000 -0700 @@ -9,11 +9,13 @@ wxMSW-2.8.0-setup_u.patch wxMSW-2.8.10-config.patch wxMSW-2.8.0-makefiles.patch +wxMSW-2.8.10-version.patch ), @common ], ansi => [ qw( wxMSW-2.8.0-setup.patch wxMSW-2.8.10-config.patch wxMSW-2.8.0-makefiles.patch +wxMSW-2.8.10-version.patch ), @common ], }, mac => { unicode => [ qw( diff -u3 -r -N Alien-wxWidgets-0.46/patches/data-2.9.0 Alien-wxWidgets-0.4601/patches/data-2.9.0 --- Alien-wxWidgets-0.46/patches/data-2.9.0 2009-11-08 08:25:28.000000000 -0700 +++ Alien-wxWidgets-0.46/patches/data-2.9.0 2009-11-09 11:20:19.529683200 -0700 @@ -10,6 +10,7 @@ wxMSW-2.9.0-setup.patch wxMSW-2.9.0-config.patch wxMSW-2.9.0-makefiles.patch +wxMSW-2.9.0-version.patch ), @common ], }, mac => { unicode => [ qw(wxMac-2.9.0-textctrl.patch diff -u3 -r -N Alien-wxWidgets-0.46/patches/wxMSW-2.8.10-version.patch Alien-wxWidgets-0.4601/patches/wxMSW-2.8.10-version.patch --- Alien-wxWidgets-0.46/patches/wxMSW-2.8.10-version.patch 1969-12-31 17:00:00.000000000 -0700 +++ Alien-wxWidgets-0.46/patches/wxMSW-2.8.10-version.patch 2009-11-09 11:29:08.731185600 -0700 @@ -0,0 +1,57 @@ +--- src/msw/version.rc 2009-03-06 05:11:24.000000000 -0700 ++++ src/msw/version.rc 2009-11-09 11:27:26.874723200 -0700 +@@ -4,7 +4,7 @@ + // Author: Vadim Zeitlin + // Modified by: + // Created: 09.07.00 +-// RCS-ID: $Id: version.rc 41690 2006-10-08 10:59:16Z VZ $ ++// RCS-ID: $Id$ + // Copyright: (c) 2000 Vadim Zeitlin + // Licence: wxWidgets license + /////////////////////////////////////////////////////////////////////////////// +@@ -25,10 +25,16 @@ + #define DLL_FLAGS 0x0L + #endif + ++// 0x0409 is US English, 0x04b0 is Unicode and 0x0000 is 7 bit ASCII. see ++// http://msdn.microsoft.com/en-us/library/aa381049(VS.85).aspx for the full ++// list of languages and charsets ++#define LANG 0x0409 + #ifdef _UNICODE +- #define LANG "04090000" ++ #define CHARSET 0x4b0 ++ #define LANG_WITH_CHARSET "040904b0" + #else +- #define LANG "040904b0" ++ #define CHARSET 0 ++ #define LANG_WITH_CHARSET "04090000" + #endif + + 1 VERSIONINFO +@@ -42,15 +48,14 @@ + BEGIN + BLOCK "StringFileInfo" + BEGIN +- // US English Ascii; see http://msdn.microsoft.com/library/psdk/winui/rc_3rxn.htm for codes +- BLOCK LANG ++ BLOCK LANG_WITH_CHARSET + BEGIN + VALUE "Comments", "wxWidgets cross-platform GUI framework\0" + VALUE "CompanyName", "wxWidgets development team\0" + VALUE "FileDescription", "wxWidgets for MSW\0" + VALUE "FileVersion", "wxWidgets Library " wxVERSION_NUM_DOT_STRING "\0" + VALUE "InternalName", "wxMSW\0" +- VALUE "LegalCopyright", "Copyright © 1993-2006 wxWidgets development team\0" ++ VALUE "LegalCopyright", "Copyright 1993-2009 wxWidgets development team\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", wxSTRINGIZE(WXDLLNAME) ".dll\0" + VALUE "PrivateBuild", "\0" +@@ -59,4 +64,8 @@ + VALUE "SpecialBuild", "\0" + END + END ++ BLOCK "VarFileInfo" ++ BEGIN ++ VALUE "Translation", LANG, CHARSET ++ END + END diff -u3 -r -N Alien-wxWidgets-0.46/patches/wxMSW-2.9.0-version.patch Alien-wxWidgets-0.4601/patches/wxMSW-2.9.0-version.patch --- Alien-wxWidgets-0.46/patches/wxMSW-2.9.0-version.patch 1969-12-31 17:00:00.000000000 -0700 +++ Alien-wxWidgets-0.46/patches/wxMSW-2.9.0-version.patch 2009-11-09 11:24:43.617163200 -0700 @@ -0,0 +1,57 @@ +--- src/msw/version.rc 2009-09-03 23:52:55.000000000 -0600 ++++ src/msw/version.rc 2009-11-09 11:13:37.070976000 -0700 +@@ -4,7 +4,7 @@ + // Author: Vadim Zeitlin + // Modified by: + // Created: 09.07.00 +-// RCS-ID: $Id: version.rc 49081 2007-10-07 19:49:09Z VZ $ ++// RCS-ID: $Id$ + // Copyright: (c) 2000 Vadim Zeitlin + // Licence: wxWidgets license + /////////////////////////////////////////////////////////////////////////////// +@@ -25,10 +25,16 @@ + #define DLL_FLAGS 0x0L + #endif + ++// 0x0409 is US English, 0x04b0 is Unicode and 0x0000 is 7 bit ASCII. see ++// http://msdn.microsoft.com/en-us/library/aa381049(VS.85).aspx for the full ++// list of languages and charsets ++#define LANG 0x0409 + #ifdef _UNICODE +- #define LANG "04090000" ++ #define CHARSET 0x4b0 ++ #define LANG_WITH_CHARSET "040904b0" + #else +- #define LANG "040904b0" ++ #define CHARSET 0 ++ #define LANG_WITH_CHARSET "04090000" + #endif + + 1 VERSIONINFO +@@ -42,15 +48,14 @@ + BEGIN + BLOCK "StringFileInfo" + BEGIN +- // US English Ascii; see http://msdn.microsoft.com/library/psdk/winui/rc_3rxn.htm for codes +- BLOCK LANG ++ BLOCK LANG_WITH_CHARSET + BEGIN + VALUE "Comments", "wxWidgets cross-platform GUI framework\0" + VALUE "CompanyName", "wxWidgets development team\0" + VALUE "FileDescription", "wxWidgets for MSW\0" + VALUE "FileVersion", "wxWidgets Library " wxVERSION_NUM_DOT_STRING "\0" + VALUE "InternalName", "wxMSW\0" +- VALUE "LegalCopyright", "Copyright © 1993-2007 wxWidgets development team\0" ++ VALUE "LegalCopyright", "Copyright 1993-2009 wxWidgets development team\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", wxSTRINGIZE(WXDLLNAME) ".dll\0" + VALUE "PrivateBuild", "\0" +@@ -59,4 +64,8 @@ + VALUE "SpecialBuild", "\0" + END + END ++ BLOCK "VarFileInfo" ++ BEGIN ++ VALUE "Translation", LANG, CHARSET ++ END + END
Subject: Re: [rt.cpan.org #47605] [patch attached] Making version resource in .dll files more complete under Windows.
Date: Wed, 11 Nov 2009 22:31:55 +0100
To: bug-Alien-wxWidgets [...] rt.cpan.org
From: Mattia Barbon <mattia.barbon [...] libero.it>
Curtis Jewell via RT wrote: Show quoted text
> Queue: Alien-wxWidgets > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=47605 > > > It's ready to accept for 0.47 if you want it!
Thanks, applied! (and sorry I forgot about this patch). Mattia