winecfg: Add version registry entries for win_nt+
Vitaliy Margolen
wine-patch at kievinfo.com
Mon Aug 15 10:43:02 CDT 2005
Vitaliy Margolen
changelog:
programs/winecfg
Add CSDVersion & CurrentVersion to HKLM\Software\Microsoft\Windows NT\CurrentVersion
-------------- next part --------------
Index: programs/winecfg/appdefaults.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/appdefaults.c,v
retrieving revision 1.18
diff -u -p -r1.18 appdefaults.c
--- programs/winecfg/appdefaults.c 27 Jun 2005 09:48:06 -0000 1.18
+++ programs/winecfg/appdefaults.c 15 Aug 2005 15:37:36 -0000
@@ -303,6 +303,25 @@ static void on_winver_change(HWND dialog
WINE_TRACE("setting Version key to value '%s'\n", ver[selection - 1].szVersion);
set_reg_key(config_key, keypath(""), "Version", ver[selection - 1].szVersion);
}
+ /* global version only */
+ if (!current_app)
+ {
+ static const char *szKey = "Software\\Microsoft\\Windows NT\\CurrentVersion";
+ char Buffer[10];
+
+ if (selection == 0 || !strlen(ver[selection - 1].szCSDVersion))
+ {
+ set_reg_key(HKEY_LOCAL_MACHINE, szKey, "CSDVersion", NULL);
+ set_reg_key(HKEY_LOCAL_MACHINE, szKey, "CurrentVersion", NULL);
+ }
+ else
+ {
+ snprintf(Buffer, sizeof(Buffer), "%ld.%ld", ver[selection - 1].dwMajorVersion,
+ ver[selection - 1].dwMinorVersion);
+ set_reg_key(HKEY_LOCAL_MACHINE, szKey, "CSDVersion", ver[selection - 1].szCSDVersion);
+ set_reg_key(HKEY_LOCAL_MACHINE, szKey, "CurrentVersion", Buffer);
+ }
+ }
/* enable the apply button */
SendMessage(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
Index: programs/winecfg/properties.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/properties.c,v
retrieving revision 1.13
diff -u -p -r1.13 properties.c
--- programs/winecfg/properties.c 3 Aug 2005 15:53:26 -0000 1.13
+++ programs/winecfg/properties.c 15 Aug 2005 15:37:36 -0000
@@ -25,18 +25,18 @@
#include "properties.h"
static const VERSION_DESC sWinVersions[] = {
- {"win2003", "Windows 2003"},
- {"winxp", "Windows XP"},
- {"win2k", "Windows 2000"},
- {"winme", "Windows ME"},
- {"win98", "Windows 98"},
- {"win95", "Windows 95"},
- {"nt40", "Windows NT 4.0"},
- {"nt351", "Windows NT 3.5"},
- {"win31", "Windows 3.1"},
- {"win30", "Windows 3.0"},
- {"win20", "Windows 2.0"},
- {"", ""}
+ {5, 2, "win2003", "Windows 2003", "Service Pack 1"},
+ {5, 1, "winxp", "Windows XP", "Service Pack 2"},
+ {5, 0, "win2k", "Windows 2000", "Service Pack 4"},
+ {4, 90, "winme", "Windows ME", ""},
+ {4, 10, "win98", "Windows 98", ""},
+ {4, 0, "win95", "Windows 95", ""},
+ {4, 0, "nt40", "Windows NT 4.0", "Service Pack 6a"},
+ {3, 51, "nt351", "Windows NT 3.5", "Service Pack 2"},
+ {3, 10, "win31", "Windows 3.1", ""},
+ {3, 0, "win30", "Windows 3.0", ""},
+ {2, 0, "win20", "Windows 2.0", ""},
+ {0, 0, "", "", ""}
};
static const DLL_DESC sDLLType[] = {
Index: programs/winecfg/properties.h
===================================================================
RCS file: /home/wine/wine/programs/winecfg/properties.h,v
retrieving revision 1.13
diff -u -p -r1.13 properties.h
--- programs/winecfg/properties.h 27 Jun 2005 09:48:06 -0000 1.13
+++ programs/winecfg/properties.h 15 Aug 2005 15:37:36 -0000
@@ -39,8 +39,11 @@
typedef struct
{
+ DWORD dwMajorVersion;
+ DWORD dwMinorVersion;
char szVersion[MAX_VERSION_LENGTH];
char szDescription[MAX_DESCRIPTION_LENGTH];
+ char szCSDVersion[128];
} VERSION_DESC;
#define DLL_NATIVE 0x0000
More information about the wine-patches
mailing list