Hans Leidekker : msi: Update properties after each transform that affects the property table.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Nov 4 09:19:32 CST 2014


Module: wine
Branch: master
Commit: 98ae03ff4d1d8b1292301486b5ea30988de6fa51
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=98ae03ff4d1d8b1292301486b5ea30988de6fa51

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Nov  4 10:57:40 2014 +0100

msi: Update properties after each transform that affects the property table.

---

 dlls/msi/action.c  | 3 ---
 dlls/msi/dialog.c  | 1 -
 dlls/msi/msipriv.h | 1 +
 dlls/msi/package.c | 7 ++-----
 dlls/msi/table.c   | 6 ++++++
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index eb7ac62..524c4f7 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -7813,10 +7813,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
         package->full_reinstall = 1;
     }
 
-    /* properties may have been added by a transform */
-    msi_clone_properties( package->db );
     msi_set_original_database_property( package->db, szPackagePath );
-
     msi_parse_command_line( package, szCommandLine, FALSE );
     msi_adjust_privilege_properties( package );
     msi_set_context( package );
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 6708f13..4e1052e 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -155,7 +155,6 @@ static const WCHAR szVolumeCostList[] = { 'V','o','l','u','m','e','C','o','s','t
 static const WCHAR szVolumeSelectCombo[] = { 'V','o','l','u','m','e','S','e','l','e','c','t','C','o','m','b','o',0 };
 static const WCHAR szSelectionDescription[] = {'S','e','l','e','c','t','i','o','n','D','e','s','c','r','i','p','t','i','o','n',0};
 static const WCHAR szSelectionPath[] = {'S','e','l','e','c','t','i','o','n','P','a','t','h',0};
-static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0};
 static const WCHAR szHyperLink[] = {'H','y','p','e','r','L','i','n','k',0};
 
 /* dialog sequencing */
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index a66835e..fd7b116 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -1180,6 +1180,7 @@ static const WCHAR szName[] = {'N','a','m','e',0};
 static const WCHAR szData[] = {'D','a','t','a',0};
 static const WCHAR szLangResource[] = {'\\','V','a','r','F','i','l','e','I','n','f','o','\\','T','r','a','n','s','l','a','t','i','o','n',0};
 static const WCHAR szInstallLocation[] = {'I','n','s','t','a','l','l','L','o','c','a','t','i','o','n',0};
+static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0};
 
 /* memory allocation macro functions */
 static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index c910d82..bf9c79c 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -1677,11 +1677,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
         }
         index++;
     }
-    if (index)
-    {
-        msi_clone_properties( package->db );
-        msi_adjust_privilege_properties( package );
-    }
+    if (index) msi_adjust_privilege_properties( package );
+
     r = msi_set_original_database_property( package->db, szPackage );
     if (r != ERROR_SUCCESS)
     {
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 9ed9421..900f9ae 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -2716,6 +2716,7 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg )
     string_table *strings;
     UINT ret = ERROR_FUNCTION_FAILED;
     UINT bytes_per_strref;
+    BOOL property_update = FALSE;
 
     TRACE("%p %p\n", db, stg );
 
@@ -2760,6 +2761,8 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg )
             tables = transform;
         else if (!strcmpW( transform->name, szColumns ) )
             columns = transform;
+        else if (!strcmpW( transform->name, szProperty ))
+            property_update = TRUE;
 
         TRACE("transform contains stream %s\n", debugstr_w(name));
 
@@ -2809,7 +2812,10 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg )
     }
 
     if ( ret == ERROR_SUCCESS )
+    {
         append_storage_to_db( db, stg );
+        if (property_update) msi_clone_properties( db );
+    }
 
 end:
     if ( stgenum )




More information about the wine-cvs mailing list