Commit e534e772 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Apply any MSI transforms specified by the TRANSFORMS property.

parent 40a76a58
......@@ -569,6 +569,30 @@ static UINT msi_apply_patches( MSIPACKAGE *package )
return r;
}
static UINT msi_apply_transforms( MSIPACKAGE *package )
{
static const WCHAR szTransforms[] = {
'T','R','A','N','S','F','O','R','M','S',0 };
LPWSTR xform_list, *xforms;
UINT i, r = ERROR_SUCCESS;
xform_list = msi_dup_property( package, szTransforms );
xforms = msi_split_string( xform_list, ';' );
for( i=0; xforms && xforms[i] && r == ERROR_SUCCESS; i++ )
{
if (xforms[i][0] == ':')
r = msi_apply_substorage_transform( package, package->db, &xforms[i][1] );
else
r = MSI_DatabaseApplyTransformW( package->db, xforms[i], 0 );
}
msi_free( xforms );
msi_free( xform_list );
return r;
}
/****************************************************
* TOP level entry points
*****************************************************/
......@@ -618,6 +642,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
msi_parse_command_line( package, szCommandLine );
msi_apply_transforms( package );
msi_apply_patches( package );
if ( msi_get_property_int(package, szUILevel, 0) >= INSTALLUILEVEL_REDUCED )
......
......@@ -317,6 +317,8 @@ extern UINT read_raw_stream_data( MSIDATABASE*, LPCWSTR stname,
/* transform functions */
extern UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg );
extern UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
LPCWSTR szTransformFile, int iErrorCond );
/* action internals */
extern UINT MSI_InstallPackage( MSIPACKAGE *, LPCWSTR, LPCWSTR );
......
......@@ -647,7 +647,7 @@ MSIHANDLE WINAPI MsiGetLastErrorRecord( void )
DEFINE_GUID( CLSID_MsiTransform, 0x000c1082, 0x0000, 0x0000, 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
static UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
LPCWSTR szTransformFile, int iErrorCond )
{
UINT r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment