2012-04-02 15:44:24 +04:00
|
|
|
;ownCloud installer script.
|
|
|
|
|
2013-08-23 17:37:24 +04:00
|
|
|
!define APPLICATION_SHORTNAME "@APPLICATION_EXECUTABLE@"
|
2012-09-20 11:19:26 +04:00
|
|
|
!define APPLICATION_NAME "@APPLICATION_NAME@"
|
2012-09-21 15:09:33 +04:00
|
|
|
!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
2012-09-20 11:19:26 +04:00
|
|
|
!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
|
2014-03-19 02:56:50 +04:00
|
|
|
!define APPLICATION_CMD_EXECUTABLE "@APPLICATION_EXECUTABLE@cmd.exe"
|
2012-09-20 11:19:26 +04:00
|
|
|
!define APPLICATION_DOMAIN "@APPLICATION_DOMAIN@"
|
2012-10-12 16:41:21 +04:00
|
|
|
!define APPLICATION_LICENSE "@APPLICATION_LICENSE@"
|
2018-05-18 09:29:40 +03:00
|
|
|
!define APPLICATION_VIRTUALFILE_SUFFIX "@APPLICATION_VIRTUALFILE_SUFFIX@"
|
|
|
|
!define APPLICATION_VIRTUALFILE_FILECLASS "@APPLICATION_EXECUTABLE@.@APPLICATION_VIRTUALFILE_SUFFIX@"
|
2013-01-09 19:29:50 +04:00
|
|
|
!define WIN_SETUP_BITMAP_PATH "@WIN_SETUP_BITMAP_PATH@"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
2014-08-30 16:12:40 +04:00
|
|
|
!define CRASHREPORTER_EXECUTABLE "@CRASHREPORTER_EXECUTABLE@"
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Some installer script options (comment-out options not required)
|
|
|
|
;-----------------------------------------------------------------------------
|
2012-11-02 19:14:33 +04:00
|
|
|
!if "@APPLICATION_LICENSE@" != ""
|
|
|
|
!define OPTION_LICENSE_AGREEMENT
|
|
|
|
!endif
|
2012-04-02 15:44:24 +04:00
|
|
|
!define OPTION_UAC_PLUGIN_ENHANCED
|
2014-08-06 12:40:55 +04:00
|
|
|
!define OPTION_SECTION_SC_SHELL_EXT
|
2012-04-02 15:44:24 +04:00
|
|
|
!define OPTION_SECTION_SC_START_MENU
|
|
|
|
!define OPTION_SECTION_SC_DESKTOP
|
|
|
|
!define OPTION_SECTION_SC_QUICK_LAUNCH
|
|
|
|
!define OPTION_FINISHPAGE
|
|
|
|
!define OPTION_FINISHPAGE_LAUNCHER
|
|
|
|
; !define OPTION_FINISHPAGE_RELEASE_NOTES
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Some paths.
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
!ifndef MING_PATH
|
|
|
|
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
|
|
|
|
!endif
|
|
|
|
!define MING_BIN "${MING_PATH}/bin"
|
|
|
|
!define MING_LIB "${MING_PATH}/lib"
|
2013-02-21 19:35:33 +04:00
|
|
|
!define MING_SHARE "${MING_PATH}/share"
|
2012-04-02 15:44:24 +04:00
|
|
|
!define BUILD_PATH "@CMAKE_BINARY_DIR@"
|
|
|
|
!define SOURCE_PATH "@CMAKE_SOURCE_DIR@"
|
|
|
|
!define QT_DLL_PATH "${MING_BIN}"
|
2014-03-25 22:01:49 +04:00
|
|
|
!define ACCESSIBLE_DLL_PATH "${MING_LIB}/qt5/plugins/accessible"
|
|
|
|
!define SQLITE_DLL_PATH "${MING_LIB}/qt5/plugins/sqldrivers"
|
|
|
|
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt5/plugins/imageformats"
|
|
|
|
!define PLATFORMS_DLL_PATH "${MING_LIB}/qt5/plugins/platforms"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
2012-04-26 19:16:34 +04:00
|
|
|
!define CSYNC_LIBRARY_DIR "@CSYNC_LIBRARY_DIR@"
|
|
|
|
!define CSYNC_CONFIG_DIR "@CSYNC_CONFIG_DIR@"
|
2012-04-26 18:55:14 +04:00
|
|
|
|
2012-10-12 16:41:21 +04:00
|
|
|
!define NSI_PATH "${source_path}/admin/win/nsi"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Installer version
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
!define VER_MAJOR "@CPACK_PACKAGE_VERSION_MAJOR@"
|
|
|
|
!define VER_MINOR "@CPACK_PACKAGE_VERSION_MINOR@"
|
2013-12-09 19:35:30 +04:00
|
|
|
!define VER_PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
|
|
|
|
!define VER_BUILD "@CPACK_PACKAGE_VERSION_BUILD@"
|
2012-04-02 15:44:24 +04:00
|
|
|
!define VERSION "@CPACK_PACKAGE_VERSION@"
|
|
|
|
|
2014-01-23 19:25:00 +04:00
|
|
|
Var InstallRunIfSilent
|
2014-02-12 20:57:50 +04:00
|
|
|
Var NoAutomaticUpdates
|
2014-01-23 19:25:00 +04:00
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Installer build timestamp.
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
!define /date BUILD_TIME "built on %Y/%m/%d at %I:%M %p"
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Initial installer setup and definitions.
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
Name "@CPACK_NSIS_PACKAGE_NAME@"
|
|
|
|
BrandingText "${APPLICATION_NAME} ${VERSION} -- ${BUILD_TIME}"
|
|
|
|
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
|
|
|
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
2014-02-12 15:17:32 +04:00
|
|
|
InstallDirRegKey HKCU "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
|
2012-04-02 15:44:24 +04:00
|
|
|
InstType Standard
|
|
|
|
InstType Full
|
|
|
|
InstType Minimal
|
|
|
|
CRCCheck On
|
|
|
|
SetCompressor @CPACK_NSIS_COMPRESSOR@
|
|
|
|
RequestExecutionLevel user ;Now using the UAC plugin.
|
|
|
|
ReserveFile NSIS.InstallOptions.ini
|
|
|
|
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
|
|
|
|
|
|
|
@CPACK_NSIS_SECTION_SELECTED_VARS@
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Include some required header files.
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
!include LogicLib.nsh ;Used by APPDATA uninstaller.
|
|
|
|
!include MUI2.nsh ;Used by APPDATA uninstaller.
|
|
|
|
!include InstallOptions.nsh ;Required by MUI2 to support old MUI_INSTALLOPTIONS.
|
|
|
|
!include Memento.nsh ;Remember user selections.
|
|
|
|
!include WinVer.nsh ;Windows version detection.
|
|
|
|
!include WordFunc.nsh ;Used by VersionCompare macro function.
|
2014-01-23 19:25:00 +04:00
|
|
|
!include FileFunc.nsh ;Used to read out parameters
|
2012-04-02 15:44:24 +04:00
|
|
|
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
|
2015-03-13 16:04:16 +03:00
|
|
|
!include nsProcess.nsh ;Used to kill the running process
|
2014-08-20 18:07:22 +04:00
|
|
|
!include Library.nsh ;Used by the COM registration for shell extensions
|
2014-08-06 12:40:55 +04:00
|
|
|
!include x64.nsh ;Used to determine the right arch for the shell extensions
|
2012-04-02 15:44:24 +04:00
|
|
|
|
2018-03-21 14:23:31 +03:00
|
|
|
!include ${source_path}/admin/win/nsi/lib/fileassoc.nsh
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Memento selections stored in registry.
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
!define MEMENTO_REGISTRY_ROOT HKLM
|
2012-09-20 11:19:26 +04:00
|
|
|
!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPLICATION_NAME}"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
2015-09-10 10:35:11 +03:00
|
|
|
; Modern User Interface (MUI) definitions and setup.
|
2012-04-02 15:44:24 +04:00
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
!define MUI_ABORTWARNING
|
|
|
|
!define MUI_ICON ${NSI_PATH}\installer.ico
|
|
|
|
!define MUI_UNICON ${NSI_PATH}\installer.ico
|
2013-01-09 19:29:50 +04:00
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/welcome.bmp
|
2012-04-02 15:44:24 +04:00
|
|
|
!define MUI_HEADERIMAGE
|
2013-01-09 19:29:50 +04:00
|
|
|
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
|
2012-04-02 15:44:24 +04:00
|
|
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
2017-03-06 17:40:10 +03:00
|
|
|
; We removed this, h1 issue 191687
|
|
|
|
;!define MUI_FINISHPAGE_LINK "${APPLICATION_DOMAIN}"
|
|
|
|
;!define MUI_FINISHPAGE_LINK_LOCATION "http://${APPLICATION_DOMAIN}"
|
2012-04-02 15:44:24 +04:00
|
|
|
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
|
|
|
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
|
|
|
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
|
|
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NOTES.txt"
|
2013-12-10 03:43:58 +04:00
|
|
|
!define MUI_FINISHPAGE_SHOWREADME_TEXT $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING
|
2012-04-02 15:44:24 +04:00
|
|
|
!endif
|
|
|
|
!ifdef OPTION_FINISHPAGE_LAUNCHER
|
|
|
|
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
|
|
!define MUI_FINISHPAGE_RUN
|
|
|
|
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchApplication"
|
|
|
|
!endif
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Page macros.
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
|
|
!ifdef OPTION_LICENSE_AGREEMENT
|
2013-01-09 19:29:50 +04:00
|
|
|
!insertmacro MUI_PAGE_LICENSE "${APPLICATION_LICENSE}"
|
2012-04-02 15:44:24 +04:00
|
|
|
!endif
|
|
|
|
Page custom PageReinstall PageLeaveReinstall
|
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
!ifdef OPTION_FINISHPAGE
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
!endif
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Other MUI macros.
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
|
|
|
|
2013-12-10 03:43:58 +04:00
|
|
|
!include ${source_path}/admin/win/nsi/l10n/languages.nsh
|
|
|
|
!include ${source_path}/admin/win/nsi/l10n/declarations.nsh
|
|
|
|
|
2014-06-05 10:32:23 +04:00
|
|
|
; Set version strings with english locale
|
|
|
|
VIProductVersion "${VERSION}"
|
|
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPLICATION_NAME}"
|
|
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${APPLICATION_VENDOR}"
|
|
|
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VERSION}"
|
|
|
|
|
2014-01-17 15:09:57 +04:00
|
|
|
!macro SETLANG un
|
|
|
|
Function ${un}SetLang
|
|
|
|
# load the selected language file
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\English.nsh"
|
|
|
|
StrCmp $LANGUAGE ${LANG_GERMAN} German 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_GREEK} Greek 0
|
2015-05-25 22:45:43 +03:00
|
|
|
StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
|
|
|
|
StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
|
2015-08-03 21:02:11 +03:00
|
|
|
StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
|
2015-05-25 22:45:43 +03:00
|
|
|
StrCmp $LANGUAGE ${LANG_TURKISH} Turkish 0
|
2015-05-25 22:20:08 +03:00
|
|
|
StrCmp $LANGUAGE ${LANG_NORWEGIAN} Norwegian 0
|
2014-01-17 15:09:57 +04:00
|
|
|
StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
|
|
|
|
German:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\German.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Dutch:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Dutch.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Finnish:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Finnish.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Japanese:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Japanese.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Slovenian:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Slovenian.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Spanish:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Spanish.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Italian:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Italian.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Estonian:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Estonian.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Greek:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Greek.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Basque:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Basque.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Galician:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Galician.nsh"
|
|
|
|
Goto EndLanguageCmp
|
2015-08-03 21:02:11 +03:00
|
|
|
Polish:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Polish.nsh"
|
|
|
|
Goto EndLanguageCmp
|
2014-01-17 15:09:57 +04:00
|
|
|
Turkish:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Turkish.nsh"
|
|
|
|
Goto EndLanguageCmp
|
|
|
|
Brazilian:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\PortugueseBR.nsh"
|
2015-05-25 22:20:08 +03:00
|
|
|
Goto EndLanguageCmp
|
|
|
|
Norwegian:
|
|
|
|
!include "${source_path}/admin/win/nsi/l10n\Norwegian.nsh"
|
2014-01-17 15:09:57 +04:00
|
|
|
EndLanguageCmp:
|
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
!macroend
|
|
|
|
|
|
|
|
!insertmacro SETLANG ""
|
|
|
|
!insertmacro SETLANG "un."
|
|
|
|
|
2014-01-18 02:51:52 +04:00
|
|
|
; Usage: ${If} ${HasSection} SectionName
|
|
|
|
!macro _HasSection _a _b _t _f
|
|
|
|
ReadRegDWORD $_LOGICLIB_TEMP "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "MementoSection_${_b}"
|
|
|
|
IntCmpU $_LOGICLIB_TEMP 0 ${_f} ${_t}
|
|
|
|
!macroend
|
|
|
|
!define HasSection `"" HasSection`
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
##############################################################################
|
|
|
|
# #
|
|
|
|
# FINISH PAGE LAUNCHER FUNCTIONS #
|
|
|
|
# #
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
Function LaunchApplication
|
2015-05-28 16:54:52 +03:00
|
|
|
!insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "" ""
|
2012-04-02 15:44:24 +04:00
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# #
|
|
|
|
# PROCESS HANDLING FUNCTIONS AND MACROS #
|
|
|
|
# #
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
!macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
|
2015-03-13 16:04:16 +03:00
|
|
|
${nsProcess::FindProcess} ${processName} $R0
|
2015-06-04 13:39:20 +03:00
|
|
|
StrCmp $R0 0 ${gotoWhenFound} ${gotoWhenNotFound}
|
2012-04-02 15:44:24 +04:00
|
|
|
!macroend
|
|
|
|
|
|
|
|
!macro ConfirmEndProcess processName
|
|
|
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
|
2013-12-10 03:43:58 +04:00
|
|
|
$ConfirmEndProcess_MESSAGEBOX_TEXT \
|
2015-02-17 19:22:02 +03:00
|
|
|
/SD IDYES IDYES process_${processName}_kill IDNO process_${processName}_ended
|
2012-04-02 15:44:24 +04:00
|
|
|
process_${processName}_kill:
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $ConfirmEndProcess_KILLING_PROCESSES_TEXT
|
2015-03-13 16:04:16 +03:00
|
|
|
${nsProcess::KillProcess} ${processName} $R0
|
2012-04-02 15:44:24 +04:00
|
|
|
Sleep 1500
|
|
|
|
StrCmp $R0 "1" process_${processName}_ended
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $ConfirmEndProcess_KILL_NOT_FOUND_TEXT
|
2012-04-02 15:44:24 +04:00
|
|
|
process_${processName}_ended:
|
|
|
|
!macroend
|
|
|
|
|
|
|
|
!macro CheckAndConfirmEndProcess processName
|
|
|
|
!insertmacro CheckForProcess ${processName} 0 no_process_${processName}_to_end
|
|
|
|
!insertmacro ConfirmEndProcess ${processName}
|
|
|
|
no_process_${processName}_to_end:
|
|
|
|
!macroend
|
|
|
|
|
|
|
|
Function EnsureOwncloudShutdown
|
|
|
|
!insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
|
|
|
|
FunctionEnd
|
|
|
|
|
2014-08-07 17:54:06 +04:00
|
|
|
Function InstallRedistributables
|
|
|
|
${If} ${RunningX64}
|
|
|
|
ExecWait '"$OUTDIR\vcredist_x64.exe" /install /quiet'
|
|
|
|
${Else}
|
|
|
|
ExecWait '"$OUTDIR\vcredist_x86.exe" /install /quiet'
|
|
|
|
${EndIf}
|
|
|
|
Delete "$OUTDIR\vcredist_x86.exe"
|
|
|
|
Delete "$OUTDIR\vcredist_x64.exe"
|
|
|
|
FunctionEnd
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
##############################################################################
|
|
|
|
# #
|
|
|
|
# RE-INSTALLER FUNCTIONS #
|
|
|
|
# #
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
Function PageReinstall
|
2014-02-12 15:17:32 +04:00
|
|
|
ReadRegStr $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
|
2012-04-02 15:44:24 +04:00
|
|
|
StrCmp $R0 "" 0 +2
|
|
|
|
Abort
|
|
|
|
|
|
|
|
;Detect version
|
2014-02-12 15:17:32 +04:00
|
|
|
ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor"
|
2012-04-02 15:44:24 +04:00
|
|
|
IntCmp $R0 ${VER_MAJOR} minor_check new_version older_version
|
|
|
|
minor_check:
|
2014-02-12 15:17:32 +04:00
|
|
|
ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor"
|
2013-12-09 19:35:30 +04:00
|
|
|
IntCmp $R0 ${VER_MINOR} rev_check new_version older_version
|
|
|
|
rev_check:
|
2014-02-12 15:17:32 +04:00
|
|
|
ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision"
|
2013-12-09 19:35:30 +04:00
|
|
|
IntCmp $R0 ${VER_PATCH} build_check new_version older_version
|
2012-04-02 15:44:24 +04:00
|
|
|
build_check:
|
2014-02-12 15:17:32 +04:00
|
|
|
ReadRegDWORD $R0 HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild"
|
2012-04-02 15:44:24 +04:00
|
|
|
IntCmp $R0 ${VER_BUILD} same_version new_version older_version
|
|
|
|
|
|
|
|
new_version:
|
2013-12-10 03:43:58 +04:00
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_NEW_Field_1
|
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_NEW_Field_2
|
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_NEW_Field_3
|
|
|
|
!insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE
|
2012-04-02 15:44:24 +04:00
|
|
|
StrCpy $R0 "1"
|
|
|
|
Goto reinst_start
|
|
|
|
|
|
|
|
older_version:
|
2013-12-10 03:43:58 +04:00
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_OLD_Field_1
|
2014-02-05 14:58:53 +04:00
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_NEW_Field_2
|
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_NEW_Field_3
|
|
|
|
!insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE
|
2012-04-02 15:44:24 +04:00
|
|
|
StrCpy $R0 "1"
|
|
|
|
Goto reinst_start
|
|
|
|
|
|
|
|
same_version:
|
2013-12-10 03:43:58 +04:00
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 1" "Text" $PageReinstall_SAME_Field_1
|
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 2" "Text" $PageReinstall_SAME_Field_2
|
|
|
|
!insertmacro INSTALLOPTIONS_WRITE "NSIS.InstallOptions.ini" "Field 3" "Text" $PageReinstall_SAME_Field_3
|
|
|
|
!insertmacro MUI_HEADER_TEXT $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE
|
2012-04-02 15:44:24 +04:00
|
|
|
StrCpy $R0 "2"
|
|
|
|
|
|
|
|
reinst_start:
|
|
|
|
!insertmacro INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function PageLeaveReinstall
|
|
|
|
!insertmacro INSTALLOPTIONS_READ $R1 "NSIS.InstallOptions.ini" "Field 2" "State"
|
|
|
|
StrCmp $R0 "1" 0 +2
|
|
|
|
StrCmp $R1 "1" reinst_uninstall reinst_done
|
|
|
|
StrCmp $R0 "2" 0 +3
|
|
|
|
StrCmp $R1 "1" reinst_done reinst_uninstall
|
|
|
|
reinst_uninstall:
|
2014-01-18 03:06:31 +04:00
|
|
|
ReadRegStr $R1 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "UninstallString"
|
2012-04-02 15:44:24 +04:00
|
|
|
HideWindow
|
|
|
|
ClearErrors
|
|
|
|
ExecWait '$R1 _?=$INSTDIR'
|
|
|
|
IfErrors no_remove_uninstaller
|
|
|
|
IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" no_remove_uninstaller
|
|
|
|
Delete $R1
|
|
|
|
RMDir $INSTDIR
|
|
|
|
no_remove_uninstaller:
|
|
|
|
StrCmp $R0 "2" 0 +3
|
|
|
|
Quit
|
|
|
|
BringToFront
|
|
|
|
reinst_done:
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# #
|
|
|
|
# INSTALLER SECTIONS #
|
|
|
|
# #
|
|
|
|
##############################################################################
|
2013-04-22 12:22:16 +04:00
|
|
|
Section "${APPLICATION_NAME}" SEC_APPLICATION
|
2012-04-02 15:44:24 +04:00
|
|
|
SectionIn 1 2 3 RO
|
|
|
|
SetDetailsPrint listonly
|
|
|
|
|
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $SEC_APPLICATION_DETAILS
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint listonly
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
|
2014-01-23 18:55:55 +04:00
|
|
|
;Main executable & csync
|
2014-01-17 15:10:42 +04:00
|
|
|
File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
|
2014-03-19 02:56:50 +04:00
|
|
|
File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}"
|
2015-02-04 15:15:06 +03:00
|
|
|
File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}sync.dll"
|
2018-06-20 10:53:21 +03:00
|
|
|
File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}_csync.dll"
|
2014-01-23 18:55:55 +04:00
|
|
|
|
2015-02-08 00:32:42 +03:00
|
|
|
File "${BUILD_PATH}\src\gui\client*.qm"
|
2014-01-17 15:10:42 +04:00
|
|
|
; Make sure only to copy qt, not qt_help, etc
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${MING_SHARE}\qt5\translations\qt_??.qm"
|
|
|
|
File "${MING_SHARE}\qt5\translations\qt_??_??.qm"
|
2014-10-17 18:37:37 +04:00
|
|
|
File "${MING_SHARE}\qt5\translations\qtbase_*.qm"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${MING_SHARE}\qt5\translations\qtkeychain_*.qm"
|
2014-01-17 15:10:42 +04:00
|
|
|
|
2014-08-30 16:12:40 +04:00
|
|
|
;Add crash reporter if it was built
|
|
|
|
File /nonfatal "${BUILD_PATH}/bin/${CRASHREPORTER_EXECUTABLE}.exe"
|
|
|
|
|
2014-03-25 22:01:49 +04:00
|
|
|
SetOutPath "$INSTDIR\platforms"
|
|
|
|
File "${PLATFORMS_DLL_PATH}\qwindows.dll"
|
2014-01-17 15:10:42 +04:00
|
|
|
SetOutPath "$INSTDIR\imageformats"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${IMAGEFORMATS_DLL_PATH}\qgif.dll"
|
|
|
|
File "${IMAGEFORMATS_DLL_PATH}\qjpeg.dll"
|
|
|
|
File "${IMAGEFORMATS_DLL_PATH}\qico.dll"
|
2018-05-29 17:09:17 +03:00
|
|
|
File "${IMAGEFORMATS_DLL_PATH}\qsvg.dll"
|
|
|
|
; PNG is built in Qt
|
2014-01-17 15:10:42 +04:00
|
|
|
|
|
|
|
SetOutPath "$INSTDIR\sqldrivers"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${SQLITE_DLL_PATH}\qsqlite.dll"
|
2014-01-17 15:10:42 +04:00
|
|
|
|
|
|
|
SetOutPath "$INSTDIR"
|
2012-04-02 15:44:24 +04:00
|
|
|
;License & release notes.
|
|
|
|
File "@CPACK_RESOURCE_FILE_LICENSE@"
|
2013-04-23 19:18:00 +04:00
|
|
|
;File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
|
2012-04-02 15:44:24 +04:00
|
|
|
|
2016-08-05 13:35:52 +03:00
|
|
|
;Qt config:
|
|
|
|
File "${NSI_PATH}\qt.conf"
|
|
|
|
|
2014-01-23 18:55:55 +04:00
|
|
|
;Qt stuff:
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${QT_DLL_PATH}\Qt5Core.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5Gui.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5Network.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5PrintSupport.dll"
|
2018-05-29 14:35:43 +03:00
|
|
|
File "${QT_DLL_PATH}\Qt5Svg.dll"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${QT_DLL_PATH}\Qt5Qml.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5Sql.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5WebKit.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5WebKitWidgets.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5Widgets.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5Xml.dll"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
2015-01-28 10:33:27 +03:00
|
|
|
;QtWebKit dependencies
|
|
|
|
File "${QT_DLL_PATH}\Qt5Multimedia.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5MultimediaWidgets.dll"
|
|
|
|
File "${QT_DLL_PATH}\Qt5Sensors.dll"
|
|
|
|
|
2014-01-23 18:55:55 +04:00
|
|
|
;Qt deps
|
2014-06-20 17:50:37 +04:00
|
|
|
File "${MING_BIN}\libpng16-16.dll"
|
2017-01-05 23:32:52 +03:00
|
|
|
File "${MING_BIN}\icudata56.dll"
|
|
|
|
File "${MING_BIN}\icui18n56.dll"
|
|
|
|
File "${MING_BIN}\icuuc56.dll"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${MING_BIN}\libEGL.dll"
|
|
|
|
File "${MING_BIN}\libGLESv2.dll"
|
|
|
|
File "${MING_BIN}\libjpeg-8.dll"
|
|
|
|
File "${MING_BIN}\libpcre16-0.dll"
|
|
|
|
File "${MING_BIN}\libsqlite3-0.dll"
|
2014-03-26 12:09:57 +04:00
|
|
|
File "${MING_BIN}\libcrypto-10.dll"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${MING_BIN}\libssl-10.dll"
|
|
|
|
File "${MING_BIN}\libstdc++-6.dll"
|
2017-01-05 23:32:52 +03:00
|
|
|
File "${MING_BIN}\libwebp-5.dll"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${MING_BIN}\libxslt-1.dll"
|
2015-01-28 10:33:27 +03:00
|
|
|
File "${MING_BIN}\libxml2-2.dll"
|
2014-03-25 22:01:49 +04:00
|
|
|
File "${MING_BIN}\zlib1.dll"
|
2017-01-05 23:32:52 +03:00
|
|
|
File "${MING_BIN}\libharfbuzz-0.dll"
|
|
|
|
File "${MING_BIN}\libfreetype-6.dll"
|
|
|
|
File "${MING_BIN}\libglib-2.0-0.dll"
|
|
|
|
File "${MING_BIN}\libintl-8.dll"
|
2014-01-23 18:55:55 +04:00
|
|
|
|
|
|
|
;QtKeyChain stuff
|
2014-08-05 15:11:15 +04:00
|
|
|
File "${MING_BIN}\libqt5keychain.dll"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
;MinGW stuff
|
|
|
|
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
|
|
|
|
File "${MING_BIN}\libstdc++-6.dll"
|
2014-06-20 16:58:05 +04:00
|
|
|
File "${MING_BIN}\libwinpthread-1.dll"
|
2018-01-04 22:43:50 +03:00
|
|
|
File "${MING_BIN}\libssp-0.dll"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
2014-08-07 17:54:06 +04:00
|
|
|
;CSync configs
|
2012-09-27 15:16:14 +04:00
|
|
|
File "${SOURCE_PATH}/sync-exclude.lst"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
2018-03-21 14:23:31 +03:00
|
|
|
;Add file association
|
2018-05-18 09:29:40 +03:00
|
|
|
!insertmacro APP_ASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}" "Virtual File for Remote File" "$INSTDIR\${APPLICATION_EXECUTABLE},0" "Download" "$INSTDIR\${APPLICATION_EXECUTABLE} $\"%1$\""
|
2018-03-21 14:23:31 +03:00
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
SectionEnd
|
|
|
|
|
2014-08-06 12:40:55 +04:00
|
|
|
!ifdef OPTION_SECTION_SC_SHELL_EXT
|
|
|
|
${MementoSection} $OPTION_SECTION_SC_SHELL_EXT_SECTION SEC_SHELL_EXT
|
|
|
|
SectionIn 1 2
|
|
|
|
SetDetailsPrint textonly
|
|
|
|
DetailPrint $OPTION_SECTION_SC_SHELL_EXT_DetailPrint
|
2014-08-07 17:54:06 +04:00
|
|
|
File "${BUILD_PATH}\vcredist_x86.exe"
|
|
|
|
File "${BUILD_PATH}\vcredist_x64.exe"
|
|
|
|
Call InstallRedistributables
|
2014-12-09 20:28:22 +03:00
|
|
|
!define LIBRARY_COM
|
|
|
|
!define LIBRARY_SHELL_EXTENSION
|
2015-06-10 17:23:37 +03:00
|
|
|
!define LIBRARY_IGNORE_VERSION
|
2014-08-20 18:07:22 +04:00
|
|
|
${If} ${RunningX64}
|
|
|
|
!define LIBRARY_X64
|
2022-12-21 14:20:46 +03:00
|
|
|
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCUtil_x64.dll" "$INSTDIR\OCUtil_x64.dll" "$INSTDIR"
|
|
|
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCOverlays_x64.dll" "$INSTDIR\OCOverlays_x64.dll" "$INSTDIR"
|
|
|
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\x64\OCContextMenu_x64.dll" "$INSTDIR\OCContextMenu_x64.dll" "$INSTDIR"
|
2014-08-20 18:07:22 +04:00
|
|
|
!undef LIBRARY_X64
|
|
|
|
${Else}
|
2022-12-21 14:20:46 +03:00
|
|
|
!insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCUtil_x86.dll" "$INSTDIR\OCUtil_x86.dll" "$INSTDIR"
|
|
|
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCOverlays_x86.dll" "$INSTDIR\OCOverlays_x86.dll" "$INSTDIR"
|
|
|
|
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_PROTECTED "${SOURCE_PATH}\binary\shell_integration\windows\Release\Win32\OCContextMenu_x86.dll" "$INSTDIR\OCContextMenu_x86.dll" "$INSTDIR"
|
2014-08-20 18:07:22 +04:00
|
|
|
${Endif}
|
2014-12-09 20:28:22 +03:00
|
|
|
!undef LIBRARY_COM
|
|
|
|
!undef LIBRARY_SHELL_EXTENSION
|
2015-06-10 17:23:37 +03:00
|
|
|
!undef LIBRARY_IGNORE_VERSION
|
2014-08-06 12:40:55 +04:00
|
|
|
${MementoSectionEnd}
|
|
|
|
!endif
|
|
|
|
|
2013-12-10 20:11:39 +04:00
|
|
|
SectionGroup $SectionGroup_Shortcuts
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
!ifdef OPTION_SECTION_SC_START_MENU
|
2013-12-10 03:43:58 +04:00
|
|
|
${MementoSection} $OPTION_SECTION_SC_START_MENU_SECTION SEC_START_MENU
|
2012-09-24 05:45:12 +04:00
|
|
|
SectionIn 1 2 3
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $OPTION_SECTION_SC_START_MENU_DetailPrint
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint listonly
|
|
|
|
SetShellVarContext all
|
2013-11-14 17:41:08 +04:00
|
|
|
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
2012-04-02 15:44:24 +04:00
|
|
|
SetShellVarContext current
|
|
|
|
${MementoSectionEnd}
|
|
|
|
!endif
|
|
|
|
|
|
|
|
!ifdef OPTION_SECTION_SC_DESKTOP
|
2013-12-10 03:43:58 +04:00
|
|
|
${MementoSection} $OPTION_SECTION_SC_DESKTOP_SECTION SEC_DESKTOP
|
2012-04-02 15:44:24 +04:00
|
|
|
SectionIn 1 2
|
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $OPTION_SECTION_SC_DESKTOP_DetailPrint
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint listonly
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext all
|
2012-04-02 15:44:24 +04:00
|
|
|
CreateShortCut "$DESKTOP\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext current
|
2012-04-02 15:44:24 +04:00
|
|
|
${MementoSectionEnd}
|
|
|
|
!endif
|
|
|
|
|
|
|
|
!ifdef OPTION_SECTION_SC_QUICK_LAUNCH
|
2013-12-10 03:43:58 +04:00
|
|
|
${MementoSection} $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION SEC_QUICK_LAUNCH
|
2012-04-02 15:44:24 +04:00
|
|
|
SectionIn 1 2
|
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext all
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint listonly
|
|
|
|
CreateShortCut "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext current
|
2012-04-02 15:44:24 +04:00
|
|
|
${MementoSectionEnd}
|
|
|
|
!endif
|
|
|
|
|
|
|
|
SectionGroupEnd
|
|
|
|
|
|
|
|
${MementoSectionDone}
|
|
|
|
|
|
|
|
; Installer section descriptions
|
|
|
|
;--------------------------------
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
2013-12-10 03:43:58 +04:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APPLICATION} $OPTION_SECTION_SC_APPLICATION_Desc
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} $OPTION_SECTION_SC_START_MENU_Desc
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} $OPTION_SECTION_SC_DESKTOP_Desc
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} $OPTION_SECTION_SC_QUICK_LAUNCH_Desc
|
2012-04-02 15:44:24 +04:00
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
|
|
|
2013-12-10 03:43:58 +04:00
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
Section -post
|
|
|
|
|
|
|
|
;Uninstaller file.
|
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $UNINSTALLER_FILE_Detail
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint listonly
|
|
|
|
WriteUninstaller $INSTDIR\uninstall.exe
|
|
|
|
|
|
|
|
;Registry keys required for installer version handling and uninstaller.
|
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $UNINSTALLER_REGISTRY_Detail
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint listonly
|
|
|
|
|
2015-09-10 10:35:11 +03:00
|
|
|
;Version numbers used to detect existing installation version for comparison.
|
2014-02-12 15:17:32 +04:00
|
|
|
WriteRegStr HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "" $INSTDIR
|
|
|
|
WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor" "${VER_MAJOR}"
|
|
|
|
WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor" "${VER_MINOR}"
|
|
|
|
WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision" "${VER_PATCH}"
|
|
|
|
WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild" "${VER_BUILD}"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
;Add or Remove Programs entry.
|
2014-01-18 03:06:31 +04:00
|
|
|
WriteRegExpandStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
|
|
|
WriteRegExpandStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
|
|
|
|
WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayName" "${APPLICATION_NAME}"
|
|
|
|
WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "Publisher" "${APPLICATION_VENDOR}"
|
|
|
|
WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"
|
|
|
|
WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "DisplayVersion" "${VERSION}"
|
|
|
|
WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "VersionMajor" "${VER_MAJOR}"
|
2014-02-05 14:58:53 +04:00
|
|
|
WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "VersionMinor" "${VER_MINOR}.${VER_PATCH}.${VER_BUILD}"
|
2014-01-18 03:06:31 +04:00
|
|
|
WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "URLInfoAbout" "http://${APPLICATION_DOMAIN}/"
|
|
|
|
WriteRegStr ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "HelpLink" "http://${APPLICATION_DOMAIN}/"
|
|
|
|
WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "NoModify" "1"
|
|
|
|
WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "NoRepair" "1"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
|
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $UNINSTALLER_FINISHED_Detail
|
2012-04-02 15:44:24 +04:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# #
|
|
|
|
# UNINSTALLER SECTION #
|
|
|
|
# #
|
|
|
|
##############################################################################
|
|
|
|
|
2012-09-27 12:37:15 +04:00
|
|
|
Function un.EnsureOwncloudShutdown
|
|
|
|
!insertmacro CheckAndConfirmEndProcess "${APPLICATION_EXECUTABLE}"
|
|
|
|
FunctionEnd
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
Section Uninstall
|
|
|
|
IfFileExists "$INSTDIR\${APPLICATION_EXECUTABLE}" owncloud_installed
|
2014-01-18 02:51:52 +04:00
|
|
|
MessageBox MB_YESNO $UNINSTALL_MESSAGEBOX /SD IDYES IDYES owncloud_installed
|
2013-12-10 03:43:58 +04:00
|
|
|
Abort $UNINSTALL_ABORT
|
2012-04-02 15:44:24 +04:00
|
|
|
owncloud_installed:
|
|
|
|
|
2017-10-20 19:58:47 +03:00
|
|
|
; Delete Navigation Pane entries added for Windows 10.
|
|
|
|
; On 64bit Windows, the client will be writing to the 64bit registry.
|
|
|
|
${If} ${RunningX64}
|
|
|
|
SetRegView 64
|
|
|
|
${EndIf}
|
|
|
|
StrCpy $0 0
|
|
|
|
loop:
|
|
|
|
; Look at every registered explorer namespace for HKCU and check if it was added by our application
|
|
|
|
; (we write to a custom "ApplicationName" value there).
|
|
|
|
EnumRegKey $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace" $0
|
|
|
|
StrCmp $1 "" done
|
|
|
|
|
|
|
|
ReadRegStr $R0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1" "ApplicationName"
|
2017-10-26 19:44:38 +03:00
|
|
|
StrCmp $R0 "${APPLICATION_NAME}" deleteClsid
|
2017-10-20 19:58:47 +03:00
|
|
|
; Increment the index when not deleting the enumerated key.
|
|
|
|
IntOp $0 $0 + 1
|
|
|
|
goto loop
|
|
|
|
|
|
|
|
deleteClsid:
|
|
|
|
DetailPrint "Removing Navigation Pane CLSID $1"
|
|
|
|
; Should match FolderMan::updateCloudStorageRegistry
|
|
|
|
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\$1"
|
|
|
|
DeleteRegKey HKCU "Software\Classes\CLSID\$1"
|
|
|
|
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" $1
|
|
|
|
goto loop
|
|
|
|
done:
|
|
|
|
; Go back to the 32bit registry.
|
|
|
|
SetRegView lastused
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
;Delete registry keys.
|
2014-02-12 15:17:32 +04:00
|
|
|
DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionBuild"
|
|
|
|
DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMajor"
|
|
|
|
DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionMinor"
|
|
|
|
DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "VersionRevision"
|
|
|
|
DeleteRegValue HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
|
|
|
|
DeleteRegKey HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}"
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
DeleteRegKey HKCR "${APPLICATION_NAME}"
|
|
|
|
|
2018-03-21 14:23:31 +03:00
|
|
|
;Remove file association
|
2018-05-18 09:29:40 +03:00
|
|
|
!insertmacro APP_UNASSOCIATE "${APPLICATION_VIRTUALFILE_SUFFIX}" "${APPLICATION_VIRTUALFILE_FILECLASS}"
|
2018-03-21 14:23:31 +03:00
|
|
|
|
2014-08-07 17:54:06 +04:00
|
|
|
;Shell extension
|
|
|
|
!ifdef OPTION_SECTION_SC_SHELL_EXT
|
2014-08-20 18:07:22 +04:00
|
|
|
!define LIBRARY_COM
|
|
|
|
!define LIBRARY_SHELL_EXTENSION
|
2015-06-10 17:23:37 +03:00
|
|
|
!define LIBRARY_IGNORE_VERSION
|
2014-08-07 17:54:06 +04:00
|
|
|
${If} ${HasSection} SEC_SHELL_EXT
|
2014-12-09 20:28:22 +03:00
|
|
|
DetailPrint "Uninstalling x64 overlay DLLs"
|
2014-08-20 18:07:22 +04:00
|
|
|
!define LIBRARY_X64
|
2022-12-21 14:20:46 +03:00
|
|
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCContextMenu_x64.dll"
|
|
|
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCOverlays_x64.dll"
|
|
|
|
!insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCUtil_x64.dll"
|
2014-08-20 18:07:22 +04:00
|
|
|
!undef LIBRARY_X64
|
2014-12-09 20:28:22 +03:00
|
|
|
DetailPrint "Uninstalling x86 overlay DLLs"
|
2022-12-21 14:20:46 +03:00
|
|
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCContextMenu_x86.dll"
|
|
|
|
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCOverlays_x86.dll"
|
|
|
|
!insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\OCUtil_x86.dll"
|
2014-08-07 17:54:06 +04:00
|
|
|
${EndIf}
|
2014-12-09 20:28:22 +03:00
|
|
|
!undef LIBRARY_COM
|
|
|
|
!undef LIBRARY_SHELL_EXTENSION
|
2015-06-10 17:23:37 +03:00
|
|
|
!undef LIBRARY_IGNORE_VERSION
|
2014-12-09 20:28:22 +03:00
|
|
|
!endif
|
2014-08-07 17:54:06 +04:00
|
|
|
|
2014-01-18 02:51:52 +04:00
|
|
|
;Start menu shortcut
|
2012-04-02 15:44:24 +04:00
|
|
|
!ifdef OPTION_SECTION_SC_START_MENU
|
|
|
|
SetShellVarContext all
|
2014-01-18 02:51:52 +04:00
|
|
|
${If} ${HasSection} SEC_START_MENU
|
|
|
|
Delete "$SMPROGRAMS\${APPLICATION_NAME}.lnk"
|
|
|
|
${EndIf}
|
2012-04-02 15:44:24 +04:00
|
|
|
SetShellVarContext current
|
|
|
|
!endif
|
|
|
|
|
|
|
|
;Desktop shortcut.
|
|
|
|
!ifdef OPTION_SECTION_SC_DESKTOP
|
2014-01-18 02:51:52 +04:00
|
|
|
${If} ${HasSection} SEC_DESKTOP
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext all
|
2014-01-18 02:51:52 +04:00
|
|
|
${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
|
|
|
|
Delete "$DESKTOP\${APPLICATION_NAME}.lnk"
|
|
|
|
${EndIf}
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext current
|
2014-01-18 02:51:52 +04:00
|
|
|
${EndIf}
|
2012-04-02 15:44:24 +04:00
|
|
|
!endif
|
|
|
|
|
|
|
|
;Quick Launch shortcut.
|
|
|
|
!ifdef OPTION_SECTION_SC_QUICK_LAUNCH
|
2014-01-18 02:51:52 +04:00
|
|
|
${If} ${HasSection} SEC_QUICK_LAUNCH
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext all
|
2014-01-18 02:51:52 +04:00
|
|
|
${If} ${FileExists} "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
|
|
|
|
Delete "$QUICKLAUNCH\${APPLICATION_NAME}.lnk"
|
|
|
|
${EndIf}
|
2014-10-27 19:25:48 +03:00
|
|
|
SetShellVarContext current
|
2014-01-18 02:51:52 +04:00
|
|
|
${EndIf}
|
2012-04-02 15:44:24 +04:00
|
|
|
!endif
|
|
|
|
|
|
|
|
;Remove all the Program Files.
|
|
|
|
RMDir /r $INSTDIR
|
|
|
|
|
2014-02-11 14:23:34 +04:00
|
|
|
DeleteRegKey ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}"
|
2014-01-18 02:51:52 +04:00
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
SetDetailsPrint textonly
|
2013-12-10 03:43:58 +04:00
|
|
|
DetailPrint $UNINSTALLER_FINISHED_Detail
|
2012-04-02 15:44:24 +04:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# #
|
|
|
|
# NSIS Installer Event Handler Functions #
|
|
|
|
# #
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
Function .onInit
|
2014-01-17 15:09:57 +04:00
|
|
|
SetOutPath $INSTDIR
|
|
|
|
|
2014-01-23 19:25:00 +04:00
|
|
|
${GetParameters} $R0
|
|
|
|
${GetOptions} $R0 "/launch" $R0
|
|
|
|
${IfNot} ${Errors}
|
|
|
|
StrCpy $InstallRunIfSilent "yes"
|
|
|
|
${EndIf}
|
|
|
|
|
2014-02-12 20:57:50 +04:00
|
|
|
${GetParameters} $R0
|
|
|
|
${GetOptions} $R0 "/noautoupdate" $R0
|
|
|
|
${IfNot} ${Errors}
|
|
|
|
StrCpy $NoAutomaticUpdates "yes"
|
|
|
|
${EndIf}
|
|
|
|
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
!insertmacro INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
|
|
|
|
|
2013-12-10 14:10:48 +04:00
|
|
|
; uncomment this line if you want to see the language selection
|
|
|
|
;!insertmacro MUI_LANGDLL_DISPLAY
|
2013-12-10 03:43:58 +04:00
|
|
|
|
2014-01-17 15:09:57 +04:00
|
|
|
Call SetLang
|
2013-12-10 03:43:58 +04:00
|
|
|
|
2014-01-18 02:51:52 +04:00
|
|
|
; Remove Quick Launch option from Windows 7, as no longer applicable - usually.
|
2012-04-02 15:44:24 +04:00
|
|
|
${IfNot} ${AtMostWinVista}
|
2013-12-10 03:43:58 +04:00
|
|
|
SectionSetText ${SEC_QUICK_LAUNCH} $INIT_NO_QUICK_LAUNCH
|
2012-04-02 15:44:24 +04:00
|
|
|
SectionSetFlags ${SEC_QUICK_LAUNCH} ${SF_RO}
|
|
|
|
SectionSetInstTypes ${SEC_QUICK_LAUNCH} 0
|
|
|
|
${EndIf}
|
|
|
|
|
2014-01-18 02:57:07 +04:00
|
|
|
; Some people might have a shortcut called 'ownCloud' pointing elsewhere, see #356
|
|
|
|
; Unselect item and adjust text
|
|
|
|
${If} ${FileExists} "$DESKTOP\${APPLICATION_NAME}.lnk"
|
|
|
|
SectionSetText ${SEC_DESKTOP} $INIT_NO_DESKTOP
|
|
|
|
Push $0
|
|
|
|
SectionSetFlags ${SEC_DESKTOP} 0
|
|
|
|
SectionSetInstTypes ${SEC_DESKTOP} 0
|
|
|
|
Pop $0
|
|
|
|
${EndIf}
|
|
|
|
|
2012-04-02 15:44:24 +04:00
|
|
|
${MementoSectionRestore}
|
|
|
|
|
2015-06-05 09:43:16 +03:00
|
|
|
UAC_TryAgain:
|
2015-07-31 19:25:17 +03:00
|
|
|
!insertmacro UAC_RunElevated
|
2015-06-05 09:43:16 +03:00
|
|
|
${Switch} $0
|
|
|
|
${Case} 0
|
|
|
|
${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
|
|
|
|
${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
|
|
|
|
${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
|
|
|
|
MessageBox mb_YesNo|mb_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND $UAC_INSTALLER_REQUIRE_ADMIN /SD IDNO IDYES UAC_TryAgain IDNO 0
|
|
|
|
${EndIf}
|
|
|
|
;fall-through and die
|
|
|
|
${Case} 1223
|
|
|
|
MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_INSTALLER_REQUIRE_ADMIN
|
|
|
|
Quit
|
|
|
|
${Case} 1062
|
|
|
|
MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_ERROR_LOGON_SERVICE
|
|
|
|
Quit
|
|
|
|
${Default}
|
|
|
|
MessageBox MB_ICONSTOP "$UAC_ERROR_ELEVATE $0"
|
|
|
|
Abort
|
|
|
|
Quit
|
|
|
|
${EndSwitch}
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
;Prevent multiple instances.
|
2015-05-23 10:39:45 +03:00
|
|
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Installer") i .r1 ?e'
|
2012-04-02 15:44:24 +04:00
|
|
|
Pop $R0
|
|
|
|
StrCmp $R0 0 +3
|
2013-12-10 03:43:58 +04:00
|
|
|
MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_INSTALLER_RUNNING
|
2012-04-02 15:44:24 +04:00
|
|
|
Abort
|
|
|
|
|
|
|
|
;Use available InstallLocation when possible. This is useful in the uninstaller
|
|
|
|
;via re-install, which would otherwise use a default location - a bug.
|
2014-01-18 03:06:31 +04:00
|
|
|
ReadRegStr $R0 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation"
|
2012-04-02 15:44:24 +04:00
|
|
|
StrCmp $R0 "" SkipSetInstDir
|
|
|
|
StrCpy $INSTDIR $R0
|
|
|
|
SkipSetInstDir:
|
|
|
|
|
|
|
|
;Shutdown ${APPLICATION_NAME} in case Add/Remove re-installer option used.
|
|
|
|
Call EnsureOwncloudShutdown
|
2016-03-16 16:54:12 +03:00
|
|
|
|
|
|
|
ReadRegStr $R0 ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "InstallLocation"
|
|
|
|
${If} ${Silent}
|
|
|
|
${AndIf} $R0 != ""
|
|
|
|
ExecWait '"$R0\Uninstall.exe" /S _?=$R0'
|
|
|
|
${EndIf}
|
2012-04-02 15:44:24 +04:00
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function .onInstSuccess
|
|
|
|
${MementoSectionSave}
|
2014-01-23 19:25:00 +04:00
|
|
|
|
2014-02-12 20:57:50 +04:00
|
|
|
${If} $NoAutomaticUpdates == "yes"
|
|
|
|
WriteRegDWORD HKLM "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" "skipUpdateCheck" "1"
|
|
|
|
${EndIf}
|
|
|
|
|
2016-03-16 16:54:12 +03:00
|
|
|
; TODO: Only needed to when updating from 2.1.{0,1}. Remove in due time.
|
|
|
|
Delete /REBOOTOK $INSTDIR\bearer\qgenericbearer.dll
|
|
|
|
Delete /REBOOTOK $INSTDIR\bearer\qnativewifibearer.dll
|
|
|
|
RMDir /REBOOTOK $INSTDIR\bearer
|
|
|
|
|
2014-01-23 19:25:00 +04:00
|
|
|
${If} ${Silent}
|
|
|
|
${AndIf} $InstallRunIfSilent == "yes"
|
|
|
|
Call LaunchApplication
|
|
|
|
${EndIf}
|
2012-04-02 15:44:24 +04:00
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function .onInstFailed
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# #
|
|
|
|
# NSIS Uninstaller Event Handler Functions #
|
|
|
|
# #
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
Function un.onInit
|
2014-01-17 15:09:57 +04:00
|
|
|
Call un.SetLang
|
|
|
|
|
2015-06-05 09:43:16 +03:00
|
|
|
UAC_TryAgain:
|
2015-08-04 13:37:54 +03:00
|
|
|
!insertmacro UAC_RunElevated
|
2015-06-05 09:43:16 +03:00
|
|
|
${Switch} $0
|
|
|
|
${Case} 0
|
|
|
|
${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
|
|
|
|
${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
|
|
|
|
${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
|
|
|
|
MessageBox mb_YesNo|mb_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND $UAC_UNINSTALLER_REQUIRE_ADMIN /SD IDNO IDYES UAC_TryAgain IDNO 0
|
|
|
|
${EndIf}
|
|
|
|
;fall-through and die
|
|
|
|
${Case} 1223
|
|
|
|
MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_UNINSTALLER_REQUIRE_ADMIN
|
|
|
|
Quit
|
|
|
|
${Case} 1062
|
|
|
|
MessageBox MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND $UAC_ERROR_LOGON_SERVICE
|
|
|
|
Quit
|
|
|
|
${Default}
|
|
|
|
MessageBox MB_ICONSTOP "$UAC_ERROR_ELEVATE $0"
|
|
|
|
Abort
|
|
|
|
Quit
|
|
|
|
${EndSwitch}
|
2012-04-02 15:44:24 +04:00
|
|
|
|
|
|
|
;Prevent multiple instances.
|
2015-05-25 22:54:03 +03:00
|
|
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Uninstaller") i .r1 ?e'
|
2012-04-02 15:44:24 +04:00
|
|
|
Pop $R0
|
|
|
|
StrCmp $R0 0 +3
|
2013-12-10 03:43:58 +04:00
|
|
|
MessageBox MB_OK|MB_ICONEXCLAMATION $INIT_UNINSTALLER_RUNNING
|
2012-04-02 15:44:24 +04:00
|
|
|
Abort
|
2012-09-27 12:37:15 +04:00
|
|
|
|
|
|
|
;Shutdown ${APPLICATION_NAME} in order to remove locked files.
|
|
|
|
Call un.EnsureOwncloudShutdown
|
2012-04-02 15:44:24 +04:00
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function un.onUnInstSuccess
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function un.onUnInstFailed
|
|
|
|
FunctionEnd
|