Commit b27d1dbd authored by Ghislain MARY's avatar Ghislain MARY Committed by Sandrine Avakian

Also check that linphone is not running when running the uninstall executable on Windows.

parent b6d4c280
......@@ -306,13 +306,15 @@ if(WIN32)
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" DOS_STYLE_BINARY_DIR)
string(REPLACE "\\" "\\\\" ESCAPED_DOS_STYLE_BINARY_DIR "${DOS_STYLE_BINARY_DIR}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/uninstall.nsi" "${CMAKE_CURRENT_BINARY_DIR}/uninstall.nsi" COPYONLY)
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!include \\\"${ESCAPED_DOS_STYLE_BINARY_DIR}\\\\uninstall.nsi\\\"")
if(ENABLE_OPENH264)
# Add NSI instructions to download the openh264 codec from Cisco's servers whether msopenh264 has been installed
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/openh264-install.nsi.in" "${CMAKE_CURRENT_BINARY_DIR}/openh264-install.nsi" @ONLY)
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!include \\\"${ESCAPED_DOS_STYLE_BINARY_DIR}\\\\openh264-install.nsi\\\"")
# Add NSI instructions to delete the openh264 codecs while uninstalling Linphone
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "!include \\\"${ESCAPED_DOS_STYLE_SOURCE_DIR}\\\\openh264-uninstall.nsi\\\"")
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n!include \\\"${ESCAPED_DOS_STYLE_SOURCE_DIR}\\\\openh264-uninstall.nsi\\\"")
endif()
# Sign the installer
......
......@@ -905,7 +905,7 @@ SectionEnd
Function .onInit
FindWindow $0 "" "Linphone"
StrCmp $0 0 notRunning
MessageBox MB_OK|MB_ICONEXCLAMATION "@CPACK_NSIS_PACKAGE_NAME@ is running. Please close it first and restart the installation." /SD IDOK
MessageBox MB_OK|MB_ICONEXCLAMATION "Linphone is running. Please close it first and restart the installation." /SD IDOK
Abort
notRunning:
......@@ -914,7 +914,7 @@ notRunning:
StrCmp $0 "" inst
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to continue and uninstall the old version before installing the new one?" \
"Linphone is already installed. $\n$\nDo you want to continue and uninstall the old version before installing the new one?" \
IDOK uninst
Abort
......
FindWindow $0 "" "Linphone"
StrCmp $0 0 notRunningInUninstall
MessageBox MB_OK|MB_ICONEXCLAMATION "Linphone is running. Please close it first and restart the uninstall program." /SD IDOK
Abort
notRunningInUninstall:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment