Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
1ab83018
Commit
1ab83018
authored
May 20, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
May 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Execute the rollback script if the installation failed.
parent
0f5cb14a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
20 deletions
+36
-20
action.c
dlls/msi/action.c
+36
-14
custom.c
dlls/msi/custom.c
+0
-6
No files found.
dlls/msi/action.c
View file @
1ab83018
...
...
@@ -2316,28 +2316,40 @@ static UINT ACTION_CostInitialize(MSIPACKAGE *package)
return
ERROR_SUCCESS
;
}
static
UINT
execute_script
(
MSIPACKAGE
*
package
,
UINT
script
)
static
UINT
execute_script
_action
(
MSIPACKAGE
*
package
,
UINT
script
,
UINT
index
)
{
UINT
i
;
UINT
rc
=
ERROR_SUCCESS
;
const
WCHAR
*
action
=
package
->
script
->
Actions
[
script
][
index
];
ui_actionstart
(
package
,
action
);
TRACE
(
"executing %s
\n
"
,
debugstr_w
(
action
));
return
ACTION_PerformAction
(
package
,
action
,
script
);
}
static
UINT
execute_script
(
MSIPACKAGE
*
package
,
UINT
script
)
{
UINT
i
,
rc
=
ERROR_SUCCESS
;
TRACE
(
"
Executing Script %i
\n
"
,
script
);
TRACE
(
"
executing script %u
\n
"
,
script
);
if
(
!
package
->
script
)
{
ERR
(
"no script!
\n
"
);
return
ERROR_FUNCTION_FAILED
;
}
for
(
i
=
0
;
i
<
package
->
script
->
ActionCount
[
script
];
i
++
)
if
(
script
==
ROLLBACK_SCRIPT
)
{
LPWSTR
action
;
action
=
package
->
script
->
Actions
[
script
][
i
];
ui_actionstart
(
package
,
action
);
TRACE
(
"Executing Action (%s)
\n
"
,
debugstr_w
(
action
));
rc
=
ACTION_PerformAction
(
package
,
action
,
script
);
if
(
rc
!=
ERROR_SUCCESS
)
break
;
for
(
i
=
package
->
script
->
ActionCount
[
script
];
i
>
0
;
i
--
)
{
rc
=
execute_script_action
(
package
,
script
,
i
-
1
);
if
(
rc
!=
ERROR_SUCCESS
)
break
;
}
}
else
{
for
(
i
=
0
;
i
<
package
->
script
->
ActionCount
[
script
];
i
++
)
{
rc
=
execute_script_action
(
package
,
script
,
i
);
if
(
rc
!=
ERROR_SUCCESS
)
break
;
}
}
msi_free_action_script
(
package
,
script
);
return
rc
;
...
...
@@ -8153,7 +8165,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
LPCWSTR
szCommandLine
)
{
UINT
rc
;
BOOL
ui_exists
;
BOOL
ui_exists
,
needs_rollback
=
FALSE
;
static
const
WCHAR
szDisableRollback
[]
=
{
'D'
,
'I'
,
'S'
,
'A'
,
'B'
,
'L'
,
'E'
,
'R'
,
'O'
,
'L'
,
'L'
,
'B'
,
'A'
,
'C'
,
'K'
,
0
};
static
const
WCHAR
szAction
[]
=
{
'A'
,
'C'
,
'T'
,
'I'
,
'O'
,
'N'
,
0
};
static
const
WCHAR
szInstall
[]
=
{
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
0
};
...
...
@@ -8248,11 +8260,21 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
else
if
(
rc
==
ERROR_INSTALL_SUSPEND
)
ACTION_PerformActionSequence
(
package
,
-
4
);
else
/* failed */
{
ACTION_PerformActionSequence
(
package
,
-
3
);
needs_rollback
=
TRUE
;
}
/* finish up running custom actions */
ACTION_FinishCustomActions
(
package
);
if
(
needs_rollback
&&
!
msi_get_property_int
(
package
->
db
,
szRollbackDisabled
,
0
))
{
WARN
(
"installation failed, running rollback script
\n
"
);
msi_set_property
(
package
->
db
,
szRollbackDisabled
,
NULL
);
execute_script
(
package
,
ROLLBACK_SCRIPT
);
}
if
(
rc
==
ERROR_SUCCESS
&&
package
->
need_reboot
)
return
ERROR_SUCCESS_REBOOT_REQUIRED
;
...
...
dlls/msi/custom.c
View file @
1ab83018
...
...
@@ -328,12 +328,6 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
msi_free
(
actiondata
);
}
if
(
type
&
msidbCustomActionTypeRollback
)
{
FIXME
(
"Rollbacks not supported yet
\n
"
);
rc
=
ERROR_SUCCESS
;
goto
end
;
}
}
else
if
(
!
check_execution_scheduling_options
(
package
,
action
,
type
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment