mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 08:49:15 +00:00
Set PhysicalMemory property from system data.
This commit is contained in:
parent
caf6fa9531
commit
1fa2da0756
1 changed files with 9 additions and 2 deletions
|
@ -139,6 +139,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||
WCHAR pth[MAX_PATH];
|
||||
WCHAR *ptr;
|
||||
OSVERSIONINFOA OSVersion;
|
||||
MEMORYSTATUSEX msex;
|
||||
DWORD verval;
|
||||
WCHAR verstr[10], bufstr[20];
|
||||
HDC dc;
|
||||
|
@ -202,6 +203,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||
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 @@ ComputerName
|
|||
UserLanguageID
|
||||
LogonUser
|
||||
VirtualMemory
|
||||
PhysicalMemory
|
||||
Intel
|
||||
ShellAdvSupport
|
||||
DefaultUIFont
|
||||
|
@ -306,6 +307,12 @@ Privileged
|
|||
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 @@ UINT MSI_GetPropertyW(MSIPACKAGE *package, LPCWSTR szName,
|
|||
else
|
||||
{
|
||||
*pchValueBuf = 0;
|
||||
TRACE("property not found\n");
|
||||
TRACE("property %s not found\n", debugstr_w(szName));
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
|
Loading…
Reference in a new issue