Skip to content

Commit 342159a

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of SelfRegModules and SelfUnregModules.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id a08438afbd1d111e78ebb7fb0743a456f1da4d19 by Zebediah Figura <[email protected]>
1 parent 761e72c commit 342159a

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,15 +777,28 @@ static const char sr_install_exec_seq_dat[] =
777777
"InstallInitialize\t\t1500\n"
778778
"ProcessComponents\t\t1600\n"
779779
"SelfUnregModules\t\t3800\n"
780+
"su_immediate\tREMOVE\t3801\n"
781+
"su_deferred\tREMOVE\t3802\n"
780782
"RemoveFiles\t\t3900\n"
781783
"InstallFiles\t\t4000\n"
782784
"SelfRegModules\t\t4100\n"
785+
"sr_immediate\tNOT REMOVE\t4101\n"
786+
"sr_deferred\tNOT REMOVE\t4102\n"
783787
"CreateShortcuts\t\t4600\n"
784788
"RegisterProduct\t\t5100\n"
785789
"PublishFeatures\t\t5200\n"
786790
"PublishProduct\t\t5300\n"
787791
"InstallFinalize\t\t6600\n";
788792

793+
static const char sr_custom_action_dat[] =
794+
"Action\tType\tSource\tTarget\n"
795+
"s72\ti2\tS64\tS0\n"
796+
"CustomAction\tAction\n"
797+
"sr_immediate\t1\tcustom.dll\tsr_absent\n"
798+
"sr_deferred\t1025\tcustom.dll\tsr_present\n"
799+
"su_immediate\t1\tcustom.dll\tsr_present\n"
800+
"su_deferred\t1025\tcustom.dll\tsr_absent\n";
801+
789802
static const char font_media_dat[] =
790803
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
791804
"i2\ti4\tL64\tS255\tS32\tS72\n"
@@ -2131,6 +2144,7 @@ static const msi_table sr_tables[] =
21312144
ADD_TABLE(sr_file),
21322145
ADD_TABLE(sr_selfreg),
21332146
ADD_TABLE(sr_install_exec_seq),
2147+
ADD_TABLE(sr_custom_action),
21342148
ADD_TABLE(media),
21352149
ADD_TABLE(property)
21362150
};

modules/rostests/winetests/msi/custom.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,3 +1833,28 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
18331833

18341834
return ERROR_SUCCESS;
18351835
}
1836+
1837+
UINT WINAPI sr_present(MSIHANDLE hinst)
1838+
{
1839+
HKEY key;
1840+
LONG res;
1841+
1842+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
1843+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1844+
ok(hinst, !res, "got %u\n", res);
1845+
RegCloseKey(key);
1846+
1847+
return ERROR_SUCCESS;
1848+
}
1849+
1850+
UINT WINAPI sr_absent(MSIHANDLE hinst)
1851+
{
1852+
HKEY key;
1853+
LONG res;
1854+
1855+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
1856+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1857+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1858+
1859+
return ERROR_SUCCESS;
1860+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
@ stdcall sds_absent(long)
4444
@ stdcall sis_present(long)
4545
@ stdcall sis_absent(long)
46+
@ stdcall sr_present(long)
47+
@ stdcall sr_absent(long)
4648
@ stdcall sss_started(long)
4749
@ stdcall sss_stopped(long)
4850
@ stdcall tl_present(long)

0 commit comments

Comments
 (0)