Skip to content

Commit 0c2c386

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of CreateShorcuts and RemoveShortcuts.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id ab9ab2a8f701064af3212a91ecd89ffa6a4a331b by Zebediah Figura <[email protected]>
1 parent 31eeb62 commit 0c2c386

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,12 +917,25 @@ static const char crs_install_exec_seq_dat[] =
917917
"RemoveFiles\t\t1700\n"
918918
"InstallFiles\t\t2000\n"
919919
"RemoveShortcuts\t\t3000\n"
920+
"rs_immediate\tREMOVE\t3001\n"
921+
"rs_deferred\tREMOVE\t3002\n"
920922
"CreateShortcuts\t\t3100\n"
923+
"cs_immediate\tNOT REMOVE\t3101\n"
924+
"cs_deferred\tNOT REMOVE\t3102\n"
921925
"RegisterProduct\t\t5000\n"
922926
"PublishFeatures\t\t5100\n"
923927
"PublishProduct\t\t5200\n"
924928
"InstallFinalize\t\t6000\n";
925929

930+
static const char crs_custom_action_dat[] =
931+
"Action\tType\tSource\tTarget\n"
932+
"s72\ti2\tS64\tS0\n"
933+
"CustomAction\tAction\n"
934+
"cs_immediate\t1\tcustom.dll\tcrs_absent\n"
935+
"cs_deferred\t1025\tcustom.dll\tcrs_present\n"
936+
"rs_immediate\t1\tcustom.dll\tcrs_present\n"
937+
"rs_deferred\t1025\tcustom.dll\tcrs_absent\n";
938+
926939
static const char pub_file_dat[] =
927940
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
928941
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -1905,6 +1918,7 @@ static const msi_table crs_tables[] =
19051918
ADD_TABLE(crs_file),
19061919
ADD_TABLE(crs_shortcut),
19071920
ADD_TABLE(crs_install_exec_seq),
1921+
ADD_TABLE(crs_custom_action),
19081922
ADD_TABLE(media),
19091923
ADD_TABLE(property)
19101924
};

modules/rostests/winetests/msi/custom.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,3 +1178,17 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
11781178
}
11791179
return ERROR_SUCCESS;
11801180
}
1181+
1182+
UINT WINAPI crs_present(MSIHANDLE hinst)
1183+
{
1184+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1185+
ok(hinst, pf_exists("msitest\\shortcut.lnk"), "shortcut absent\n");
1186+
return ERROR_SUCCESS;
1187+
}
1188+
1189+
UINT WINAPI crs_absent(MSIHANDLE hinst)
1190+
{
1191+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1192+
ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut present\n");
1193+
return ERROR_SUCCESS;
1194+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
@ stdcall nested(long)
66
@ stdcall cf_present(long)
77
@ stdcall cf_absent(long)
8+
@ stdcall crs_present(long)
9+
@ stdcall crs_absent(long)

0 commit comments

Comments
 (0)