Commit c32d9d70 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Get rid of ACTION_VerifyFeatureForAction.

parent 598c5426
......@@ -2619,7 +2619,7 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp )
{
ComponentList *cl;
if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL ))
if (feature->ActionRequest != INSTALLSTATE_LOCAL)
continue;
LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
......@@ -2634,7 +2634,7 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp )
{
ComponentList *cl;
if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ABSENT ))
if (feature->ActionRequest != INSTALLSTATE_ABSENT)
continue;
LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
......@@ -3922,10 +3922,9 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
BOOL absent = FALSE;
MSIRECORD *uirow;
if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL ) &&
!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_SOURCE ) &&
!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ADVERTISED ))
absent = TRUE;
if (feature->ActionRequest != INSTALLSTATE_LOCAL &&
feature->ActionRequest != INSTALLSTATE_SOURCE &&
feature->ActionRequest != INSTALLSTATE_ADVERTISED) absent = TRUE;
size = 1;
LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
......
......@@ -809,16 +809,17 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
continue;
feature = cls->Feature;
if (!feature)
continue;
/*
* MSDN says that these are based on Feature not on Component.
*/
if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL ) &&
!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ADVERTISED ))
if (feature->ActionRequest != INSTALLSTATE_LOCAL &&
feature->ActionRequest != INSTALLSTATE_ADVERTISED )
{
TRACE("Skipping class %s reg due to disabled feature %s\n",
debugstr_w(cls->clsid), debugstr_w(feature->Feature));
TRACE("Feature %s not scheduled for installation, skipping regstration of class %s\n",
debugstr_w(feature->Feature), debugstr_w(cls->clsid));
continue;
}
......@@ -1142,18 +1143,18 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
continue;
feature = ext->Feature;
if (!feature)
continue;
/*
* yes. MSDN says that these are based on _Feature_ not on
* Component. So verify the feature is to be installed
*/
if ((!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL )) &&
!(install_on_demand &&
ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ADVERTISED )))
if (feature->ActionRequest != INSTALLSTATE_LOCAL &&
!(install_on_demand && feature->ActionRequest == INSTALLSTATE_ADVERTISED))
{
TRACE("Skipping extension %s reg due to disabled feature %s\n",
debugstr_w(ext->Extension), debugstr_w(feature->Feature));
TRACE("Feature %s not scheduled for installation, skipping registration of extension %s\n",
debugstr_w(feature->Feature), debugstr_w(ext->Extension));
continue;
}
......
......@@ -604,17 +604,6 @@ void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record)
msiobj_release(&row->hdr);
}
BOOL ACTION_VerifyFeatureForAction( const MSIFEATURE* feature, INSTALLSTATE check )
{
if (!feature)
return FALSE;
if (feature->ActionRequest == check)
return TRUE;
else
return FALSE;
}
void reduce_to_longfilename(WCHAR* filename)
{
LPWSTR p = strchrW(filename,'|');
......
......@@ -982,7 +982,6 @@ extern void msi_free_action_script(MSIPACKAGE *package, UINT script);
extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR);
extern LPWSTR build_directory_name(DWORD , ...);
extern BOOL create_full_pathW(const WCHAR *path);
extern BOOL ACTION_VerifyFeatureForAction(const MSIFEATURE*, INSTALLSTATE);
extern void reduce_to_longfilename(WCHAR*);
extern LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR);
extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature);
......
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