Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
3807a917
Commit
3807a917
authored
16 years ago
by
James Hawkins
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Fix the logic to determine the appropriate action of the feature.
parent
63064f7a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msi/msipriv.h
+36
-2
36 additions, 2 deletions
dlls/msi/msipriv.h
dlls/msi/tests/package.c
+8
-17
8 additions, 17 deletions
dlls/msi/tests/package.c
with
44 additions
and
19 deletions
dlls/msi/msipriv.h
+
36
−
2
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
)
...
...
This diff is collapsed.
Click to expand it.
dlls/msi/tests/package.c
+
8
−
17
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment