Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
97419aea
Commit
97419aea
authored
Dec 05, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Dec 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Examine the attributes of all features before setting a component's state.
parent
bccab7bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
40 deletions
+72
-40
action.c
dlls/msi/action.c
+68
-40
msipriv.h
dlls/msi/msipriv.h
+4
-0
No files found.
dlls/msi/action.c
View file @
97419aea
...
...
@@ -1786,7 +1786,19 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
ComponentList
*
cl
;
TRACE
(
"Examining Feature %s (Installed %i, Action %i)
\n
"
,
debugstr_w
(
feature
->
Feature
),
feature
->
Installed
,
feature
->
Action
);
debugstr_w
(
feature
->
Feature
),
feature
->
Installed
,
feature
->
Action
);
/* features with components that have compressed files are made local */
LIST_FOR_EACH_ENTRY
(
cl
,
&
feature
->
Components
,
ComponentList
,
entry
)
{
if
(
cl
->
component
->
Enabled
&&
cl
->
component
->
ForceLocalState
&&
feature
->
Action
==
INSTALLSTATE_SOURCE
)
{
msi_feature_set_state
(
feature
,
INSTALLSTATE_LOCAL
);
break
;
}
}
LIST_FOR_EACH_ENTRY
(
cl
,
&
feature
->
Components
,
ComponentList
,
entry
)
{
...
...
@@ -1795,53 +1807,69 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
if
(
!
component
->
Enabled
)
continue
;
if
(
component
->
Attributes
&
msidbComponentAttributesOptional
)
msi_component_set_state
(
component
,
INSTALLSTATE_DEFAULT
);
else
switch
(
feature
->
Action
)
{
if
(
component
->
Attributes
&
msidbComponentAttributesSourceOnly
)
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
case
INSTALLSTATE_ADVERTISED
:
component
->
hasAdvertiseFeature
=
1
;
break
;
case
INSTALLSTATE_SOURCE
:
component
->
hasSourceFeature
=
1
;
break
;
case
INSTALLSTATE_LOCAL
:
component
->
hasLocalFeature
=
1
;
break
;
case
INSTALLSTATE_DEFAULT
:
if
(
feature
->
Attributes
&
msidbFeatureAttributesFavorAdvertise
)
component
->
hasAdvertiseFeature
=
1
;
else
if
(
feature
->
Attributes
&
msidbFeatureAttributesFavorSource
)
component
->
hasSourceFeature
=
1
;
else
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
component
->
hasLocalFeature
=
1
;
break
;
default:
break
;
}
}
}
if
(
component
->
ForceLocalState
)
LIST_FOR_EACH_ENTRY
(
component
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
/* if the component isn't enabled, leave it alone */
if
(
!
component
->
Enabled
)
continue
;
/* check if it's local or source */
if
(
!
(
component
->
Attributes
&
msidbComponentAttributesOptional
)
&&
(
component
->
hasLocalFeature
||
component
->
hasSourceFeature
))
{
if
((
component
->
Attributes
&
msidbComponentAttributesSourceOnly
)
&&
!
component
->
ForceLocalState
)
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
else
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
continue
;
}
if
(
feature
->
Attributes
==
msidbFeatureAttributesFavorAdvertise
)
{
msi_component_set_state
(
component
,
INSTALLSTATE_ADVERTISED
);
}
else
if
(
feature
->
Attributes
==
msidbFeatureAttributesFavorLocal
)
{
if
(
!
(
component
->
Attributes
&
msidbComponentAttributesSourceOnly
))
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
}
else
if
(
feature
->
Attributes
==
msidbFeatureAttributesFavorSource
)
{
if
((
component
->
Action
==
INSTALLSTATE_UNKNOWN
)
||
(
component
->
Action
==
INSTALLSTATE_ABSENT
)
||
(
component
->
Action
==
INSTALLSTATE_ADVERTISED
)
||
(
component
->
Action
==
INSTALLSTATE_DEFAULT
))
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
}
else
if
(
feature
->
ActionRequest
==
INSTALLSTATE_ADVERTISED
)
{
if
((
component
->
Action
==
INSTALLSTATE_UNKNOWN
)
||
(
component
->
Action
==
INSTALLSTATE_ABSENT
))
msi_component_set_state
(
component
,
INSTALLSTATE_ADVERTISED
);
}
else
if
(
feature
->
ActionRequest
==
INSTALLSTATE_ABSENT
)
{
if
(
component
->
Action
==
INSTALLSTATE_UNKNOWN
)
msi_component_set_state
(
component
,
INSTALLSTATE_ABSENT
);
}
else
if
(
feature
->
ActionRequest
==
INSTALLSTATE_UNKNOWN
)
msi_component_set_state
(
component
,
INSTALLSTATE_UNKNOWN
);
/* if any feature is local, the component must be local too */
if
(
component
->
hasLocalFeature
)
{
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
continue
;
}
if
(
component
->
ForceLocalState
&&
feature
->
Action
==
INSTALLSTATE_SOURCE
)
msi_feature_set_state
(
feature
,
INSTALLSTATE_LOCAL
);
if
(
component
->
hasSourceFeature
)
{
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
continue
;
}
if
(
component
->
hasAdvertiseFeature
)
{
msi_component_set_state
(
component
,
INSTALLSTATE_ADVERTISED
);
continue
;
}
TRACE
(
"nobody wants component %s
\n
"
,
debugstr_w
(
component
->
Component
));
}
LIST_FOR_EACH_ENTRY
(
component
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
...
...
dlls/msi/msipriv.h
View file @
97419aea
...
...
@@ -300,6 +300,10 @@ typedef struct tagMSICOMPONENT
INT
RefCount
;
LPWSTR
FullKeypath
;
LPWSTR
AdvertiseString
;
int
hasAdvertiseFeature
:
1
;
int
hasLocalFeature
:
1
;
int
hasSourceFeature
:
1
;
}
MSICOMPONENT
;
typedef
struct
tagComponentList
...
...
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