Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
8a94f7aa
Commit
8a94f7aa
authored
Jun 25, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jun 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement MsiGetMode for MSIRUNMODE_SCHEDULED, MSIRUNMODE_COMMIT and MSIRUNMODE_ROLLBACK.
parent
1a23836f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
20 deletions
+57
-20
action.c
dlls/msi/action.c
+11
-11
custom.c
dlls/msi/custom.c
+19
-1
events.c
dlls/msi/events.c
+1
-1
install.c
dlls/msi/install.c
+13
-1
msi.c
dlls/msi/msi.c
+3
-3
msipriv.h
dlls/msi/msipriv.h
+7
-3
package.c
dlls/msi/package.c
+3
-0
No files found.
dlls/msi/action.c
View file @
8a94f7aa
...
...
@@ -748,9 +748,9 @@ static UINT ACTION_PerformActionSequence(MSIPACKAGE *package, UINT seq, BOOL UI)
}
if
(
UI
)
rc
=
ACTION_PerformUIAction
(
package
,
action
);
rc
=
ACTION_PerformUIAction
(
package
,
action
,
-
1
);
else
rc
=
ACTION_PerformAction
(
package
,
action
,
FALSE
);
rc
=
ACTION_PerformAction
(
package
,
action
,
-
1
,
FALSE
);
end:
msiobj_release
(
&
row
->
hdr
);
}
...
...
@@ -789,9 +789,9 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
}
if
(
iap
->
UI
)
rc
=
ACTION_PerformUIAction
(
iap
->
package
,
action
);
rc
=
ACTION_PerformUIAction
(
iap
->
package
,
action
,
-
1
);
else
rc
=
ACTION_PerformAction
(
iap
->
package
,
action
,
FALSE
);
rc
=
ACTION_PerformAction
(
iap
->
package
,
action
,
-
1
,
FALSE
);
msi_dialog_check_messages
(
NULL
);
...
...
@@ -980,12 +980,12 @@ static BOOL ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action,
}
static
BOOL
ACTION_HandleCustomAction
(
MSIPACKAGE
*
package
,
LPCWSTR
action
,
UINT
*
rc
,
BOOL
force
)
UINT
*
rc
,
UINT
script
,
BOOL
force
)
{
BOOL
ret
=
FALSE
;
UINT
arc
;
arc
=
ACTION_CustomAction
(
package
,
action
,
force
);
arc
=
ACTION_CustomAction
(
package
,
action
,
script
,
force
);
if
(
arc
!=
ERROR_CALL_NOT_IMPLEMENTED
)
{
...
...
@@ -1003,7 +1003,7 @@ static BOOL ACTION_HandleCustomAction( MSIPACKAGE* package, LPCWSTR action,
* But until I get write access to the database that is hard, so I am going to
* hack it to see if I can get something to run.
*/
UINT
ACTION_PerformAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
BOOL
force
)
UINT
ACTION_PerformAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
UINT
script
,
BOOL
force
)
{
UINT
rc
=
ERROR_SUCCESS
;
BOOL
handled
;
...
...
@@ -1013,7 +1013,7 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force)
handled
=
ACTION_HandleStandardAction
(
package
,
action
,
&
rc
,
force
);
if
(
!
handled
)
handled
=
ACTION_HandleCustomAction
(
package
,
action
,
&
rc
,
force
);
handled
=
ACTION_HandleCustomAction
(
package
,
action
,
&
rc
,
script
,
force
);
if
(
!
handled
)
{
...
...
@@ -1024,7 +1024,7 @@ UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force)
return
rc
;
}
UINT
ACTION_PerformUIAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
)
UINT
ACTION_PerformUIAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
UINT
script
)
{
UINT
rc
=
ERROR_SUCCESS
;
BOOL
handled
=
FALSE
;
...
...
@@ -1034,7 +1034,7 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action)
handled
=
ACTION_HandleStandardAction
(
package
,
action
,
&
rc
,
TRUE
);
if
(
!
handled
)
handled
=
ACTION_HandleCustomAction
(
package
,
action
,
&
rc
,
FALSE
);
handled
=
ACTION_HandleCustomAction
(
package
,
action
,
&
rc
,
script
,
FALSE
);
if
(
!
handled
&&
ACTION_DialogBox
(
package
,
action
)
==
ERROR_SUCCESS
)
handled
=
TRUE
;
...
...
@@ -1598,7 +1598,7 @@ static UINT execute_script(MSIPACKAGE *package, UINT script )
action
=
package
->
script
->
Actions
[
script
][
i
];
ui_actionstart
(
package
,
action
);
TRACE
(
"Executing Action (%s)
\n
"
,
debugstr_w
(
action
));
rc
=
ACTION_PerformAction
(
package
,
action
,
TRUE
);
rc
=
ACTION_PerformAction
(
package
,
action
,
script
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
break
;
}
...
...
dlls/msi/custom.c
View file @
8a94f7aa
...
...
@@ -174,7 +174,7 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data)
MSI_SetPropertyW
(
package
,
ProdCode
,
beg
);
}
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
LPCWSTR
action
,
BOOL
execute
)
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
LPCWSTR
action
,
UINT
script
,
BOOL
execute
)
{
UINT
rc
=
ERROR_SUCCESS
;
MSIRECORD
*
row
=
0
;
...
...
@@ -258,6 +258,21 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute)
LPWSTR
actiondata
=
msi_dup_property
(
package
,
action
);
switch
(
script
)
{
case
INSTALL_SCRIPT
:
package
->
scheduled_action_running
=
TRUE
;
break
;
case
COMMIT_SCRIPT
:
package
->
commit_action_running
=
TRUE
;
break
;
case
ROLLBACK_SCRIPT
:
package
->
rollback_action_running
=
TRUE
;
break
;
default:
break
;
}
if
(
deferred_data
)
set_deferred_action_props
(
package
,
deferred_data
);
else
if
(
actiondata
)
...
...
@@ -334,6 +349,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute)
}
end:
package
->
scheduled_action_running
=
FALSE
;
package
->
commit_action_running
=
FALSE
;
package
->
rollback_action_running
=
FALSE
;
msi_free
(
action_copy
);
msiobj_release
(
&
row
->
hdr
);
return
rc
;
...
...
dlls/msi/events.c
View file @
8a94f7aa
...
...
@@ -168,7 +168,7 @@ static UINT ControlEvent_SpawnWaitDialog(MSIPACKAGE* package, LPCWSTR argument,
static
UINT
ControlEvent_DoAction
(
MSIPACKAGE
*
package
,
LPCWSTR
argument
,
msi_dialog
*
dialog
)
{
ACTION_PerformAction
(
package
,
argument
,
TRUE
);
ACTION_PerformAction
(
package
,
argument
,
-
1
,
TRUE
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/install.c
View file @
8a94f7aa
...
...
@@ -69,7 +69,7 @@ UINT WINAPI MsiDoActionW( MSIHANDLE hInstall, LPCWSTR szAction )
if
(
!
package
)
return
ERROR_INVALID_HANDLE
;
ret
=
ACTION_PerformUIAction
(
package
,
szAction
);
ret
=
ACTION_PerformUIAction
(
package
,
szAction
,
-
1
);
msiobj_release
(
&
package
->
hdr
);
return
ret
;
...
...
@@ -452,8 +452,13 @@ UINT WINAPI MsiSetTargetPathW(MSIHANDLE hInstall, LPCWSTR szFolder,
*/
BOOL
WINAPI
MsiGetMode
(
MSIHANDLE
hInstall
,
MSIRUNMODE
iRunMode
)
{
MSIPACKAGE
*
package
;
BOOL
r
=
FALSE
;
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
if
(
!
package
)
return
FALSE
;
switch
(
iRunMode
)
{
case
MSIRUNMODE_WINDOWS9X
:
...
...
@@ -467,8 +472,15 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode)
break
;
case
MSIRUNMODE_SCHEDULED
:
r
=
package
->
scheduled_action_running
;
break
;
case
MSIRUNMODE_ROLLBACK
:
r
=
package
->
rollback_action_running
;
break
;
case
MSIRUNMODE_COMMIT
:
r
=
package
->
commit_action_running
;
break
;
default:
...
...
dlls/msi/msi.c
View file @
8a94f7aa
...
...
@@ -1765,7 +1765,7 @@ UINT WINAPI MsiCollectUserInfoW(LPCWSTR szProduct)
return
ERROR_INVALID_PARAMETER
;
package
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_PACKAGE
);
rc
=
ACTION_PerformUIAction
(
package
,
szFirstRun
);
rc
=
ACTION_PerformUIAction
(
package
,
szFirstRun
,
-
1
);
msiobj_release
(
&
package
->
hdr
);
MsiCloseHandle
(
handle
);
...
...
@@ -1787,7 +1787,7 @@ UINT WINAPI MsiCollectUserInfoA(LPCSTR szProduct)
return
ERROR_INVALID_PARAMETER
;
package
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_PACKAGE
);
rc
=
ACTION_PerformUIAction
(
package
,
szFirstRun
);
rc
=
ACTION_PerformUIAction
(
package
,
szFirstRun
,
-
1
);
msiobj_release
(
&
package
->
hdr
);
MsiCloseHandle
(
handle
);
...
...
@@ -1869,7 +1869,7 @@ UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLST
MsiSetInternalUI
(
INSTALLUILEVEL_BASIC
,
NULL
);
r
=
ACTION_PerformUIAction
(
package
,
szCostInit
);
r
=
ACTION_PerformUIAction
(
package
,
szCostInit
,
-
1
);
if
(
r
!=
ERROR_SUCCESS
)
goto
end
;
...
...
dlls/msi/msipriv.h
View file @
8a94f7aa
...
...
@@ -248,6 +248,10 @@ typedef struct tagMSIPACKAGE
UINT
WordCount
;
struct
list
subscriptions
;
unsigned
char
scheduled_action_running
:
1
;
unsigned
char
commit_action_running
:
1
;
unsigned
char
rollback_action_running
:
1
;
}
MSIPACKAGE
;
typedef
struct
tagMSIPREVIEW
...
...
@@ -731,10 +735,10 @@ extern WCHAR gszLogFile[MAX_PATH];
extern
HINSTANCE
msi_hInstance
;
/* action related functions */
extern
UINT
ACTION_PerformAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
BOOL
force
);
extern
UINT
ACTION_PerformUIAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
);
extern
UINT
ACTION_PerformAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
UINT
script
,
BOOL
force
);
extern
UINT
ACTION_PerformUIAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
UINT
script
);
extern
void
ACTION_FinishCustomActions
(
const
MSIPACKAGE
*
package
);
extern
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
BOOL
execute
);
extern
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
const
WCHAR
*
action
,
UINT
script
,
BOOL
execute
);
static
inline
void
msi_feature_set_state
(
MSIFEATURE
*
feature
,
INSTALLSTATE
state
)
{
...
...
dlls/msi/package.c
View file @
8a94f7aa
...
...
@@ -702,6 +702,9 @@ static MSIPACKAGE *msi_alloc_package( void )
package
->
LastAction
=
NULL
;
package
->
dialog
=
NULL
;
package
->
next_dialog
=
NULL
;
package
->
scheduled_action_running
=
FALSE
;
package
->
commit_action_running
=
FALSE
;
package
->
rollback_action_running
=
FALSE
;
}
return
package
;
...
...
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