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
3807a917
Commit
3807a917
authored
Aug 25, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix the logic to determine the appropriate action of the feature.
parent
63064f7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
19 deletions
+44
-19
msipriv.h
dlls/msi/msipriv.h
+36
-2
package.c
dlls/msi/tests/package.c
+8
-17
No files found.
dlls/msi/msipriv.h
View file @
3807a917
...
...
@@ -855,8 +855,42 @@ extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, UINT sc
static
inline
void
msi_feature_set_state
(
MSIFEATURE
*
feature
,
INSTALLSTATE
state
)
{
feature
->
ActionRequest
=
state
;
feature
->
Action
=
state
;
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
;
}
}
static
inline
void
msi_component_set_state
(
MSICOMPONENT
*
comp
,
INSTALLSTATE
state
)
...
...
dlls/msi/tests/package.c
View file @
3807a917
...
...
@@ -3027,20 +3027,14 @@ static void test_states(void)
r
=
MsiGetFeatureState
(
hpkg
,
"six"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"seven"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
@@ -3766,20 +3760,14 @@ static void test_states(void)
r
=
MsiGetFeatureState
(
hpkg
,
"six"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"seven"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
@@ -5974,7 +5962,10 @@ static void test_featureparents(void)
r
=
MsiGetFeatureState
(
hpkg
,
"orion"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected orion INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
ok
(
action
==
INSTALLSTATE_ABSENT
,
"Expected orion INSTALLSTATE_ABSENT, got %d
\n
"
,
action
);
todo_wine
{
ok
(
action
==
INSTALLSTATE_ABSENT
,
"Expected orion INSTALLSTATE_ABSENT, got %d
\n
"
,
action
);
}
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
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