msi: Don't inline msi_feature_set_state and msi_component_set_state.
This commit is contained in:
parent
e01455d41d
commit
ded22a58c0
@ -169,6 +169,98 @@ static const WCHAR szWriteEnvironmentStrings[] =
|
|||||||
* helper functions
|
* 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 void ui_actionstart(MSIPACKAGE *package, LPCWSTR action)
|
||||||
{
|
{
|
||||||
static const WCHAR Query_t[] =
|
static const WCHAR Query_t[] =
|
||||||
|
@ -888,102 +888,6 @@ extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UIN
|
|||||||
extern void ACTION_FinishCustomActions( const MSIPACKAGE* package);
|
extern void ACTION_FinishCustomActions( const MSIPACKAGE* package);
|
||||||
extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, UINT script, BOOL execute);
|
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 */
|
/* actions in other modules */
|
||||||
extern UINT ACTION_AppSearch(MSIPACKAGE *package);
|
extern UINT ACTION_AppSearch(MSIPACKAGE *package);
|
||||||
extern UINT ACTION_CCPSearch(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);
|
MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value);
|
||||||
extern UINT msi_get_local_package_name(LPWSTR path, LPCWSTR suffix);
|
extern UINT msi_get_local_package_name(LPWSTR path, LPCWSTR suffix);
|
||||||
extern UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace);
|
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 */
|
/* media */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user