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
6395ff6a
Commit
6395ff6a
authored
Oct 26, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Create macro functions to set feature and component states.
parent
62aedea8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
62 deletions
+29
-62
action.c
dlls/msi/action.c
+29
-62
No files found.
dlls/msi/action.c
View file @
6395ff6a
...
...
@@ -1702,6 +1702,18 @@ static BOOL process_state_property (MSIPACKAGE* package, LPCWSTR property,
return
TRUE
;
}
static
void
msi_feature_set_state
(
MSIFEATURE
*
feature
,
INSTALLSTATE
state
)
{
feature
->
ActionRequest
=
state
;
feature
->
Action
=
state
;
}
static
void
msi_component_set_state
(
MSICOMPONENT
*
comp
,
INSTALLSTATE
state
)
{
comp
->
ActionRequest
=
state
;
comp
->
Action
=
state
;
}
UINT
MSI_SetFeatureStates
(
MSIPACKAGE
*
package
)
{
int
install_level
;
...
...
@@ -1760,20 +1772,11 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
if
((
feature_state
)
&&
(
feature
->
Action
==
INSTALLSTATE_UNKNOWN
))
{
if
(
feature
->
Attributes
&
msidbFeatureAttributesFavorSource
)
{
feature
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
feature
->
Action
=
INSTALLSTATE_SOURCE
;
}
msi_feature_set_state
(
feature
,
INSTALLSTATE_SOURCE
);
else
if
(
feature
->
Attributes
&
msidbFeatureAttributesFavorAdvertise
)
{
feature
->
ActionRequest
=
INSTALLSTATE_ADVERTISED
;
feature
->
Action
=
INSTALLSTATE_ADVERTISED
;
}
msi_feature_set_state
(
feature
,
INSTALLSTATE_ADVERTISED
);
else
{
feature
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
feature
->
Action
=
INSTALLSTATE_LOCAL
;
}
msi_feature_set_state
(
feature
,
INSTALLSTATE_LOCAL
);
}
}
...
...
@@ -1786,10 +1789,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
continue
;
LIST_FOR_EACH_ENTRY
(
fl
,
&
feature
->
Children
,
FeatureList
,
entry
)
{
fl
->
feature
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
fl
->
feature
->
Action
=
INSTALLSTATE_UNKNOWN
;
}
msi_feature_set_state
(
fl
->
feature
,
INSTALLSTATE_UNKNOWN
);
}
}
else
...
...
@@ -1820,42 +1820,27 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
switch
(
component
->
Attributes
)
{
case
msidbComponentAttributesLocalOnly
:
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
break
;
case
msidbComponentAttributesSourceOnly
:
component
->
Action
=
INSTALLSTATE_SOURCE
;
component
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
break
;
case
msidbComponentAttributesOptional
:
component
->
Action
=
INSTALLSTATE_DEFAULT
;
component
->
ActionRequest
=
INSTALLSTATE_DEFAULT
;
msi_component_set_state
(
component
,
INSTALLSTATE_DEFAULT
);
break
;
default:
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
}
if
(
component
->
ForceLocalState
)
{
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
if
(
!
component
->
Enabled
)
{
component
->
Action
=
INSTALLSTATE_UNKNOWN
;
component
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
}
else
{
if
(
feature
->
Attributes
==
msidbFeatureAttributesFavorLocal
)
msi_component_set_state
(
component
,
INSTALLSTATE_UNKNOWN
);
else
if
(
feature
->
Attributes
==
msidbFeatureAttributesFavorLocal
)
{
if
(
!
(
component
->
Attributes
&
msidbComponentAttributesSourceOnly
))
{
component
->
Action
=
INSTALLSTATE_LOCAL
;
component
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_LOCAL
);
}
else
if
(
feature
->
Attributes
==
msidbFeatureAttributesFavorSource
)
{
...
...
@@ -1863,42 +1848,24 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
(
component
->
Action
==
INSTALLSTATE_ABSENT
)
||
(
component
->
Action
==
INSTALLSTATE_ADVERTISED
)
||
(
component
->
Action
==
INSTALLSTATE_DEFAULT
))
{
component
->
Action
=
INSTALLSTATE_SOURCE
;
component
->
ActionRequest
=
INSTALLSTATE_SOURCE
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_SOURCE
);
}
else
if
(
feature
->
ActionRequest
==
INSTALLSTATE_ADVERTISED
)
{
if
((
component
->
Action
==
INSTALLSTATE_UNKNOWN
)
||
(
component
->
Action
==
INSTALLSTATE_ABSENT
))
{
component
->
Action
=
INSTALLSTATE_ADVERTISED
;
component
->
ActionRequest
=
INSTALLSTATE_ADVERTISED
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_ADVERTISED
);
}
else
if
(
feature
->
ActionRequest
==
INSTALLSTATE_ABSENT
)
{
if
(
component
->
Action
==
INSTALLSTATE_UNKNOWN
)
{
component
->
Action
=
INSTALLSTATE_ABSENT
;
component
->
ActionRequest
=
INSTALLSTATE_ABSENT
;
}
msi_component_set_state
(
component
,
INSTALLSTATE_ABSENT
);
}
else
if
(
feature
->
ActionRequest
==
INSTALLSTATE_UNKNOWN
)
{
component
->
Action
=
INSTALLSTATE_UNKNOWN
;
component
->
ActionRequest
=
INSTALLSTATE_UNKNOWN
;
}
}
msi_component_set_state
(
component
,
INSTALLSTATE_UNKNOWN
);
if
(
component
->
ForceLocalState
&&
feature
->
Action
==
INSTALLSTATE_SOURCE
)
{
feature
->
Action
=
INSTALLSTATE_LOCAL
;
feature
->
ActionRequest
=
INSTALLSTATE_LOCAL
;
}
msi_feature_set_state
(
feature
,
INSTALLSTATE_LOCAL
);
}
}
...
...
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