Skip to content

Commit 6a9321b

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of PublishProduct.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 4f2bb46fd1b7e190946b288312b2be30a68c02c1 by Zebediah Figura <[email protected]>
1 parent 074bd3b commit 6a9321b

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ static const char pp_install_exec_seq_dat[] =
409409
"pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n"
410410
"pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n"
411411
"PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
412+
"pp_immediate\tPUBLISH_PRODUCT AND ALLUSERS\t6401\n"
413+
"pp_deferred\tPUBLISH_PRODUCT AND ALLUSERS\t6402\n"
412414
"InstallFinalize\t\t6600";
413415

414416
static const char pp_custom_action_dat[] =
@@ -419,6 +421,8 @@ static const char pp_custom_action_dat[] =
419421
"pf_deferred\t1025\tcustom.dll\tpf_present\n"
420422
"uf_immediate\t1\tcustom.dll\tpf_present\n"
421423
"uf_deferred\t1025\tcustom.dll\tpf_absent\n"
424+
"pp_immediate\t1\tcustom.dll\tpp_absent\n"
425+
"pp_deferred\t1025\tcustom.dll\tpp_present\n"
422426
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
423427
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";
424428

modules/rostests/winetests/msi/custom.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,3 +1536,32 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
15361536

15371537
return ERROR_SUCCESS;
15381538
}
1539+
1540+
static const char pp_prodkey[] = "Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
1541+
1542+
UINT WINAPI pp_present(MSIHANDLE hinst)
1543+
{
1544+
HKEY key;
1545+
LONG res;
1546+
1547+
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
1548+
ok(hinst, !res, "got %u\n", res);
1549+
check_reg_str(hinst, key, "ProductName", "MSITEST");
1550+
check_reg_str(hinst, key, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
1551+
check_reg_str(hinst, key, "Clients", ":");
1552+
1553+
RegCloseKey(key);
1554+
return ERROR_SUCCESS;
1555+
}
1556+
1557+
UINT WINAPI pp_absent(MSIHANDLE hinst)
1558+
{
1559+
HKEY key;
1560+
LONG res;
1561+
1562+
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
1563+
todo_wine
1564+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1565+
1566+
return ERROR_SUCCESS;
1567+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
@ stdcall pa_absent(long)
1818
@ stdcall pf_present(long)
1919
@ stdcall pf_absent(long)
20+
@ stdcall pp_present(long)
21+
@ stdcall pp_absent(long)
2022
@ stdcall ppc_present(long)
2123
@ stdcall ppc_absent(long)
2224
@ stdcall pub_present(long)

0 commit comments

Comments
 (0)