Module: wine Branch: master Commit: c32d9d7004e51be50a405dc69b671dbb3ca3a7b2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c32d9d7004e51be50a405dc69b...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Feb 16 11:45:05 2010 +0100
msi: Get rid of ACTION_VerifyFeatureForAction.
---
dlls/msi/action.c | 11 +++++------ dlls/msi/classes.c | 23 ++++++++++++----------- dlls/msi/helpers.c | 11 ----------- dlls/msi/msipriv.h | 1 - 4 files changed, 17 insertions(+), 29 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f9823fe..7bb4e52 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -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 ) diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index 6ca35b9..acd8429 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -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; }
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index df25c3e..e763a11 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -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,'|'); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 8c77a9f..5ea707f 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -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);