From af6ddbbe2ac75a66776cc64b4096891f908f15e4 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 21 Jan 2022 17:25:29 +0300 Subject: [PATCH] Use Windows 10 as default prefix version. Signed-off-by: Nikolay Sivov --- dlls/kernel32/version.rc | 9 +++++---- dlls/kernelbase/version.c | 3 ++- dlls/ntdll/version.c | 8 +++++--- include/wine/wine_build_number.h | 3 +++ loader/wine.inf.in | 24 ++++++++++++------------ programs/winecfg/appdefaults.c | 5 +++-- 6 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 include/wine/wine_build_number.h diff --git a/dlls/kernel32/version.rc b/dlls/kernel32/version.rc index b6002f51f7a..36b6f8b2418 100644 --- a/dlls/kernel32/version.rc +++ b/dlls/kernel32/version.rc @@ -17,6 +17,7 @@ */ #include "winresrc.h" +#include "wine/wine_build_number.h" #pragma makedep po @@ -26,9 +27,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT #define WINE_FILENAME_STR "kernel32.dll" /* these values come from Windows 10 Version 1909 */ -#define WINE_FILEVERSION 10,0,18362,1350 -#define WINE_FILEVERSION_STR "10.0.18362.1350" -#define WINE_PRODUCTVERSION 10,0,18362,1350 -#define WINE_PRODUCTVERSION_STR "10.0.18362.1350" +#define WINE_FILEVERSION 10,0,WINE_WINBUILD_NUMBER,1350 +#define WINE_FILEVERSION_STR "10.0." WINE_WINBUILD_NUMBER_STR ".1350" +#define WINE_PRODUCTVERSION 10,0,WINE_WINBUILD_NUMBER,1350 +#define WINE_PRODUCTVERSION_STR "10.0." WINE_WINBUILD_NUMBER_STR ".1350" #include "wine/wine_common_ver.rc" diff --git a/dlls/kernelbase/version.c b/dlls/kernelbase/version.c index 7ca3ecdc712..81105dbe38f 100644 --- a/dlls/kernelbase/version.c +++ b/dlls/kernelbase/version.c @@ -43,6 +43,7 @@ #include "kernelbase.h" #include "wine/debug.h" +#include "wine/wine_build_number.h" WINE_DEFAULT_DEBUG_CHANNEL(ver); @@ -156,7 +157,7 @@ static const struct }, /* Windows 10 */ { - { 10, 0, 0x42ee }, + { 10, 0, WINE_WINBUILD_NUMBER }, {0x8e0f7a12,0xbfb3,0x4fe8,{0xb9,0xa5,0x48,0xfd,0x50,0xa1,0x5a,0x9a}} } }; diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c index 5f956d9d2e6..684bf4a0bbb 100644 --- a/dlls/ntdll/version.c +++ b/dlls/ntdll/version.c @@ -28,10 +28,12 @@ #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" -#include "wine/debug.h" #include "ntdll_misc.h" #include "ddk/wdm.h" +#include "wine/debug.h" +#include "wine/wine_build_number.h" + WINE_DEFAULT_DEBUG_CHANNEL(ver); typedef enum @@ -167,7 +169,7 @@ static const RTL_OSVERSIONINFOEXW VersionData[NB_WINDOWS_VERSIONS] = }, /* WIN10 */ { - sizeof(RTL_OSVERSIONINFOEXW), 10, 0, 0x4563, VER_PLATFORM_WIN32_NT, + sizeof(RTL_OSVERSIONINFOEXW), 10, 0, WINE_WINBUILD_NUMBER, VER_PLATFORM_WIN32_NT, L"", 0, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0 }, @@ -467,7 +469,7 @@ void version_init(void) NtQuerySystemInformation( SystemWineVersionInformation, wine_version, sizeof(wine_version), NULL ); - current_version = &VersionData[WIN7]; + current_version = &VersionData[WIN10]; RtlOpenCurrentUser( KEY_ALL_ACCESS, &root ); attr.Length = sizeof(attr); diff --git a/include/wine/wine_build_number.h b/include/wine/wine_build_number.h new file mode 100644 index 00000000000..fa5543546db --- /dev/null +++ b/include/wine/wine_build_number.h @@ -0,0 +1,3 @@ + +#define WINE_WINBUILD_NUMBER 18362 +#define WINE_WINBUILD_NUMBER_STR "18362" diff --git a/loader/wine.inf.in b/loader/wine.inf.in index c0251934dfc..b0fb13765cc 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -5594,12 +5594,12 @@ HKLM,"System\CurrentControlSet\Services\Winsock\Parameters",,16 HKLM,"System\CurrentControlSet\Services\Winsock2\Parameters\Protocol_Catalog9\Catalog_Entries",,16 [VersionInfo] -HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.1" -HKLM,%CurrentVersionNT%,"CurrentMajorVersionNumber",0x10001,6 -HKLM,%CurrentVersionNT%,"CurrentMinorVersionNumber",0x10001,1 -HKLM,%CurrentVersionNT%,"CSDVersion",2,"Service Pack 1" -HKLM,%CurrentVersionNT%,"CurrentBuild",2,"7601" -HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"7601" +HKLM,%CurrentVersionNT%,"CurrentVersion",2,"10.0" +HKLM,%CurrentVersionNT%,"CurrentMajorVersionNumber",0x10001,10 +HKLM,%CurrentVersionNT%,"CurrentMinorVersionNumber",0x10001,0 +HKLM,%CurrentVersionNT%,"CSDVersion",2,"" +HKLM,%CurrentVersionNT%,"CurrentBuild",2,"18362" +HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"18362" HKLM,%CurrentVersionNT%,"CurrentType",2,"Uniprocessor Free" HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ @@ -5608,16 +5608,16 @@ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 -HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 7" +HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 10" HKLM,%Control%\ProductOptions,"ProductType",2,"WinNT" HKLM,%Control%\Windows,"CSDVersion",0x10003,0x100 HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT" [VersionInfo.ntamd64] -HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.1" -HKLM,%CurrentVersionNT%,"CSDVersion",2,"Service Pack 1" -HKLM,%CurrentVersionNT%,"CurrentBuild",2,"7601" -HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"7601" +HKLM,%CurrentVersionNT%,"CurrentVersion",2,"10.0" +HKLM,%CurrentVersionNT%,"CSDVersion",2,"" +HKLM,%CurrentVersionNT%,"CurrentBuild",2,"18362" +HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"18362" HKLM,%CurrentVersionNT%,"CurrentType",2,"Uniprocessor Free" HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ @@ -5626,7 +5626,7 @@ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 -HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 7" +HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 10" HKLM,%Control%\ProductOptions,"ProductType",2,"WinNT" HKLM,%Control%\Windows,"CSDVersion",0x10003,0x100 HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT" diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c index df187ca41e1..66975a2813f 100644 --- a/programs/winecfg/appdefaults.c +++ b/programs/winecfg/appdefaults.c @@ -31,6 +31,7 @@ #include "wine/heap.h" #include "winecfg.h" #include "resource.h" +#include "wine/wine_build_number.h" WINE_DEFAULT_DEBUG_CHANNEL(winecfg); @@ -50,7 +51,7 @@ struct win_version static const struct win_version win_versions[] = { - { L"win10", L"Windows 10", 10, 0, 0x4563,VER_PLATFORM_WIN32_NT, L"", 0, 0, L"WinNT"}, + { L"win10", L"Windows 10", 10, 0, WINE_WINBUILD_NUMBER,VER_PLATFORM_WIN32_NT, L"", 0, 0, L"WinNT"}, { L"win81", L"Windows 8.1", 6, 3, 0x2580,VER_PLATFORM_WIN32_NT, L"", 0, 0, L"WinNT"}, { L"win8", L"Windows 8", 6, 2, 0x23F0,VER_PLATFORM_WIN32_NT, L"", 0, 0, L"WinNT"}, { L"win2008r2", L"Windows 2008 R2", 6, 1, 0x1DB1,VER_PLATFORM_WIN32_NT, L"Service Pack 1", 1, 0, L"ServerNT"}, @@ -74,7 +75,7 @@ static const struct win_version win_versions[] = #endif }; -#define DEFAULT_WIN_VERSION L"win7" +#define DEFAULT_WIN_VERSION L"win10" static const WCHAR szKey9x[] = L"Software\\Microsoft\\Windows\\CurrentVersion"; static const WCHAR szKeyNT[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion"; -- 2.34.1