From 4104c622afc46837e6f744b990ca1805b7af69ec Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Mon, 19 Jul 2004 21:49:15 +0000 Subject: [PATCH] Set VersionMsi property. Accept a dot in a number value. --- dlls/msi/cond.y | 2 +- dlls/msi/msipriv.h | 6 +++--- dlls/msi/package.c | 13 +++++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index 064f9336eaa..f82ac55e7af 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -506,7 +506,7 @@ static int COND_IsAlpha( WCHAR x ) static int COND_IsNumber( WCHAR x ) { - return( (( x >= '0' ) && ( x <= '9' )) || (x =='-') ); + return( (( x >= '0' ) && ( x <= '9' )) || (x =='-') || (x =='.') ); } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 4e6ab693cb9..e4154c0007d 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -202,9 +202,9 @@ typedef struct tagMSIPACKAGE #define MSIHANDLETYPE_RECORD 4 #define MSIHANDLETYPE_PACKAGE 5 -#define MSI_MAJORVERSION 1 -#define MSI_MINORVERSION 10 -#define MSI_BUILDNUMBER 1029 +#define MSI_MAJORVERSION 2 +#define MSI_MINORVERSION 0 +#define MSI_BUILDNUMBER 2600 #define GUID_SIZE 39 diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 3774f98380c..0f74e165ea1 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -171,7 +171,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) WCHAR pth[MAX_PATH]; OSVERSIONINFOA OSVersion; DWORD verval; - WCHAR verstr[10]; + WCHAR verstr[10], msiver[10]; static const WCHAR cszbs[]={'\\',0}; static const WCHAR CFF[] = @@ -211,7 +211,10 @@ static VOID set_installer_properties(MSIPACKAGE *package) {'S','e','r','v','i','c','e','P','a','c','k','L','e','v','e','l',0 }; static const WCHAR szSix[] = {'6',0 }; -/* these need to be dynamically descovered sometime */ + static const WCHAR szVersionMsi[] = { 'V','e','r','s','i','o','n','M','s','i',0 }; + static const WCHAR szFormat2[] = {'%','l','i','.','%','l','i',0}; + +/* these need to be dynamically discovered sometime */ static const WCHAR ProgramMenuFolder[] = {'P','r','o','g','r','a','m','M','e','n','u','F','o','l','d','e','r',0}; @@ -267,7 +270,6 @@ PhysicalMemory Intel ShellAdvSupport DefaultUIFont -VersionMsi VersionDatabase PackagecodeChanging ProductState @@ -279,7 +281,7 @@ ColorBits RedirectedDllSupport Time Date -Privilaged +Privileged */ SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES_COMMON,NULL,0,pth); @@ -349,6 +351,9 @@ Privilaged /* just fudge this */ MSI_SetPropertyW(package,szSPL,szSix); + sprintfW( msiver, szFormat2, MSI_MAJORVERSION, MSI_MINORVERSION); + MSI_SetPropertyW( package, szVersionMsi, msiver ); + /* FIXME: these need to be set properly */ MSI_SetPropertyW(package,ProgramMenuFolder,PMFPath);