[WINESYNC] msi/tests: Test deferral of CreateShorcuts and RemoveShortcuts.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id ab9ab2a8f701064af3212a91ecd89ffa6a4a331b by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2022-03-12 15:12:20 +01:00 committed by Mark Jansen
parent 31eeb62486
commit 0c2c3863ef
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 30 additions and 0 deletions

View file

@ -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)
};

View file

@ -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;
}

View file

@ -5,3 +5,5 @@
@ stdcall nested(long)
@ stdcall cf_present(long)
@ stdcall cf_absent(long)
@ stdcall crs_present(long)
@ stdcall crs_absent(long)