msi: Never defer standard actions.
This commit is contained in:
parent
ac924566fb
commit
ad971803da
|
@ -814,7 +814,7 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
|
||||||
if (needs_ui_sequence(package))
|
if (needs_ui_sequence(package))
|
||||||
rc = ACTION_PerformUIAction(package, action, -1);
|
rc = ACTION_PerformUIAction(package, action, -1);
|
||||||
else
|
else
|
||||||
rc = ACTION_PerformAction(package, action, -1, FALSE);
|
rc = ACTION_PerformAction(package, action, -1);
|
||||||
|
|
||||||
msi_dialog_check_messages( NULL );
|
msi_dialog_check_messages( NULL );
|
||||||
|
|
||||||
|
@ -1618,7 +1618,7 @@ static UINT execute_script(MSIPACKAGE *package, UINT script )
|
||||||
action = package->script->Actions[script][i];
|
action = package->script->Actions[script][i];
|
||||||
ui_actionstart(package, action);
|
ui_actionstart(package, action);
|
||||||
TRACE("Executing Action (%s)\n",debugstr_w(action));
|
TRACE("Executing Action (%s)\n",debugstr_w(action));
|
||||||
rc = ACTION_PerformAction(package, action, script, TRUE);
|
rc = ACTION_PerformAction(package, action, script);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -7319,47 +7319,27 @@ StandardActions[] =
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static BOOL ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action,
|
static BOOL ACTION_HandleStandardAction( MSIPACKAGE *package, LPCWSTR action, UINT *rc )
|
||||||
UINT* rc, BOOL force )
|
|
||||||
{
|
{
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
BOOL run = force;
|
UINT i;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!run && !package->script->CurrentlyScripting)
|
|
||||||
run = TRUE;
|
|
||||||
|
|
||||||
if (!run)
|
|
||||||
{
|
|
||||||
if (strcmpW(action,szInstallFinalize) == 0 ||
|
|
||||||
strcmpW(action,szInstallExecute) == 0 ||
|
|
||||||
strcmpW(action,szInstallExecuteAgain) == 0)
|
|
||||||
run = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (StandardActions[i].action != NULL)
|
while (StandardActions[i].action != NULL)
|
||||||
{
|
{
|
||||||
if (strcmpW(StandardActions[i].action, action)==0)
|
if (!strcmpW( StandardActions[i].action, action ))
|
||||||
{
|
{
|
||||||
if (!run)
|
ui_actionstart( package, action );
|
||||||
|
if (StandardActions[i].handler)
|
||||||
{
|
{
|
||||||
ui_actioninfo(package, action, TRUE, 0);
|
ui_actioninfo( package, action, TRUE, 0 );
|
||||||
*rc = schedule_action(package,INSTALL_SCRIPT,action);
|
*rc = StandardActions[i].handler( package );
|
||||||
ui_actioninfo(package, action, FALSE, *rc);
|
ui_actioninfo( package, action, FALSE, *rc );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui_actionstart(package, action);
|
FIXME("unhandled standard action %s\n", debugstr_w(action));
|
||||||
if (StandardActions[i].handler)
|
*rc = ERROR_SUCCESS;
|
||||||
{
|
|
||||||
*rc = StandardActions[i].handler(package);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FIXME("unhandled standard action %s\n",debugstr_w(action));
|
|
||||||
*rc = ERROR_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
|
@ -7369,17 +7349,17 @@ static BOOL ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script, BOOL force)
|
UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script)
|
||||||
{
|
{
|
||||||
UINT rc = ERROR_SUCCESS;
|
UINT rc = ERROR_SUCCESS;
|
||||||
BOOL handled;
|
BOOL handled;
|
||||||
|
|
||||||
TRACE("Performing action (%s)\n", debugstr_w(action));
|
TRACE("Performing action (%s)\n", debugstr_w(action));
|
||||||
|
|
||||||
handled = ACTION_HandleStandardAction(package, action, &rc, force);
|
handled = ACTION_HandleStandardAction(package, action, &rc);
|
||||||
|
|
||||||
if (!handled)
|
if (!handled)
|
||||||
handled = ACTION_HandleCustomAction(package, action, &rc, script, force);
|
handled = ACTION_HandleCustomAction(package, action, &rc, script, TRUE);
|
||||||
|
|
||||||
if (!handled)
|
if (!handled)
|
||||||
{
|
{
|
||||||
|
@ -7397,7 +7377,7 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT scrip
|
||||||
|
|
||||||
TRACE("Performing action (%s)\n", debugstr_w(action));
|
TRACE("Performing action (%s)\n", debugstr_w(action));
|
||||||
|
|
||||||
handled = ACTION_HandleStandardAction(package, action, &rc,TRUE);
|
handled = ACTION_HandleStandardAction(package, action, &rc);
|
||||||
|
|
||||||
if (!handled)
|
if (!handled)
|
||||||
handled = ACTION_HandleCustomAction(package, action, &rc, script, FALSE);
|
handled = ACTION_HandleCustomAction(package, action, &rc, script, FALSE);
|
||||||
|
@ -7462,7 +7442,7 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq)
|
||||||
if (needs_ui_sequence(package))
|
if (needs_ui_sequence(package))
|
||||||
rc = ACTION_PerformUIAction(package, action, -1);
|
rc = ACTION_PerformUIAction(package, action, -1);
|
||||||
else
|
else
|
||||||
rc = ACTION_PerformAction(package, action, -1, FALSE);
|
rc = ACTION_PerformAction(package, action, -1);
|
||||||
|
|
||||||
msiobj_release(&row->hdr);
|
msiobj_release(&row->hdr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ static UINT ControlEvent_SpawnWaitDialog(MSIPACKAGE* package, LPCWSTR argument,
|
||||||
static UINT ControlEvent_DoAction(MSIPACKAGE* package, LPCWSTR argument,
|
static UINT ControlEvent_DoAction(MSIPACKAGE* package, LPCWSTR argument,
|
||||||
msi_dialog* dialog)
|
msi_dialog* dialog)
|
||||||
{
|
{
|
||||||
ACTION_PerformAction(package,argument,-1,TRUE);
|
ACTION_PerformAction(package, argument, -1);
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -865,7 +865,7 @@ extern WCHAR gszLogFile[MAX_PATH];
|
||||||
extern HINSTANCE msi_hInstance;
|
extern HINSTANCE msi_hInstance;
|
||||||
|
|
||||||
/* action related functions */
|
/* action related functions */
|
||||||
extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script, BOOL force);
|
extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script);
|
||||||
extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT script);
|
extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT script);
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue