From b027a7db5079f4405eca4610ff2d095e53022d3f Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Mon, 6 Mar 2017 23:49:43 +0900 Subject: [PATCH] Use CP 1200 (Unicode) for Win32/Win64 version info. Signed-off-by: Akihiro Sagawa Signed-off-by: Alexandre Julliard --- dlls/npmshtml/rsrc.rc | 1 + dlls/version/tests/info.c | 2 -- include/wine/wine_common_ver.rc | 24 ++++++++++++++++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/npmshtml/rsrc.rc b/dlls/npmshtml/rsrc.rc index d57e09cb440..07622668653 100644 --- a/dlls/npmshtml/rsrc.rc +++ b/dlls/npmshtml/rsrc.rc @@ -18,6 +18,7 @@ #define WINE_FILEDESCRIPTION_STR "Wine ActiveX plugin" #define WINE_FILENAME_STR "npmshtml.dll" +#define WINE_CODEPAGE 04E4 /* need to set "Windows Multilingual" */ #define WINE_EXTRAVALUES \ VALUE "OLESelfRegister", "" \ VALUE "MIMEType", "application/x-oleobject" diff --git a/dlls/version/tests/info.c b/dlls/version/tests/info.c index d3420bcbbe3..c033aa9ffce 100644 --- a/dlls/version/tests/info.c +++ b/dlls/version/tests/info.c @@ -664,7 +664,6 @@ static void test_GetFileVersionInfoEx(void) todo_wine_if(lang != english) ok(LOWORD(translation) == lang, "got %u, expected lang is %u\n", LOWORD(translation), lang); - todo_wine ok(HIWORD(translation) == unicode, "got %u, expected codepage is %u\n", HIWORD(translation), unicode); @@ -706,7 +705,6 @@ static void test_GetFileVersionInfoEx(void) else ok(LOWORD(translation) == english, "[%u] got %u, expected lang is %u\n", i, LOWORD(translation), english); - todo_wine ok(HIWORD(translation) == unicode, "[%u] got %u, expected codepage is %u\n", i, HIWORD(translation), unicode); diff --git a/include/wine/wine_common_ver.rc b/include/wine/wine_common_ver.rc index 76ddabfc75a..50ba1cf0426 100644 --- a/include/wine/wine_common_ver.rc +++ b/include/wine/wine_common_ver.rc @@ -48,6 +48,8 @@ never complain. #define WINE_VER_STRINGIZE2(x) #x #define WINE_VER_STRINGIZE(x) WINE_VER_STRINGIZE2(x) +#define WINE_VER_HEXPREFIX2(x) 0x ## x +#define WINE_VER_HEXPREFIX(x) WINE_VER_HEXPREFIX2(x) #ifndef WINE_FILEVERSION_STR #define WINE_FILEVERSION_STR WINE_VER_STRINGIZE(WINE_FILEVERSION_MAJOR.WINE_FILEVERSION_MINOR.WINE_FILEVERSION_BUILD.WINE_FILEVERSION_PLATFORMID) @@ -93,6 +95,22 @@ never complain. #define WINE_EXTRAVALUES #endif +#ifndef WINE_CODEPAGE +#ifdef _WIN32 +#define WINE_CODEPAGE 04B0 /* CP1200 (Unicode) */ +#else +#define WINE_CODEPAGE 04E4 /* CP1252 for Win16 */ +#endif +#endif + +#ifndef WINE_CODEPAGE_STR +#define WINE_CODEPAGE_STR WINE_VER_STRINGIZE(WINE_CODEPAGE) +#endif + +#ifndef WINE_CODEPAGE_HEX +#define WINE_CODEPAGE_HEX WINE_VER_HEXPREFIX(WINE_CODEPAGE) +#endif + VS_VERSION_INFO VERSIONINFO FILEVERSION WINE_FILEVERSION PRODUCTVERSION WINE_PRODUCTVERSION @@ -104,7 +122,8 @@ FILESUBTYPE WINE_FILESUBTYPE { BLOCK "StringFileInfo" { - BLOCK "040904E4" /* LANG_ENGLISH/SUBLANG_DEFAULT, CP 1252 */ + /* LANG_ENGLISH/SUBLANG_DEFAULT, WINE_CODEPAGE */ + BLOCK "0409" WINE_CODEPAGE_STR { VALUE "CompanyName", "Microsoft Corporation" /* GameGuard depends on this */ VALUE "FileDescription", WINE_FILEDESCRIPTION_STR @@ -119,6 +138,7 @@ FILESUBTYPE WINE_FILESUBTYPE } BLOCK "VarFileInfo" { - VALUE "Translation", 0x0409, 0x04E4 /* LANG_ENGLISH/SUBLANG_DEFAULT, CP 1252 */ + /* LANG_ENGLISH/SUBLANG_DEFAULT, WINE_CODEPAGE */ + VALUE "Translation", 0x0409, WINE_CODEPAGE_HEX } }