https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0c2c3863ef9f1b19e8070…
commit 0c2c3863ef9f1b19e80703446b3bb4bf058303ac
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:12:20 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:47 2022 +0100
[WINESYNC] msi/tests: Test deferral of CreateShorcuts and RemoveShortcuts.
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 ab9ab2a8f701064af3212a91ecd89ffa6a4a331b by Zebediah Figura
<z.figura12(a)gmail.com>
---
modules/rostests/winetests/msi/action.c | 14 ++++++++++++++
modules/rostests/winetests/msi/custom.c | 14 ++++++++++++++
modules/rostests/winetests/msi/custom.spec | 2 ++
3 files changed, 30 insertions(+)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index ae1b47b99db..ce36edaefd8 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -917,12 +917,25 @@ static const char crs_install_exec_seq_dat[] =
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"RemoveShortcuts\t\t3000\n"
+ "rs_immediate\tREMOVE\t3001\n"
+ "rs_deferred\tREMOVE\t3002\n"
"CreateShortcuts\t\t3100\n"
+ "cs_immediate\tNOT REMOVE\t3101\n"
+ "cs_deferred\tNOT REMOVE\t3102\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n";
+static const char crs_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "cs_immediate\t1\tcustom.dll\tcrs_absent\n"
+ "cs_deferred\t1025\tcustom.dll\tcrs_present\n"
+ "rs_immediate\t1\tcustom.dll\tcrs_present\n"
+ "rs_deferred\t1025\tcustom.dll\tcrs_absent\n";
+
static const char pub_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -1905,6 +1918,7 @@ static const msi_table crs_tables[] =
ADD_TABLE(crs_file),
ADD_TABLE(crs_shortcut),
ADD_TABLE(crs_install_exec_seq),
+ ADD_TABLE(crs_custom_action),
ADD_TABLE(media),
ADD_TABLE(property)
};
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index aeee98e7a9d..db6d61239ec 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1178,3 +1178,17 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
}
return ERROR_SUCCESS;
}
+
+UINT WINAPI crs_present(MSIHANDLE hinst)
+{
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
+ ok(hinst, pf_exists("msitest\\shortcut.lnk"), "shortcut
absent\n");
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI crs_absent(MSIHANDLE hinst)
+{
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
+ ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut
present\n");
+ return ERROR_SUCCESS;
+}
diff --git a/modules/rostests/winetests/msi/custom.spec
b/modules/rostests/winetests/msi/custom.spec
index cac0f85f2b6..774f77bf793 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -5,3 +5,5 @@
@ stdcall nested(long)
@ stdcall cf_present(long)
@ stdcall cf_absent(long)
+@ stdcall crs_present(long)
+@ stdcall crs_absent(long)