msi: Move application of substorage transforms out of msi_parse_patch_summary.
This commit is contained in:
parent
bcc0ad9b07
commit
33299faae4
|
@ -491,8 +491,7 @@ done:
|
||||||
static UINT msi_parse_patch_summary( MSIPACKAGE *package, MSIDATABASE *patch_db )
|
static UINT msi_parse_patch_summary( MSIPACKAGE *package, MSIDATABASE *patch_db )
|
||||||
{
|
{
|
||||||
MSISUMMARYINFO *si;
|
MSISUMMARYINFO *si;
|
||||||
LPWSTR str, *substorage;
|
UINT r = ERROR_SUCCESS;
|
||||||
UINT i, r = ERROR_SUCCESS;
|
|
||||||
|
|
||||||
si = MSI_GetSummaryInformationW( patch_db->storage, 0 );
|
si = MSI_GetSummaryInformationW( patch_db->storage, 0 );
|
||||||
if (!si)
|
if (!si)
|
||||||
|
@ -519,26 +518,22 @@ static UINT msi_parse_patch_summary( MSIPACKAGE *package, MSIDATABASE *patch_db
|
||||||
return ERROR_OUTOFMEMORY;
|
return ERROR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enumerate the substorage */
|
package->patch->transforms = msi_suminfo_dup_string(si, PID_LASTAUTHOR);
|
||||||
str = msi_suminfo_dup_string( si, PID_LASTAUTHOR );
|
if (!package->patch->transforms)
|
||||||
package->patch->transforms = str;
|
{
|
||||||
|
|
||||||
substorage = msi_split_string( str, ';' );
|
|
||||||
for ( i = 0; substorage && substorage[i] && r == ERROR_SUCCESS; i++ )
|
|
||||||
r = msi_apply_substorage_transform( package, patch_db, substorage[i] );
|
|
||||||
|
|
||||||
msi_free( substorage );
|
|
||||||
msiobj_release( &si->hdr );
|
msiobj_release( &si->hdr );
|
||||||
|
return ERROR_OUTOFMEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
msi_set_media_source_prop(package);
|
msiobj_release( &si->hdr );
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT msi_apply_patch_package( MSIPACKAGE *package, LPCWSTR file )
|
static UINT msi_apply_patch_package( MSIPACKAGE *package, LPCWSTR file )
|
||||||
{
|
{
|
||||||
MSIDATABASE *patch_db = NULL;
|
MSIDATABASE *patch_db = NULL;
|
||||||
UINT r;
|
LPWSTR *substorage;
|
||||||
|
UINT i, r;
|
||||||
|
|
||||||
TRACE("%p %s\n", package, debugstr_w( file ) );
|
TRACE("%p %s\n", package, debugstr_w( file ) );
|
||||||
|
|
||||||
|
@ -556,6 +551,14 @@ static UINT msi_apply_patch_package( MSIPACKAGE *package, LPCWSTR file )
|
||||||
|
|
||||||
msi_parse_patch_summary( package, patch_db );
|
msi_parse_patch_summary( package, patch_db );
|
||||||
|
|
||||||
|
/* apply substorage transforms */
|
||||||
|
substorage = msi_split_string( package->patch->transforms, ';' );
|
||||||
|
for ( i = 0; substorage && substorage[i] && r == ERROR_SUCCESS; i++ )
|
||||||
|
r = msi_apply_substorage_transform( package, patch_db, substorage[i] );
|
||||||
|
|
||||||
|
msi_free( substorage );
|
||||||
|
msi_set_media_source_prop( package );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There might be a CAB file in the patch package,
|
* There might be a CAB file in the patch package,
|
||||||
* so append it to the list of storage to search for streams.
|
* so append it to the list of storage to search for streams.
|
||||||
|
|
Loading…
Reference in New Issue