Hans Leidekker : msi: Write registry values for source components too.
Alexandre Julliard
julliard at winehq.org
Mon Jan 22 15:34:55 CST 2018
Module: wine
Branch: master
Commit: 8bdcaf60367084c06c77cefb21ead8b3f13e5731
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8bdcaf60367084c06c77cefb21ead8b3f13e5731
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Jan 22 10:19:06 2018 +0100
msi: Write registry values for source components too.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/action.c | 2 +-
dlls/msi/tests/action.c | 36 +++++++++++++++++++++++++++++++-----
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 54295a3..71e45e8 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2872,7 +2872,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
return ERROR_SUCCESS;
comp->Action = msi_get_component_action( package, comp );
- if (comp->Action != INSTALLSTATE_LOCAL)
+ if (comp->Action != INSTALLSTATE_LOCAL && comp->Action != INSTALLSTATE_SOURCE)
{
TRACE("component not scheduled for installation %s\n", debugstr_w(component));
return ERROR_SUCCESS;
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 11e244c..31cc981 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -506,7 +506,22 @@ static const char wrv_component_dat[] =
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
- "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
+ "augustus\t\tMSITESTDIR\t0\t\taugustus\n"
+ "caesar\t\tMSITESTDIR\t1\t\t\n";
+
+static const char wrv_feature_dat[] =
+ "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
+ "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
+ "Feature\tFeature\n"
+ "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
+ "feature2\t\tFeature2\tFeature2\t2\t1\tTARGETDIR\t1";
+
+static const char wrv_feature_comp_dat[] =
+ "Feature_\tComponent_\n"
+ "s38\ts72\n"
+ "FeatureComponents\tFeature_\tComponent_\n"
+ "feature\taugustus\n"
+ "feature2\tcaesar";
static const char wrv_registry_dat[] =
"Registry\tRoot\tKey\tName\tValue\tComponent_\n"
@@ -527,7 +542,8 @@ static const char wrv_registry_dat[] =
"regdata12\t2\tSOFTWARE\\Wine\\msitest\tValue8\t#1\taugustus\n"
"regdata13\t2\tSOFTWARE\\Wine\\msitest\tValue9\t#x1\taugustus\n"
"regdata14\t2\tSOFTWARE\\Wine\\msitest\tValue10\t#x01\taugustus\n"
- "regdata15\t2\tSOFTWARE\\Wine\\msitest\tValue11\t[regdata15]\taugustus\n";
+ "regdata15\t2\tSOFTWARE\\Wine\\msitest\tValue11\t[regdata15]\taugustus\n"
+ "regdata16\t2\tSOFTWARE\\Wine\\msitest\tValue12\t#1\tcaesar\n";
static const char cf_directory_dat[] =
"Directory\tDirectory_Parent\tDefaultDir\n"
@@ -1752,8 +1768,8 @@ static const msi_table wrv_tables[] =
{
ADD_TABLE(wrv_component),
ADD_TABLE(directory),
- ADD_TABLE(rof_feature),
- ADD_TABLE(ci2_feature_comp),
+ ADD_TABLE(wrv_feature),
+ ADD_TABLE(wrv_feature_comp),
ADD_TABLE(ci2_file),
ADD_TABLE(install_exec_seq),
ADD_TABLE(rof_media),
@@ -4988,7 +5004,7 @@ static void test_write_registry_values(void)
goto error;
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\augustus", TRUE), "File installed\n");
+ ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n");
if (is_64bit)
@@ -5111,6 +5127,15 @@ static void test_write_registry_values(void)
ok(size == 1, "got %u\n", size);
ok(type == REG_BINARY, "got %u\n", type);
+ size = sizeof(buf);
+ type = 0xdeadbeef;
+ memset(buf, 0, size);
+ res = RegQueryValueExA(hkey, "Value12", NULL, &type, buf, &size);
+ ok(res == ERROR_SUCCESS, "got %u\n", res);
+ ok(*(DWORD *)buf == 1, "got %u\n", *(DWORD *)buf);
+ ok(size == 4, "got %u\n", size);
+ ok(type == REG_DWORD, "got %u\n", type);
+
RegDeleteValueA(hkey, "Value");
RegDeleteValueA(hkey, "Value1");
RegDeleteValueA(hkey, "Value2");
@@ -5123,6 +5148,7 @@ static void test_write_registry_values(void)
RegDeleteValueA(hkey, "Value9");
RegDeleteValueA(hkey, "Value10");
RegDeleteValueA(hkey, "Value11");
+ RegDeleteValueA(hkey, "Value12");
RegCloseKey(hkey);
RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest");
More information about the wine-cvs
mailing list