Mike McCormack : msi: Search the patch package for source cabinet files.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 1 07:08:59 CST 2006


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

Author: Mike McCormack <mike at codeweavers.com>
Date:   Wed Nov  1 15:09:23 2006 +0900

msi: Search the patch package for source cabinet files.

---

 dlls/msi/action.c  |    7 +++++++
 dlls/msi/msipriv.h |    1 +
 dlls/msi/table.c   |   19 +++++++++++--------
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index c349a94..a6cb5c2 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -526,6 +526,13 @@ static UINT msi_apply_patch_package( MSI
     }
 
     msi_parse_patch_summary( package, patch_db );
+
+    /*
+     * There might be a CAB file in the patch package,
+     * so append it to the list of storage to search for streams.
+     */
+    append_storage_to_db( package->db, patch_db->storage );
+
     msiobj_release( &patch_db->hdr );
 
     return ERROR_SUCCESS;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 45bdeac..fa0c225 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -563,6 +563,7 @@ extern UINT read_raw_stream_data( MSIDAT
 extern UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg );
 extern UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
                  LPCWSTR szTransformFile, int iErrorCond );
+extern void append_storage_to_db( MSIDATABASE *db, IStorage *stg );
 
 /* action internals */
 extern UINT MSI_InstallPackage( MSIPACKAGE *, LPCWSTR, LPCWSTR );
diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 9b2d357..385d2db 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -2101,14 +2101,7 @@ UINT msi_table_apply_transform( MSIDATAB
     }
 
     if ( ret == ERROR_SUCCESS )
-    {
-        MSITRANSFORM *t;
-
-        t = msi_alloc( sizeof *t );
-        t->stg = stg;
-        IStorage_AddRef( stg );
-        list_add_tail( &db->transforms, &t->entry );
-    }
+        append_storage_to_db( db, stg );
 
 end:
     if ( stgenum )
@@ -2119,6 +2112,16 @@ end:
     return ret;
 }
 
+void append_storage_to_db( MSIDATABASE *db, IStorage *stg )
+{
+    MSITRANSFORM *t;
+
+    t = msi_alloc( sizeof *t );
+    t->stg = stg;
+    IStorage_AddRef( stg );
+    list_add_tail( &db->transforms, &t->entry );
+}
+
 void msi_free_transforms( MSIDATABASE *db )
 {
     while( !list_empty( &db->transforms ) )




More information about the wine-cvs mailing list