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
c855fbfc
Commit
c855fbfc
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: Don't install a feature that is disabled.
parent
9288055b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
action.c
dlls/msi/action.c
+16
-11
package.c
dlls/msi/tests/package.c
+4
-10
No files found.
dlls/msi/action.c
View file @
c855fbfc
...
...
@@ -1735,10 +1735,11 @@ static void ACTION_GetFeatureInstallStates(MSIPACKAGE *package)
}
}
static
BOOL
process_state_property
(
MSIPACKAGE
*
package
,
LPCWSTR
property
,
INSTALLSTATE
state
)
static
BOOL
process_state_property
(
MSIPACKAGE
*
package
,
int
level
,
LPCWSTR
property
,
INSTALLSTATE
state
)
{
static
const
WCHAR
all
[]
=
{
'A'
,
'L'
,
'L'
,
0
};
static
const
WCHAR
remove
[]
=
{
'R'
,
'E'
,
'M'
,
'O'
,
'V'
,
'E'
,
0
};
LPWSTR
override
;
MSIFEATURE
*
feature
;
...
...
@@ -1748,6 +1749,10 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property,
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
if
(
lstrcmpW
(
property
,
remove
)
&&
(
feature
->
Level
<=
0
||
feature
->
Level
>
level
))
continue
;
if
(
strcmpiW
(
override
,
all
)
==
0
)
msi_feature_set_state
(
feature
,
state
);
else
...
...
@@ -1760,7 +1765,7 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property,
if
((
ptr2
&&
strncmpW
(
ptr
,
feature
->
Feature
,
ptr2
-
ptr
)
==
0
)
||
(
!
ptr2
&&
strcmpW
(
ptr
,
feature
->
Feature
)
==
0
))
{
msi_feature_set_state
(
feature
,
state
);
msi_feature_set_state
(
feature
,
state
);
break
;
}
if
(
ptr2
)
...
...
@@ -1780,7 +1785,7 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property,
UINT
MSI_SetFeatureStates
(
MSIPACKAGE
*
package
)
{
int
install_
level
;
int
level
;
static
const
WCHAR
szlevel
[]
=
{
'I'
,
'N'
,
'S'
,
'T'
,
'A'
,
'L'
,
'L'
,
'L'
,
'E'
,
'V'
,
'E'
,
'L'
,
0
};
static
const
WCHAR
szAddLocal
[]
=
...
...
@@ -1800,7 +1805,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
TRACE
(
"Checking Install Level
\n
"
);
install_level
=
msi_get_property_int
(
package
,
szlevel
,
1
);
level
=
msi_get_property_int
(
package
,
szlevel
,
1
);
/* ok here is the _real_ rub
* all these activation/deactivation things happen in order and things
...
...
@@ -1821,17 +1826,17 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
* REMOVE are the big ones, since we don't handle administrative installs
* yet anyway.
*/
override
|=
process_state_property
(
package
,
szAddLocal
,
INSTALLSTATE_LOCAL
);
override
|=
process_state_property
(
package
,
szRemove
,
INSTALLSTATE_ABSENT
);
override
|=
process_state_property
(
package
,
szAddSource
,
INSTALLSTATE_SOURCE
);
override
|=
process_state_property
(
package
,
szReinstall
,
INSTALLSTATE_LOCAL
);
override
|=
process_state_property
(
package
,
level
,
szAddLocal
,
INSTALLSTATE_LOCAL
);
override
|=
process_state_property
(
package
,
level
,
szRemove
,
INSTALLSTATE_ABSENT
);
override
|=
process_state_property
(
package
,
level
,
szAddSource
,
INSTALLSTATE_SOURCE
);
override
|=
process_state_property
(
package
,
level
,
szReinstall
,
INSTALLSTATE_LOCAL
);
if
(
!
override
)
{
LIST_FOR_EACH_ENTRY
(
feature
,
&
package
->
features
,
MSIFEATURE
,
entry
)
{
BOOL
feature_state
=
((
feature
->
Level
>
0
)
&&
(
feature
->
Level
<=
install_
level
));
(
feature
->
Level
<=
level
));
if
((
feature_state
)
&&
(
feature
->
Action
==
INSTALLSTATE_UNKNOWN
))
{
...
...
@@ -1849,7 +1854,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
{
FeatureList
*
fl
;
if
(
feature
->
Level
>
0
&&
feature
->
Level
<=
install_
level
)
if
(
feature
->
Level
>
0
&&
feature
->
Level
<=
level
)
continue
;
LIST_FOR_EACH_ENTRY
(
fl
,
&
feature
->
Children
,
FeatureList
,
entry
)
...
...
dlls/msi/tests/package.c
View file @
c855fbfc
...
...
@@ -4481,11 +4481,8 @@ static void test_states(void)
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"five"
,
&
state
,
&
action
);
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
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
state
=
0xdeadbee
;
action
=
0xdeadbee
;
...
...
@@ -5213,11 +5210,8 @@ static void test_states(void)
action
=
0xdeadbee
;
r
=
MsiGetFeatureState
(
hpkg
,
"five"
,
&
state
,
&
action
);
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
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
action
);
}
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
ok
(
action
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, 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