From 4fd61666703a99da9dcc7035135af3dce3dfe52c Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Mon, 4 Jul 2022 11:40:09 +0200 Subject: [PATCH] Fix running application detection for uninstalling. --- CHANGELOG.md | 1 + .../linphone_package/windows/NSIS.template.in | 7 +++---- .../linphone_package/windows/uninstall.nsi.in | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5913408e2..71889d8e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixes - Display name are based on friends (coming from local or LDAP server) and caller address only. +- Running application detection for uninstalling. ## 4.4.7 - 2022-07-01 diff --git a/linphone-app/cmake_builder/linphone_package/windows/NSIS.template.in b/linphone-app/cmake_builder/linphone_package/windows/NSIS.template.in index ea9bd58f3..1a2d20a25 100644 --- a/linphone-app/cmake_builder/linphone_package/windows/NSIS.template.in +++ b/linphone-app/cmake_builder/linphone_package/windows/NSIS.template.in @@ -906,10 +906,9 @@ SectionEnd ; "Program Files" for AllUsers, "My Documents" for JustMe... Function .onInit - FindWindow $0 "gdkWindowToplevel" "@CPACK_PACKAGE_NAME@" - FindWindow $1 "Qt5QWindowOwnDCIcon" "@CPACK_PACKAGE_NAME@" - StrCmp "$0$1" "00" notRunning - MessageBox MB_OK|MB_ICONEXCLAMATION "@CPACK_PACKAGE_NAME@ is running. Please close it first and restart the installation." /SD IDOK + FindWindow $0 "" "@CPACK_PACKAGE_NAME@" + StrCmp "$0" "0" notRunning + MessageBox MB_OK|MB_ICONEXCLAMATION "@CPACK_PACKAGE_NAME@ is running. Please close it first from the application menu and restart the installation." /SD IDOK Abort notRunning: diff --git a/linphone-app/cmake_builder/linphone_package/windows/uninstall.nsi.in b/linphone-app/cmake_builder/linphone_package/windows/uninstall.nsi.in index c27c43a66..12b2a9b48 100644 --- a/linphone-app/cmake_builder/linphone_package/windows/uninstall.nsi.in +++ b/linphone-app/cmake_builder/linphone_package/windows/uninstall.nsi.in @@ -1,6 +1,6 @@ -FindWindow $0 "gdkWindowToplevel" "@APPLICATION_NAME@" +FindWindow $0 "" "@APPLICATION_NAME@" StrCmp $0 0 notRunningInUninstall -MessageBox MB_OK|MB_ICONEXCLAMATION "@APPLICATION_NAME@ is running. Please close it first and restart the uninstall program." /SD IDOK +MessageBox MB_OK|MB_ICONEXCLAMATION "@APPLICATION_NAME@ is running. Please close it first from the application menu and restart the uninstall program." /SD IDOK Abort notRunningInUninstall: