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
42115638
Commit
42115638
authored
Aug 18, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Use MsiQueryComponent state to determine the component's state.
parent
10a2a5ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
action.c
dlls/msi/action.c
+15
-8
package.c
dlls/msi/tests/package.c
+6
-3
No files found.
dlls/msi/action.c
View file @
42115638
...
...
@@ -1693,19 +1693,26 @@ static UINT ACTION_FileCost(MSIPACKAGE *package)
static
void
ACTION_GetComponentInstallStates
(
MSIPACKAGE
*
package
)
{
MSICOMPONENT
*
comp
;
INSTALLSTATE
state
;
UINT
r
;
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
INSTALLSTATE
res
;
state
=
MsiQueryProductStateW
(
package
->
ProductCode
);
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
if
(
!
comp
->
ComponentId
)
continue
;
res
=
MsiGetComponentPathW
(
package
->
ProductCode
,
comp
->
ComponentId
,
NULL
,
NULL
);
if
(
res
<
0
)
res
=
INSTALLSTATE_ABSENT
;
comp
->
Installed
=
res
;
if
(
state
!=
INSTALLSTATE_LOCAL
&&
state
!=
INSTALLSTATE_DEFAULT
)
comp
->
Installed
=
INSTALLSTATE_ABSENT
;
else
{
r
=
MsiQueryComponentStateW
(
package
->
ProductCode
,
NULL
,
package
->
Context
,
comp
->
ComponentId
,
&
comp
->
Installed
);
if
(
r
!=
ERROR_SUCCESS
)
comp
->
Installed
=
INSTALLSTATE_ABSENT
;
}
}
}
...
...
dlls/msi/tests/package.c
View file @
42115638
...
...
@@ -3794,7 +3794,10 @@ static void test_states(void)
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"five"
,
&
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
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
}
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
...
...
@@ -4592,9 +4595,9 @@ static void test_states(void)
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"five"
,
&
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
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
...
...
@@ -5393,9 +5396,9 @@ static void test_states(void)
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"five"
,
&
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
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
...
...
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