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
5a3c3b6a
Commit
5a3c3b6a
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 MsiQueryFeatureState to determine the feature's state.
parent
42115638
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
51 deletions
+9
-51
action.c
dlls/msi/action.c
+9
-30
package.c
dlls/msi/tests/package.c
+0
-21
No files found.
dlls/msi/action.c
View file @
5a3c3b6a
...
@@ -1716,43 +1716,23 @@ static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
...
@@ -1716,43 +1716,23 @@ static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
}
}
}
}
/* scan for and update current install states */
static
void
ACTION_GetFeatureInstallStates
(
MSIPACKAGE
*
package
)
static
void
ACTION_UpdateFeatureInstallStates
(
MSIPACKAGE
*
package
)
{
{
MSICOMPONENT
*
comp
;
MSIFEATURE
*
feature
;
MSIFEATURE
*
feature
;
INSTALLSTATE
state
;
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
state
=
MsiQueryProductStateW
(
package
->
ProductCode
);
{
ComponentList
*
cl
;
INSTALLSTATE
res
=
INSTALLSTATE_ABSENT
;
LIST_FOR_EACH_ENTRY
(
cl
,
&
feature
->
Components
,
ComponentList
,
entry
)
{
comp
=
cl
->
component
;
if
(
!
comp
->
ComponentId
)
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
{
res
=
INSTALLSTATE_ABSENT
;
if
(
state
!=
INSTALLSTATE_LOCAL
&&
state
!=
INSTALLSTATE_DEFAULT
)
break
;
feature
->
Installed
=
INSTALLSTATE_ABSENT
;
}
if
(
res
==
INSTALLSTATE_ABSENT
)
res
=
comp
->
Installed
;
else
else
{
{
if
(
res
==
comp
->
Installed
)
feature
->
Installed
=
MsiQueryFeatureStateW
(
package
->
ProductCode
,
continue
;
feature
->
Feature
);
if
(
res
!=
INSTALLSTATE_DEFAULT
&&
res
!=
INSTALLSTATE_LOCAL
&&
res
!=
INSTALLSTATE_SOURCE
)
{
res
=
INSTALLSTATE_INCOMPLETE
;
}
}
}
}
}
feature
->
Installed
=
res
;
}
}
}
static
BOOL
process_state_property
(
MSIPACKAGE
*
package
,
LPCWSTR
property
,
static
BOOL
process_state_property
(
MSIPACKAGE
*
package
,
LPCWSTR
property
,
...
@@ -2202,6 +2182,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
...
@@ -2202,6 +2182,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
/* read components states from the registry */
/* read components states from the registry */
ACTION_GetComponentInstallStates
(
package
);
ACTION_GetComponentInstallStates
(
package
);
ACTION_GetFeatureInstallStates
(
package
);
TRACE
(
"File calculations
\n
"
);
TRACE
(
"File calculations
\n
"
);
msi_check_file_install_states
(
package
);
msi_check_file_install_states
(
package
);
...
@@ -2238,8 +2219,6 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
...
@@ -2238,8 +2219,6 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
/* FIXME: check volume disk space */
/* FIXME: check volume disk space */
MSI_SetPropertyW
(
package
,
szOutOfDiskSpace
,
szZero
);
MSI_SetPropertyW
(
package
,
szOutOfDiskSpace
,
szZero
);
ACTION_UpdateFeatureInstallStates
(
package
);
return
MSI_SetFeatureStates
(
package
);
return
MSI_SetFeatureStates
(
package
);
}
}
...
...
dlls/msi/tests/package.c
View file @
5a3c3b6a
...
@@ -3774,30 +3774,21 @@ static void test_states(void)
...
@@ -3774,30 +3774,21 @@ static void test_states(void)
action
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"three"
,
&
state
,
&
action
);
r
=
MsiGetFeatureState
(
hpkg
,
"three"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
state
=
0xdeadbee
;
action
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"four"
,
&
state
,
&
action
);
r
=
MsiGetFeatureState
(
hpkg
,
"four"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
state
=
0xdeadbee
;
action
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"five"
,
&
state
,
&
action
);
r
=
MsiGetFeatureState
(
hpkg
,
"five"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
}
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
state
=
0xdeadbee
;
...
@@ -4575,20 +4566,14 @@ static void test_states(void)
...
@@ -4575,20 +4566,14 @@ static void test_states(void)
action
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"three"
,
&
state
,
&
action
);
r
=
MsiGetFeatureState
(
hpkg
,
"three"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
state
=
0xdeadbee
;
action
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"four"
,
&
state
,
&
action
);
r
=
MsiGetFeatureState
(
hpkg
,
"four"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
state
=
0xdeadbee
;
...
@@ -5376,21 +5361,15 @@ static void test_states(void)
...
@@ -5376,21 +5361,15 @@ static void test_states(void)
action
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"three"
,
&
state
,
&
action
);
r
=
MsiGetFeatureState
(
hpkg
,
"three"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
ok
(
action
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
state
=
0xdeadbee
;
action
=
0xdeadbee
;
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"four"
,
&
state
,
&
action
);
r
=
MsiGetFeatureState
(
hpkg
,
"four"
,
&
state
,
&
action
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
ok
(
state
==
INSTALLSTATE_LOCAL
,
"Expected INSTALLSTATE_LOCAL, got %d
\n
"
,
state
);
}
state
=
0xdeadbee
;
state
=
0xdeadbee
;
action
=
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