diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2012-04-16 11:11:19 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-17 03:26:32 +0200 |
commit | 8987e5d2cb7b7816fd0002fd9ad939ab4f08971b (patch) | |
tree | 0ed5fd830ce5281a29e00854b71866002eeb9f50 /qmake | |
parent | 31cfe5ca1b5006566051942254d977581a769e3e (diff) |
qmake/Win: fix incomplete generated version resource
Since Windows Vista the resource language must be included to
make the version information visible in Windows Explorer.
Two new variables have been introduced:
RC_LANG (default: 1033) - resource language
RC_CODEPAGE (default: 1200) - resource codepage
Task-number: QTBUG-23218
Change-Id: I29e102d19501e3b7a43d5096fc4806bc38a4d846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 9d983ffc66..895c331b21 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -420,6 +420,8 @@ void Win32MakefileGenerator::processRcFileVar() productName = project->values("TARGET").first(); QString originalName = project->values("TARGET").first() + project->values("TARGET_EXT").first(); + int rcLang = project->intValue("RC_LANG", 1033); // default: English(USA) + int rcCodePage = project->intValue("RC_CODEPAGE", 1200); // default: Unicode ts << "# if defined(UNDER_CE)" << endl; ts << "# include <winbase.h>" << endl; @@ -445,7 +447,9 @@ void Win32MakefileGenerator::processRcFileVar() ts << "\tBEGIN" << endl; ts << "\t\tBLOCK \"StringFileInfo\"" << endl; ts << "\t\tBEGIN" << endl; - ts << "\t\t\tBLOCK \"040904B0\"" << endl; + ts << "\t\t\tBLOCK \"" + << QString("%1%2").arg(rcLang, 4, 16, QLatin1Char('0')).arg(rcCodePage, 4, 16, QLatin1Char('0')) + << "\"" << endl; ts << "\t\t\tBEGIN" << endl; ts << "\t\t\t\tVALUE \"CompanyName\", \"" << companyName << "\\0\"" << endl; ts << "\t\t\t\tVALUE \"FileDescription\", \"" << description << "\\0\"" << endl; @@ -457,6 +461,12 @@ void Win32MakefileGenerator::processRcFileVar() ts << "\t\tEND" << endl; ts << "\t\tBLOCK \"VarFileInfo\"" << endl; ts << "\t\tBEGIN" << endl; + ts << "\t\t\tVALUE \"Translation\", " + << QString("0x%1").arg(rcLang, 4, 16, QLatin1Char('0')) + << ", " << QString("%1").arg(rcCodePage, 4) << endl; + ts << "\t\tEND" << endl; + ts << "\t\tBLOCK \"VarFileInfo\"" << endl; + ts << "\t\tBEGIN" << endl; ts << "\t\t\tVALUE \"Translation\", 0x409, 1200" << endl; ts << "\t\tEND" << endl; ts << "\tEND" << endl; |