msi: Publish patches regardless of any features being installed locally.
This commit is contained in:
parent
cd8e1f8e75
commit
c9fb24927d
|
@ -3770,9 +3770,6 @@ static UINT msi_publish_upgrade_code(MSIPACKAGE *package)
|
||||||
LPWSTR upgrade;
|
LPWSTR upgrade;
|
||||||
WCHAR squashed_pc[SQUISH_GUID_SIZE];
|
WCHAR squashed_pc[SQUISH_GUID_SIZE];
|
||||||
|
|
||||||
static const WCHAR szUpgradeCode[] =
|
|
||||||
{'U','p','g','r','a','d','e','C','o','d','e',0};
|
|
||||||
|
|
||||||
upgrade = msi_dup_property(package->db, szUpgradeCode);
|
upgrade = msi_dup_property(package->db, szUpgradeCode);
|
||||||
if (!upgrade)
|
if (!upgrade)
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -3826,21 +3823,28 @@ static BOOL msi_check_unpublish(MSIPACKAGE *package)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT msi_publish_patches( MSIPACKAGE *package, HKEY prodkey )
|
static UINT msi_publish_patches( MSIPACKAGE *package )
|
||||||
{
|
{
|
||||||
static const WCHAR szAllPatches[] = {'A','l','l','P','a','t','c','h','e','s',0};
|
static const WCHAR szAllPatches[] = {'A','l','l','P','a','t','c','h','e','s',0};
|
||||||
WCHAR patch_squashed[GUID_SIZE];
|
WCHAR patch_squashed[GUID_SIZE];
|
||||||
HKEY patches_key = NULL, product_patches_key;
|
HKEY patches_key = NULL, product_patches_key = NULL, product_key;
|
||||||
LONG res;
|
LONG res;
|
||||||
MSIPATCHINFO *patch;
|
MSIPATCHINFO *patch;
|
||||||
UINT r;
|
UINT r;
|
||||||
WCHAR *p, *all_patches = NULL;
|
WCHAR *p, *all_patches = NULL;
|
||||||
DWORD len = 0;
|
DWORD len = 0;
|
||||||
|
|
||||||
res = RegCreateKeyExW( prodkey, szPatches, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &patches_key, NULL );
|
r = MSIREG_OpenProductKey( package->ProductCode, NULL, package->Context, &product_key, FALSE );
|
||||||
if (res != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
|
||||||
|
res = RegCreateKeyExW( product_key, szPatches, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &patches_key, NULL );
|
||||||
|
if (res != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
r = ERROR_FUNCTION_FAILED;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
r = MSIREG_OpenUserDataProductPatchesKey( package->ProductCode, package->Context, &product_patches_key, TRUE );
|
r = MSIREG_OpenUserDataProductPatchesKey( package->ProductCode, package->Context, &product_patches_key, TRUE );
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -3903,6 +3907,7 @@ static UINT msi_publish_patches( MSIPACKAGE *package, HKEY prodkey )
|
||||||
done:
|
done:
|
||||||
RegCloseKey( product_patches_key );
|
RegCloseKey( product_patches_key );
|
||||||
RegCloseKey( patches_key );
|
RegCloseKey( patches_key );
|
||||||
|
RegCloseKey( product_key );
|
||||||
msi_free( all_patches );
|
msi_free( all_patches );
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -3919,6 +3924,13 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
||||||
HKEY hukey = NULL, hudkey = NULL;
|
HKEY hukey = NULL, hudkey = NULL;
|
||||||
MSIRECORD *uirow;
|
MSIRECORD *uirow;
|
||||||
|
|
||||||
|
if (!list_empty(&package->patches))
|
||||||
|
{
|
||||||
|
rc = msi_publish_patches(package);
|
||||||
|
if (rc != ERROR_SUCCESS)
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: also need to publish if the product is in advertise mode */
|
/* FIXME: also need to publish if the product is in advertise mode */
|
||||||
if (!msi_check_publish(package))
|
if (!msi_check_publish(package))
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -3937,13 +3949,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if (!list_empty(&package->patches))
|
|
||||||
{
|
|
||||||
rc = msi_publish_patches(package, hukey);
|
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = msi_publish_product_properties(package, hukey);
|
rc = msi_publish_product_properties(package, hukey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -4699,9 +4704,6 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
||||||
HKEY upgrade;
|
HKEY upgrade;
|
||||||
UINT rc;
|
UINT rc;
|
||||||
|
|
||||||
static const WCHAR szUpgradeCode[] = {
|
|
||||||
'U','p','g','r','a','d','e','C','o','d','e',0};
|
|
||||||
|
|
||||||
/* FIXME: also need to publish if the product is in advertise mode */
|
/* FIXME: also need to publish if the product is in advertise mode */
|
||||||
if (!msi_check_publish(package))
|
if (!msi_check_publish(package))
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
|
@ -1119,6 +1119,7 @@ static const WCHAR szInprocHandler32[] = {'I','n','p','r','o','c','H','a','n','d
|
||||||
static const WCHAR szMIMEDatabase[] = {'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\','C','o','n','t','e','n','t',' ','T','y','p','e','\\',0};
|
static const WCHAR szMIMEDatabase[] = {'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\','C','o','n','t','e','n','t',' ','T','y','p','e','\\',0};
|
||||||
static const WCHAR szLocalPackage[] = {'L','o','c','a','l','P','a','c','k','a','g','e',0};
|
static const WCHAR szLocalPackage[] = {'L','o','c','a','l','P','a','c','k','a','g','e',0};
|
||||||
static const WCHAR szOriginalDatabase[] = {'O','r','i','g','i','n','a','l','D','a','t','a','b','a','s','e',0};
|
static const WCHAR szOriginalDatabase[] = {'O','r','i','g','i','n','a','l','D','a','t','a','b','a','s','e',0};
|
||||||
|
static const WCHAR szUpgradeCode[] = {'U','p','g','r','a','d','e','C','o','d','e',0};
|
||||||
|
|
||||||
/* memory allocation macro functions */
|
/* memory allocation macro functions */
|
||||||
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
|
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
|
||||||
|
|
Loading…
Reference in New Issue