From 47da43b8e102c57adda9ccd575f57ac778f20104 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 25 Jun 2016 11:27:22 +0000 Subject: [PATCH] [MSI] Sync with Wine Staging 1.9.12. CORE-11266 svn path=/trunk/; revision=71667 --- reactos/dll/win32/msi/action.c | 19 ++++++++++++++----- reactos/dll/win32/msi/custom.c | 1 + reactos/dll/win32/msi/dialog.c | 2 +- reactos/dll/win32/msi/msvchelper.h | 1 + reactos/dll/win32/msi/where.c | 2 +- reactos/media/doc/README.WINE | 2 +- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/reactos/dll/win32/msi/action.c b/reactos/dll/win32/msi/action.c index e34d262833f..1eb1758923d 100644 --- a/reactos/dll/win32/msi/action.c +++ b/reactos/dll/win32/msi/action.c @@ -2987,11 +2987,7 @@ static void delete_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path ) { *p = 0; if (!p[1]) continue; /* trailing backslash */ -#ifdef __REACTOS__ /* CORE-10587 */ hkey = open_key( comp, root, subkey, FALSE, access | READ_CONTROL ); -#else - hkey = open_key( comp, root, subkey, FALSE, access ); -#endif if (!hkey) break; res = RegDeleteKeyExW( hkey, p + 1, access, 0 ); RegCloseKey( hkey ); @@ -5806,6 +5802,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) LPWSTR name = NULL, disp = NULL, load_order = NULL, serv_name = NULL; LPWSTR depends = NULL, pass = NULL, args = NULL, image_path = NULL; DWORD serv_type, start_type, err_control; + BOOL is_vital; SERVICE_DESCRIPTIONW sd = {NULL}; UINT ret = ERROR_SUCCESS; @@ -5844,6 +5841,13 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) deformat_string(package, MSI_RecordGetString(rec, 11), &args); deformat_string(package, MSI_RecordGetString(rec, 13), &sd.lpDescription); + /* Should the complete install fail if CreateService fails? */ + is_vital = (err_control & msidbServiceInstallErrorControlVital); + + /* Remove the msidbServiceInstallErrorControlVital-flag from err_control. + CreateService (under Windows) would fail if not. */ + err_control &= ~msidbServiceInstallErrorControlVital; + /* fetch the service path */ row = MSI_QueryGetRecord(package->db, query, comp); if (!row) @@ -5885,7 +5889,12 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) if (!service) { if (GetLastError() != ERROR_SERVICE_EXISTS) - ERR("Failed to create service %s: %d\n", debugstr_w(name), GetLastError()); + { + WARN("Failed to create service %s: %d\n", debugstr_w(name), GetLastError()); + if (is_vital) + ret = ERROR_INSTALL_FAILURE; + + } } else if (sd.lpDescription) { diff --git a/reactos/dll/win32/msi/custom.c b/reactos/dll/win32/msi/custom.c index ad241010042..565feecea62 100644 --- a/reactos/dll/win32/msi/custom.c +++ b/reactos/dll/win32/msi/custom.c @@ -527,6 +527,7 @@ __ASM_GLOBAL_FUNC( CUSTOMPROC_wrapper, __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "subl $4,%esp\n\t" "pushl 12(%ebp)\n\t" "movl 8(%ebp),%eax\n\t" "call *%eax\n\t" diff --git a/reactos/dll/win32/msi/dialog.c b/reactos/dll/win32/msi/dialog.c index 4db0f3f506a..cfc8c3f516c 100644 --- a/reactos/dll/win32/msi/dialog.c +++ b/reactos/dll/win32/msi/dialog.c @@ -3590,7 +3590,7 @@ static void msi_dialog_adjust_dialog_pos( msi_dialog *dialog, MSIRECORD *rec, LP dialog->size.cx = sz.cx; dialog->size.cy = sz.cy; - TRACE("%u %u %u %u\n", pos->left, pos->top, pos->right, pos->bottom); + TRACE("%s\n", wine_dbgstr_rect(pos)); style = GetWindowLongPtrW( dialog->hwnd, GWL_STYLE ); AdjustWindowRect( pos, style, FALSE ); diff --git a/reactos/dll/win32/msi/msvchelper.h b/reactos/dll/win32/msi/msvchelper.h index 61cb74d6693..26a6266be69 100644 --- a/reactos/dll/win32/msi/msvchelper.h +++ b/reactos/dll/win32/msi/msvchelper.h @@ -14,6 +14,7 @@ CUSTOMPROC_wrapper(__MSVC__MsiCustomActionEntryPoint proc, unsigned int handle) { push ebp mov ebp, esp + sub esp, 4 push dword ptr [ebp + 12] mov eax, dword ptr [ebp + 8] call eax diff --git a/reactos/dll/win32/msi/where.c b/reactos/dll/win32/msi/where.c index 9ce7eaa06a6..c0bb0d328df 100644 --- a/reactos/dll/win32/msi/where.c +++ b/reactos/dll/win32/msi/where.c @@ -578,7 +578,7 @@ static UINT WHERE_evaluate( MSIWHEREVIEW *wv, const UINT rows[], default: ERR("Invalid expression type\n"); - break; + return ERROR_FUNCTION_FAILED; } return ERROR_SUCCESS; diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 8e3b6646473..7923daed4aa 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -114,7 +114,7 @@ reactos/dll/win32/msg711.acm # Synced to WineStaging-1.9.4 reactos/dll/win32/msgsm32.acm # Synced to WineStaging-1.9.4 reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55 reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55 -reactos/dll/win32/msi # Synced to WineStaging-1.9.4 +reactos/dll/win32/msi # Synced to WineStaging-1.9.12 reactos/dll/win32/msimg32 # Synced to WineStaging-1.9.4 reactos/dll/win32/msimtf # Synced to WineStaging-1.9.4 reactos/dll/win32/msisip # Synced to WineStaging-1.9.4