Added patch to show windows version when collecting system info in winedbg.

This commit is contained in:
Sebastian Lackner 2015-10-07 04:22:18 +02:00
parent ee5271ee57
commit d8c4d47bbc
5 changed files with 116 additions and 0 deletions

View File

@ -34,6 +34,11 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [1]:**
* Show windows version when collecting system info in winedbg
**Bug fixes and features in Wine Staging 1.7.52 [268]:**
*Note: The following list only contains features and bug fixes which are not

1
debian/changelog vendored
View File

@ -1,6 +1,7 @@
wine-staging (1.7.53) UNRELEASED; urgency=low
* Added patch to implement support for msiexec /passive command line option.
* Added patch to implement stub for DSPROPSETID_EAX20_ListenerProperties.
* Added patch to show windows version when collecting system info in winedbg.
* Removed patch to mark RegOpenKeyExA, RegCloseKey and RegQueryValueExA as
hotpatchable (accepted upstream).
* Removed patch to mark BitBlt and StretchDIBits as hotpatchable (accepted

View File

@ -301,6 +301,7 @@ patch_enable_all ()
enable_wined3d_UnhandledBlendFactor="$1"
enable_wined3d_resource_check_usage="$1"
enable_wined3d_wined3d_swapchain_present="$1"
enable_winedbg_Windows_Version="$1"
enable_winedevice_Fix_Relocation="$1"
enable_winemenubuilder_Desktop_Icon_Path="$1"
enable_winepulse_PulseAudio_Support="$1"
@ -998,6 +999,9 @@ patch_enable ()
wined3d-wined3d_swapchain_present)
enable_wined3d_wined3d_swapchain_present="$2"
;;
winedbg-Windows_Version)
enable_winedbg_Windows_Version="$2"
;;
winedevice-Fix_Relocation)
enable_winedevice_Fix_Relocation="$2"
;;
@ -6080,6 +6084,18 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
) >> "$patchlist"
fi
# Patchset winedbg-Windows_Version
# |
# | Modified files:
# | * programs/winedbg/tgt_active.c
# |
if test "$enable_winedbg_Windows_Version" -eq 1; then
patch_apply winedbg-Windows_Version/0001-winedbg-Print-windows-version-in-system-info.patch
(
echo '+ { "Michael Müller", "winedbg: Print windows version in system info.", 1 },';
) >> "$patchlist"
fi
# Patchset winedevice-Fix_Relocation
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,93 @@
From f6cf4f7a6fd675a4b742303608e702d2ecd87b9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 7 Oct 2015 03:38:54 +0200
Subject: winedbg: Print windows version in system info.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Michael Müller <michael@fds-team.de>
---
programs/winedbg/tgt_active.c | 59 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c
index 989e433..b2efe62 100644
--- a/programs/winedbg/tgt_active.c
+++ b/programs/winedbg/tgt_active.c
@@ -678,6 +678,64 @@ static HANDLE create_temp_file(void)
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, 0 );
}
+struct
+{
+ int type;
+ int platform;
+ int major;
+ int minor;
+ const char *str;
+}
+version_table[] =
+{
+ { 0, VER_PLATFORM_WIN32s, 2, 0, "2.0" },
+ { 0, VER_PLATFORM_WIN32s, 3, 0, "3.0" },
+ { 0, VER_PLATFORM_WIN32s, 3, 10, "3.1" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 3, 51, "NT 3.51" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 4, 0, "NT 4.0" },
+ { 0, VER_PLATFORM_WIN32_WINDOWS, 4, 0, "95" },
+ { 0, VER_PLATFORM_WIN32_WINDOWS, 4, 10, "98" },
+ { 0, VER_PLATFORM_WIN32_WINDOWS, 4, 90, "ME" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 5, 0, "2000" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 5, 1, "XP" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 5, 2, "XP" },
+ { VER_NT_SERVER, VER_PLATFORM_WIN32_NT, 5, 2, "Server 2003" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 6, 0, "Vista" },
+ { VER_NT_SERVER, VER_PLATFORM_WIN32_NT, 6, 0, "Server 2008" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 6, 1, "7" },
+ { VER_NT_SERVER, VER_PLATFORM_WIN32_NT, 6, 1, "Server 2008 R2" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 6, 2, "8" },
+ { VER_NT_SERVER, VER_PLATFORM_WIN32_NT, 6, 2, "Server 2012" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 6, 3, "8.1" },
+ { VER_NT_SERVER, VER_PLATFORM_WIN32_NT, 6, 3, "Server 2012 R2" },
+ { VER_NT_WORKSTATION, VER_PLATFORM_WIN32_NT, 10, 0, "10" },
+ { VER_NT_SERVER, VER_PLATFORM_WIN32_NT, 10, 0, "Server 2016" },
+};
+
+static const char *get_windows_version(void)
+{
+ OSVERSIONINFOEXW info = { sizeof(OSVERSIONINFOEXW) };
+ static char str[64];
+ int i;
+
+ GetVersionExW( (OSVERSIONINFOW *)&info );
+
+ for (i = 0; i < sizeof(version_table) / sizeof(version_table[0]); i++)
+ {
+ if (version_table[i].type == info.wProductType &&
+ version_table[i].platform == info.dwPlatformId &&
+ version_table[i].major == info.dwMajorVersion &&
+ version_table[i].minor == info.dwMinorVersion)
+ {
+ return version_table[i].str;
+ }
+ }
+
+ snprintf( str, sizeof(str), "%d.%d (%d)", info.dwMajorVersion,
+ info.dwMinorVersion, info.wProductType );
+ return str;
+}
+
static void output_system_info(void)
{
#ifdef __i386__
@@ -705,6 +763,7 @@ static void output_system_info(void)
dbg_printf( "System information:\n" );
if (wine_get_build_id) dbg_printf( " Wine build: %s\n", wine_get_build_id() );
dbg_printf( " Platform: %s%s\n", platform, is_wow64 ? " (WOW64)" : "" );
+ dbg_printf( " Version: Windows %s\n", get_windows_version() );
if (wine_get_host_version)
{
const char *sysname, *release;
--
2.6.0

View File

@ -0,0 +1 @@
Fixes: Show windows version when collecting system info in winedbg