msi: Honor msidbFeatureAttributesFollowParent.
Hans Leidekker
hans at codeweavers.com
Tue Apr 5 07:05:00 CDT 2011
Fixes http://bugs.winehq.org/show_bug.cgi?id=25407
---
dlls/msi/action.c | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 79d12d6..1a952b9 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2229,18 +2229,23 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
}
}
}
-
- /* disable child features of unselected parent features */
+ /* disable child features of unselected parent or follow parent */
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
FeatureList *fl;
- if (is_feature_selected( feature, level )) continue;
-
LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry )
{
- fl->feature->Action = INSTALLSTATE_UNKNOWN;
- fl->feature->ActionRequest = INSTALLSTATE_UNKNOWN;
+ if (!is_feature_selected( feature, level ))
+ {
+ fl->feature->Action = INSTALLSTATE_UNKNOWN;
+ fl->feature->ActionRequest = INSTALLSTATE_UNKNOWN;
+ }
+ else if (fl->feature->Attributes & msidbFeatureAttributesFollowParent)
+ {
+ fl->feature->Action = feature->Action;
+ fl->feature->ActionRequest = feature->ActionRequest;
+ }
}
}
}
@@ -2264,6 +2269,21 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
}
}
}
+ LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
+ {
+ FeatureList *fl;
+
+ if (!is_feature_selected( feature, level )) continue;
+
+ LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry )
+ {
+ if (fl->feature->Attributes & msidbFeatureAttributesFollowParent)
+ {
+ fl->feature->Action = feature->Action;
+ fl->feature->ActionRequest = feature->ActionRequest;
+ }
+ }
+ }
}
/* now we want to set component state based based on feature state */
--
1.7.4.1
More information about the wine-patches
mailing list