msi: Honor msidbFeatureAttributesFollowParent.

This commit is contained in:
Hans Leidekker 2011-04-05 14:05:00 +02:00 committed by Alexandre Julliard
parent ce0b3a030b
commit d447ae63b3
1 changed files with 26 additions and 6 deletions

View File

@ -2232,18 +2232,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;
}
}
}
}
@ -2267,6 +2272,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 */