Hans Leidekker : msi: Honor msidbFeatureAttributesFollowParent.

Alexandre Julliard julliard at winehq.org
Tue Apr 5 11:23:32 CDT 2011


Module: wine
Branch: master
Commit: d447ae63b3194fdab39c319496dd1f24a1a629e1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d447ae63b3194fdab39c319496dd1f24a1a629e1

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Apr  5 14:05:00 2011 +0200

msi: Honor msidbFeatureAttributesFollowParent.

---

 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 366d897..3244b6d 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -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 */




More information about the wine-cvs mailing list