Module: wine Branch: master Commit: 9cc4b0caae8a1a37c43310eba010afcf8383fc2d URL: http://source.winehq.org/git/wine.git/?a=commit;h=9cc4b0caae8a1a37c43310eba0...
Author: Hans Leidekker hans@codeweavers.com Date: Wed Oct 13 14:24:18 2010 +0200
msi/tests: Don't create a nested restore point on recent versions of MSI.
We now set the MSIFASTINSTALL property which disables restore points.
---
dlls/msi/tests/install.c | 10 ++++++++-- dlls/msi/tests/package.c | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 3572a93..8b24367 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -42,6 +42,8 @@ static UINT (WINAPI *pMsiSourceListEnumSourcesA) (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD); static UINT (WINAPI *pMsiSourceListGetInfoA) (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR, LPSTR, LPDWORD); +static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA) + (LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPSTR, LPDWORD);
static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); static BOOL (WINAPI *pGetTokenInformation)( HANDLE, TOKEN_INFORMATION_CLASS, LPVOID, DWORD, PDWORD ); @@ -3266,6 +3268,7 @@ static void init_functionpointers(void) GET_PROC(hmsi, MsiSetExternalUIRecord); GET_PROC(hmsi, MsiSourceListEnumSourcesA); GET_PROC(hmsi, MsiSourceListGetInfoA); + GET_PROC(hmsi, MsiGetComponentPathExA);
GET_PROC(hadvapi32, ConvertSidToStringSidA); GET_PROC(hadvapi32, GetTokenInformation); @@ -10955,8 +10958,11 @@ START_TEST(install)
/* Create a restore point ourselves so we circumvent the multitude of restore points * that would have been created by all the installation and removal tests. + * + * This is not needed on version 5.0 where setting MSIFASTINSTALL prevents the + * creation of restore points. */ - if (pSRSetRestorePointA) + if (pSRSetRestorePointA && !pMsiGetComponentPathExA) { memset(&status, 0, sizeof(status)); ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status); @@ -11046,7 +11052,7 @@ START_TEST(install)
DeleteFileA(log_file);
- if (pSRSetRestorePointA && ret) + if (pSRSetRestorePointA && !pMsiGetComponentPathExA && ret) { ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status); if (ret) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 6cb5533..07ab4eb 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -36,6 +36,7 @@ static const char msifile[] = "winetest-package.msi"; static char CURR_DIR[MAX_PATH];
static UINT (WINAPI *pMsiApplyMultiplePatchesA)(LPCSTR, LPCSTR, LPCSTR); +static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)(LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPSTR, LPDWORD); static HRESULT (WINAPI *pSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR);
static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); @@ -62,6 +63,7 @@ static void init_functionpointers(void) p ## func = (void*)GetProcAddress(mod, #func);
GET_PROC(hmsi, MsiApplyMultiplePatchesA); + GET_PROC(hmsi, MsiGetComponentPathExA); GET_PROC(hshell32, SHGetFolderPathA);
GET_PROC(hadvapi32, ConvertSidToStringSidA); @@ -12829,8 +12831,11 @@ START_TEST(package)
/* Create a restore point ourselves so we circumvent the multitude of restore points * that would have been created by all the installation and removal tests. + * + * This is not needed on version 5.0 where setting MSIFASTINSTALL prevents the + * creation of restore points. */ - if (pSRSetRestorePointA) + if (pSRSetRestorePointA && !pMsiGetComponentPathExA) { memset(&status, 0, sizeof(status)); ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status); @@ -12868,7 +12873,7 @@ START_TEST(package) test_MsiApplyMultiplePatches(); test_MsiApplyPatch();
- if (pSRSetRestorePointA && ret) + if (pSRSetRestorePointA && !pMsiGetComponentPathExA && ret) { ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status); if (ret)