https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2dce4ee7d2bad6a20a1fe…
commit 2dce4ee7d2bad6a20a1feb2da1cd1f56f34bddd2
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:11:50 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:36 2022 +0100
[WINESYNC] msi: Only mark non-registered features as absent if we haven't done
anything with them.
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id b052fc3c893a0fa946c1dd6065047f4b5538cbe0 by Piotr Caban
<piotr(a)codeweavers.com>
---
dll/win32/msi/action.c | 2 ++
modules/rostests/winetests/msi/package.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c
index 0eef96a89c6..f58a53d4558 100644
--- a/dll/win32/msi/action.c
+++ b/dll/win32/msi/action.c
@@ -4945,6 +4945,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
MSIRECORD *uirow;
if (feature->Level <= 0) continue;
+ if (feature->Action == INSTALLSTATE_UNKNOWN &&
+ feature->Installed != INSTALLSTATE_ABSENT) continue;
if (feature->Action != INSTALLSTATE_LOCAL &&
feature->Action != INSTALLSTATE_SOURCE &&
diff --git a/modules/rostests/winetests/msi/package.c
b/modules/rostests/winetests/msi/package.c
index b85a3a810dc..e3a08944d51 100644
--- a/modules/rostests/winetests/msi/package.c
+++ b/modules/rostests/winetests/msi/package.c
@@ -3704,9 +3704,12 @@ static void test_states(void)
add_custom_action_entry( hdb, "'ConditionCheck6', 19, '',
'Condition check failed (6)'" );
add_custom_action_entry( hdb, "'ConditionCheck7', 19, '',
'Condition check failed (7)'" );
add_custom_action_entry( hdb, "'ConditionCheck8', 19, '',
'Condition check failed (8)'" );
+ add_custom_action_entry( hdb,
+ "'VBFeatureRequest', 38, '',
'Session.FeatureRequestState(\"three\") = 3'" );
add_install_execute_sequence_entry( hdb, "'ConditionCheck1',
'REINSTALL', '798'" );
add_install_execute_sequence_entry( hdb, "'ConditionCheck2', 'NOT
REMOVE AND Preselected', '799'" );
+ add_install_execute_sequence_entry( hdb, "'VBFeatureRequest', 'NOT
REMOVE', '1001'" );
add_install_execute_sequence_entry( hdb, "'ConditionCheck3',
'REINSTALL', '6598'" );
add_install_execute_sequence_entry( hdb, "'ConditionCheck4', 'NOT
REMOVE AND Preselected', '6599'" );
add_install_execute_sequence_entry( hdb, "'ConditionCheck5',
'REINSTALL', '6601'" );
@@ -3773,6 +3776,8 @@ static void test_states(void)
ok(state == INSTALLSTATE_SOURCE, "state = %d\n", state);
state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}",
"two");
ok(state == INSTALLSTATE_ABSENT, "state = %d\n", state);
+ state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}",
"three");
+ ok(state == INSTALLSTATE_LOCAL, "state = %d\n", state);
/* uninstall the product */
r = MsiInstallProductA(msifile4, "REMOVE=ALL");