PATCH: msi / PhysicalMemory
Marcus Meissner
marcus at jet.franken.de
Mon May 2 06:16:56 CDT 2005
Hi,
This fixes a quickcam installer, which has a condition "PhysicalMemory>32".
Ciao, Marcus
Changelog:
Set PhysicalMemory property from system data.
Index: dlls/msi/package.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/package.c,v
retrieving revision 1.38
diff -u -r1.38 package.c
--- dlls/msi/package.c 24 Mar 2005 19:04:06 -0000 1.38
+++ dlls/msi/package.c 2 May 2005 11:14:37 -0000
@@ -139,6 +139,7 @@
WCHAR pth[MAX_PATH];
WCHAR *ptr;
OSVERSIONINFOA OSVersion;
+ MEMORYSTATUSEX msex;
DWORD verval;
WCHAR verstr[10], bufstr[20];
HDC dc;
@@ -202,6 +203,7 @@
static const WCHAR szSix[] = {'6',0 };
static const WCHAR szVersionMsi[] = { 'V','e','r','s','i','o','n','M','s','i',0 };
+ static const WCHAR szPhysicalMemory[] = { 'P','h','y','s','i','c','a','l','M','e','m','o','r','y',0 };
static const WCHAR szFormat2[] = {'%','l','i','.','%','l','i',0};
/* Screen properties */
static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0};
@@ -217,7 +219,6 @@
UserLanguageID
LogonUser
VirtualMemory
-PhysicalMemory
Intel
ShellAdvSupport
DefaultUIFont
@@ -306,6 +307,12 @@
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
strcatW(pth,cszbs);
MSI_SetPropertyW(package, WF, pth);
+
+ /* Physical Memory is specified in MB. Using total amount. */
+ msex.dwLength = sizeof(msex);
+ GlobalMemoryStatusEx( &msex );
+ sprintfW( bufstr, szScreenFormat, (int)msex.ullTotalPhys/1024/1024);
+ MSI_SetPropertyW(package, szPhysicalMemory, bufstr);
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
ptr = strchrW(pth,'\\');
@@ -793,7 +800,7 @@
else
{
*pchValueBuf = 0;
- TRACE("property not found\n");
+ TRACE("property %s not found\n", debugstr_w(szName));
}
return rc;
More information about the wine-patches
mailing list