diff options
author | Daniel Molkentin <danimo@owncloud.com> | 2012-09-27 12:37:15 +0400 |
---|---|---|
committer | Daniel Molkentin <danimo@owncloud.com> | 2012-09-27 12:38:31 +0400 |
commit | af99be4cd5028ffb9cf21d267a726c026e952b42 (patch) | |
tree | aeeaa053c95df97a80811b90544014981bc05a06 /cmake | |
parent | d9d043218745cdf65afd4c21b8aaddcb6273cf77 (diff) |
NSIS: shut down binary before uninstall
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/NSIS.template.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/modules/NSIS.template.in b/cmake/modules/NSIS.template.in index 4c0e0ad54..11928c2ba 100644 --- a/cmake/modules/NSIS.template.in +++ b/cmake/modules/NSIS.template.in @@ -498,6 +498,10 @@ Function un.UnPageUserAppDataLeave ${NSD_GetState} $UnPageUserAppDataCheckbox $UnPageUserAppDataCheckbox_State FunctionEnd +Function un.EnsureOwncloudShutdown + !insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}" +FunctionEnd + Section Uninstall IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" owncloud_installed MessageBox MB_YESNO "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES owncloud_installed @@ -649,6 +653,9 @@ Function un.onInit StrCmp $R0 0 +3 MessageBox MB_OK|MB_ICONEXCLAMATION "This uninstaller is already running." Abort + + ;Shutdown ${APPLICATION_NAME} in order to remove locked files. + Call un.EnsureOwncloudShutdown FunctionEnd Function un.onUnInstSuccess |