Hans Leidekker : msi: Don' t inline msi_feature_set_state and msi_component_set_state.
Alexandre Julliard
julliard at winehq.org
Fri Oct 22 12:30:45 CDT 2010
Module: wine
Branch: master
Commit: ded22a58c0f6b47a2e9de10d6d414182e7153ffc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ded22a58c0f6b47a2e9de10d6d414182e7153ffc
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Oct 22 10:35:59 2010 +0200
msi: Don't inline msi_feature_set_state and msi_component_set_state.
---
dlls/msi/action.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++
dlls/msi/msipriv.h | 98 +--------------------------------------------------
2 files changed, 94 insertions(+), 96 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index c47e68a..80e1418 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -169,6 +169,98 @@ static const WCHAR szWriteEnvironmentStrings[] =
* helper functions
********************************************************/
+void msi_feature_set_state( MSIPACKAGE *package, MSIFEATURE *feature, INSTALLSTATE state )
+{
+ if (!package->ProductCode)
+ {
+ feature->ActionRequest = state;
+ feature->Action = state;
+ }
+ else if (state == INSTALLSTATE_ABSENT)
+ {
+ switch (feature->Installed)
+ {
+ case INSTALLSTATE_ABSENT:
+ feature->ActionRequest = INSTALLSTATE_UNKNOWN;
+ feature->Action = INSTALLSTATE_UNKNOWN;
+ break;
+ default:
+ feature->ActionRequest = state;
+ feature->Action = state;
+ }
+ }
+ else if (state == INSTALLSTATE_SOURCE)
+ {
+ switch (feature->Installed)
+ {
+ case INSTALLSTATE_ABSENT:
+ case INSTALLSTATE_SOURCE:
+ feature->ActionRequest = state;
+ feature->Action = state;
+ break;
+ case INSTALLSTATE_LOCAL:
+ feature->ActionRequest = INSTALLSTATE_LOCAL;
+ feature->Action = INSTALLSTATE_LOCAL;
+ break;
+ default:
+ feature->ActionRequest = INSTALLSTATE_UNKNOWN;
+ feature->Action = INSTALLSTATE_UNKNOWN;
+ }
+ }
+ else
+ {
+ feature->ActionRequest = state;
+ feature->Action = state;
+ }
+ if (feature->Attributes & msidbFeatureAttributesUIDisallowAbsent)
+ {
+ feature->Action = INSTALLSTATE_UNKNOWN;
+ }
+}
+
+void msi_component_set_state( MSIPACKAGE *package, MSICOMPONENT *comp, INSTALLSTATE state )
+{
+ if (!package->ProductCode)
+ {
+ comp->ActionRequest = state;
+ comp->Action = state;
+ }
+ else if (state == INSTALLSTATE_ABSENT)
+ {
+ switch (comp->Installed)
+ {
+ case INSTALLSTATE_LOCAL:
+ case INSTALLSTATE_SOURCE:
+ case INSTALLSTATE_DEFAULT:
+ comp->ActionRequest = state;
+ comp->Action = state;
+ break;
+ default:
+ comp->ActionRequest = INSTALLSTATE_UNKNOWN;
+ comp->Action = INSTALLSTATE_UNKNOWN;
+ }
+ }
+ else if (state == INSTALLSTATE_SOURCE)
+ {
+ if (comp->Installed == INSTALLSTATE_ABSENT ||
+ (comp->Installed == INSTALLSTATE_SOURCE && comp->hasLocalFeature))
+ {
+ comp->ActionRequest = state;
+ comp->Action = state;
+ }
+ else
+ {
+ comp->ActionRequest = INSTALLSTATE_UNKNOWN;
+ comp->Action = INSTALLSTATE_UNKNOWN;
+ }
+ }
+ else
+ {
+ comp->ActionRequest = state;
+ comp->Action = state;
+ }
+}
+
static void ui_actionstart(MSIPACKAGE *package, LPCWSTR action)
{
static const WCHAR Query_t[] =
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 6f0b551..30910de 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -888,102 +888,6 @@ extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UIN
extern void ACTION_FinishCustomActions( const MSIPACKAGE* package);
extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, UINT script, BOOL execute);
-static inline void msi_feature_set_state(MSIPACKAGE *package,
- MSIFEATURE *feature,
- INSTALLSTATE state)
-{
- if (!package->ProductCode)
- {
- feature->ActionRequest = state;
- feature->Action = state;
- }
- else if (state == INSTALLSTATE_ABSENT)
- {
- switch (feature->Installed)
- {
- case INSTALLSTATE_ABSENT:
- feature->ActionRequest = INSTALLSTATE_UNKNOWN;
- feature->Action = INSTALLSTATE_UNKNOWN;
- break;
- default:
- feature->ActionRequest = state;
- feature->Action = state;
- }
- }
- else if (state == INSTALLSTATE_SOURCE)
- {
- switch (feature->Installed)
- {
- case INSTALLSTATE_ABSENT:
- case INSTALLSTATE_SOURCE:
- feature->ActionRequest = state;
- feature->Action = state;
- break;
- case INSTALLSTATE_LOCAL:
- feature->ActionRequest = INSTALLSTATE_LOCAL;
- feature->Action = INSTALLSTATE_LOCAL;
- break;
- default:
- feature->ActionRequest = INSTALLSTATE_UNKNOWN;
- feature->Action = INSTALLSTATE_UNKNOWN;
- }
- }
- else
- {
- feature->ActionRequest = state;
- feature->Action = state;
- }
- if (feature->Attributes & msidbFeatureAttributesUIDisallowAbsent)
- {
- feature->Action = INSTALLSTATE_UNKNOWN;
- }
-}
-
-static inline void msi_component_set_state(MSIPACKAGE *package,
- MSICOMPONENT *comp,
- INSTALLSTATE state)
-{
- if (!package->ProductCode)
- {
- comp->ActionRequest = state;
- comp->Action = state;
- }
- else if (state == INSTALLSTATE_ABSENT)
- {
- switch (comp->Installed)
- {
- case INSTALLSTATE_LOCAL:
- case INSTALLSTATE_SOURCE:
- case INSTALLSTATE_DEFAULT:
- comp->ActionRequest = state;
- comp->Action = state;
- break;
- default:
- comp->ActionRequest = INSTALLSTATE_UNKNOWN;
- comp->Action = INSTALLSTATE_UNKNOWN;
- }
- }
- else if (state == INSTALLSTATE_SOURCE)
- {
- if (comp->Installed == INSTALLSTATE_ABSENT ||
- (comp->Installed == INSTALLSTATE_SOURCE && comp->hasLocalFeature))
- {
- comp->ActionRequest = state;
- comp->Action = state;
- }
- else
- {
- comp->ActionRequest = INSTALLSTATE_UNKNOWN;
- comp->Action = INSTALLSTATE_UNKNOWN;
- }
- }
- else
- {
- comp->ActionRequest = state;
- comp->Action = state;
- }
-}
-
/* actions in other modules */
extern UINT ACTION_AppSearch(MSIPACKAGE *package);
extern UINT ACTION_CCPSearch(MSIPACKAGE *package);
@@ -1035,6 +939,8 @@ extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value);
extern UINT msi_get_local_package_name(LPWSTR path, LPCWSTR suffix);
extern UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace);
+extern void msi_component_set_state(MSIPACKAGE *, MSICOMPONENT *, INSTALLSTATE);
+extern void msi_feature_set_state(MSIPACKAGE *, MSIFEATURE *, INSTALLSTATE);
/* media */
More information about the wine-cvs
mailing list