[PATCH v3 0/1] MR10756: Uninstaller/Appwiz: update app list after installation
Match the Uninstall workflow and make Installation synchronous to allow the app list to update immediately after installation finishes. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48597 -- v3: Uninstaller/Appwiz: update app list after installation https://gitlab.winehq.org/wine/wine/-/merge_requests/10756
From: Rose Hellsing <rose@pinkro.se> Match the Uninstall workflow and make Installation synchronous to allow the app list to update immediately after installation finishes. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48597 --- dlls/appwiz.cpl/appwiz.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c index 6f95c23bf28..8cce61ff334 100644 --- a/dlls/appwiz.cpl/appwiz.c +++ b/dlls/appwiz.cpl/appwiz.c @@ -416,6 +416,7 @@ static void InstallProgram(HWND hWnd) WCHAR filter_all[MAX_STRING_LEN]; WCHAR FilterBufferW[MAX_PATH]; WCHAR FileNameBufferW[MAX_PATH]; + BOOL ret; LoadStringW(hInst, IDS_CPL_TITLE, titleW, ARRAY_SIZE(titleW)); LoadStringW(hInst, IDS_FILTER_INSTALLS, filter_installs, ARRAY_SIZE(filter_installs)); @@ -445,10 +446,25 @@ static void InstallProgram(HWND hWnd) sei.cbSize = sizeof(sei); sei.lpVerb = L"open"; sei.nShow = SW_SHOWDEFAULT; - sei.fMask = 0; + sei.fMask = SEE_MASK_NOCLOSEPROCESS; sei.lpFile = ofn.lpstrFile; - ShellExecuteExW(&sei); + ret = ShellExecuteExW(&sei); + + if (ret) + { + while (MsgWaitForMultipleObjects(1, &sei.hProcess, FALSE, INFINITE, QS_ALLINPUT) == 1 ) { + MSG message; + + while (PeekMessageW(&message, 0, 0, 0, PM_REMOVE)) + { + TranslateMessage(&message); + DispatchMessageW(&message); + } + + } + CloseHandle(sei.hProcess); + } } } @@ -825,6 +841,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l { case IDC_INSTALL: InstallProgram(hWnd); + hImageList = ResetApplicationList(FALSE, hWnd, hImageList); break; case IDC_ADDREMOVE: -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10756
participants (2)
-
Rose Hellsing -
Rose Hellsing (@axtlos)