https://git.reactos.org/?p=reactos.git;a=commitdiff;h=13c16770a5cc9a0095777…
commit 13c16770a5cc9a0095777b4ec8cc5db0991f5642
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:14:50 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:50 2022 +0100
[WINESYNC] msi/tests: Test deferral of RegisterFonts and UnregisterFonts.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id a364e1a9c8aeba972f13f1af13cd0643b9a05a8e by Zebediah Figura
<z.figura12(a)gmail.com>
---
modules/rostests/winetests/msi/action.c | 14 +++++++++++++
modules/rostests/winetests/msi/custom.c | 32 ++++++++++++++++++++++++++++++
modules/rostests/winetests/msi/custom.spec | 2 ++
3 files changed, 48 insertions(+)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index 43d76a37d0c..91cf3e121c4 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -799,13 +799,26 @@ static const char font_install_exec_seq_dat[] =
"RemoveFiles\t\t3500\n"
"InstallFiles\t\t4000\n"
"RegisterFonts\t\t4100\n"
+ "rf_immediate\tNOT REMOVE\t4101\n"
+ "rf_deferred\tNOT REMOVE\t4102\n"
"UnregisterFonts\t\t4200\n"
+ "uf_immediate\tREMOVE\t4201\n"
+ "uf_deferred\tREMOVE\t4202\n"
"RegisterUser\t\t6000\n"
"RegisterProduct\t\t6100\n"
"PublishFeatures\t\t6300\n"
"PublishProduct\t\t6400\n"
"InstallFinalize\t\t6600";
+static const char font_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "rf_immediate\t1\tcustom.dll\tfont_absent\n"
+ "rf_deferred\t1025\tcustom.dll\tfont_present\n"
+ "uf_immediate\t1\tcustom.dll\tfont_present\n"
+ "uf_deferred\t1025\tcustom.dll\tfont_absent\n";
+
static const char vp_property_dat[] =
"Property\tValue\n"
"s72\tl0\n"
@@ -2054,6 +2067,7 @@ static const msi_table font_tables[] =
ADD_TABLE(font_file),
ADD_TABLE(font),
ADD_TABLE(font_install_exec_seq),
+ ADD_TABLE(font_custom_action),
ADD_TABLE(font_media),
ADD_TABLE(property)
};
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index 566ab1a4c66..306a8f3840f 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1642,3 +1642,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS;
}
+
+static const char font_key[] = "Software\\Microsoft\\Windows
NT\\CurrentVersion\\Fonts";
+
+UINT WINAPI font_present(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE |
KEY_WOW64_64KEY, &key);
+ ok(hinst, !res, "got %u\n", res);
+ res = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI font_absent(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE |
KEY_WOW64_64KEY, &key);
+ ok(hinst, !res, "got %u\n", res);
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+ check_reg_str(hinst, key, "msi test font", NULL);
+}
+ RegCloseKey(key);
+
+ return ERROR_SUCCESS;
+}
diff --git a/modules/rostests/winetests/msi/custom.spec
b/modules/rostests/winetests/msi/custom.spec
index d302d059579..b28b3931ff4 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -9,6 +9,8 @@
@ stdcall crs_absent(long)
@ stdcall file_present(long)
@ stdcall file_absent(long)
+@ stdcall font_present(long)
+@ stdcall font_absent(long)
@ stdcall mov_present(long)
@ stdcall mov_absent(long)
@ stdcall odbc_present(long)