[WINESYNC] msi/tests: Test deferral of InstallFiles and RemoveFiles.

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 99562a56170f51002c817cd353fa62325c056ab3 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2022-03-12 15:12:24 +01:00 committed by Mark Jansen
parent 07ea0dc651
commit 49fb19da45
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 28 additions and 0 deletions

View file

@ -643,6 +643,8 @@ static const char cf_install_exec_seq_dat[] =
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"RemoveFiles\t\t3500\n"
"rfi_immediate\tREMOVE\t3501\n"
"rfi_deferred\tREMOVE\t3502\n"
"CreateFolders\t\t3700\n"
"cf_immediate\tNOT REMOVE\t3701\n"
"cf_deferred\tNOT REMOVE\t3702\n"
@ -650,6 +652,8 @@ static const char cf_install_exec_seq_dat[] =
"rf_immediate\tREMOVE\t3801\n"
"rf_deferred\tREMOVE\t3802\n"
"InstallFiles\t\t4000\n"
"ifi_immediate\tNOT REMOVE\t4001\n"
"ifi_deferred\tNOT REMOVE\t4002\n"
"RegisterUser\t\t6000\n"
"RegisterProduct\t\t6100\n"
"PublishFeatures\t\t6300\n"
@ -665,6 +669,10 @@ static const char cf_custom_action_dat[] =
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"ifi_immediate\t1\tcustom.dll\tfile_absent\n"
"ifi_deferred\t1025\tcustom.dll\tfile_present\n"
"rfi_immediate\t1\tcustom.dll\tfile_present\n"
"rfi_deferred\t1025\tcustom.dll\tfile_absent\n"
"cf_immediate\t1\tcustom.dll\tcf_absent\n"
"cf_deferred\t1025\tcustom.dll\tcf_present\n"
"rf_immediate\t1\tcustom.dll\tcf_present\n"

View file

@ -1180,6 +1180,24 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS;
}
UINT WINAPI file_present(MSIHANDLE hinst)
{
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, pf_exists("msitest\\first\\one.txt"), "file absent\n");
ok(hinst, pf_exists("msitest\\second\\two.txt"), "file absent\n");
}
return ERROR_SUCCESS;
}
UINT WINAPI file_absent(MSIHANDLE hinst)
{
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
ok(hinst, !pf_exists("msitest\\first\\one.txt"), "file present\n");
ok(hinst, !pf_exists("msitest\\second\\two.txt"), "file present\n");
}
return ERROR_SUCCESS;
}
UINT WINAPI crs_present(MSIHANDLE hinst)
{
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))

View file

@ -7,6 +7,8 @@
@ stdcall cf_absent(long)
@ stdcall crs_present(long)
@ stdcall crs_absent(long)
@ stdcall file_present(long)
@ stdcall file_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)