James Hawkins : msi: Set the component' s initial state based on its attributes.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 21 13:49:23 CDT 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Jul 21 10:09:52 2006 -0700

msi: Set the component's initial state based on its attributes.

---

 dlls/msi/action.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index d7be3b5..2479f2e 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1115,8 +1115,25 @@ static MSICOMPONENT* load_component( MSI
     comp->KeyPath = msi_dup_record_field( row, 6 );
 
     comp->Installed = INSTALLSTATE_ABSENT;
-    comp->Action = INSTALLSTATE_UNKNOWN;
-    comp->ActionRequest = INSTALLSTATE_UNKNOWN;
+
+    switch (comp->Attributes)
+    {
+        case msidbComponentAttributesLocalOnly:
+            comp->Action = INSTALLSTATE_LOCAL;
+            comp->ActionRequest = INSTALLSTATE_LOCAL;
+            break;
+        case msidbComponentAttributesSourceOnly:
+            comp->Action = INSTALLSTATE_SOURCE;
+            comp->ActionRequest = INSTALLSTATE_SOURCE;
+            break;
+        case msidbComponentAttributesOptional:
+            comp->Action = INSTALLSTATE_LOCAL;
+            comp->ActionRequest = INSTALLSTATE_LOCAL;
+            break;
+        default:
+            comp->Action = INSTALLSTATE_UNKNOWN;
+            comp->ActionRequest = INSTALLSTATE_UNKNOWN;
+    }
 
     comp->Enabled = TRUE;
 




More information about the wine-cvs mailing list