2017-05-23 18:09:46 +02:00
|
|
|
Name "qutebrowser"
|
|
|
|
|
|
|
|
Unicode true
|
|
|
|
RequestExecutionLevel admin
|
|
|
|
|
|
|
|
!ifdef X64
|
2017-05-23 18:20:42 +02:00
|
|
|
OutFile "dist\qutebrowser-${VERSION}-amd64.exe"
|
|
|
|
InstallDir "$ProgramFiles64\qutebrowser"
|
2017-05-23 18:09:46 +02:00
|
|
|
!else
|
2017-05-23 18:20:42 +02:00
|
|
|
OutFile "dist\qutebrowser-${VERSION}-win32.exe"
|
|
|
|
InstallDir "$ProgramFiles\qutebrowser"
|
2017-05-23 18:09:46 +02:00
|
|
|
!endif
|
|
|
|
|
|
|
|
;Default installation folder
|
|
|
|
|
|
|
|
!include "MUI2.nsh"
|
|
|
|
;!include "MultiUser.nsh"
|
|
|
|
|
|
|
|
!define MUI_ABORTWARNING
|
|
|
|
;!define MULTIUSER_MUI
|
|
|
|
;!define MULTIUSER_INSTALLMODE_COMMANDLINE
|
2017-05-23 18:20:42 +02:00
|
|
|
!define MUI_ICON "icons/qutebrowser.ico"
|
|
|
|
!define MUI_UNICON "icons/qutebrowser.ico"
|
2017-05-23 18:09:46 +02:00
|
|
|
|
2017-05-23 18:20:42 +02:00
|
|
|
!insertmacro MUI_PAGE_LICENSE "COPYING"
|
2017-05-23 18:09:46 +02:00
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
|
|
|
|
|
|
|
; depends on admin status
|
|
|
|
;SetShellVarContext current
|
|
|
|
|
|
|
|
|
|
|
|
Section "Install"
|
|
|
|
|
|
|
|
; Uninstall old versions
|
|
|
|
ExecWait 'MsiExec.exe /quiet /qn /norestart /X{633F41F9-FE9B-42D1-9CC4-718CBD01EE11}'
|
|
|
|
ExecWait 'MsiExec.exe /quiet /qn /norestart /X{9331D947-AC86-4542-A755-A833429C6E69}'
|
|
|
|
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
|
|
|
|
!ifdef X64
|
2017-05-23 18:20:42 +02:00
|
|
|
file /r "dist\qutebrowser-${VERSION}-x64\*.*"
|
2017-05-23 18:09:46 +02:00
|
|
|
!else
|
2017-05-23 18:20:42 +02:00
|
|
|
file /r "dist\qutebrowser-${VERSION}-x86\*.*"
|
2017-05-23 18:09:46 +02:00
|
|
|
!endif
|
|
|
|
|
|
|
|
SetShellVarContext all
|
|
|
|
CreateShortCut "$SMPROGRAMS\qutebrowser.lnk" "$INSTDIR\qutebrowser.exe"
|
|
|
|
|
|
|
|
;Create uninstaller
|
|
|
|
WriteUninstaller "$INSTDIR\uninst.exe"
|
|
|
|
|
|
|
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qutebrowser" "DisplayName" "qutebrowser"
|
|
|
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qutebrowser" "UninstallString" '"$INSTDIR\uninst.exe"'
|
|
|
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qutebrowser" "QuietUninstallString" '"$INSTDIR\uninst.exe" /S'
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;Uninstaller Section
|
|
|
|
|
|
|
|
Section "Uninstall"
|
|
|
|
|
|
|
|
SetShellVarContext all
|
|
|
|
Delete "$SMPROGRAMS\qutebrowser.lnk"
|
|
|
|
|
|
|
|
RMDir /r "$INSTDIR\*.*"
|
|
|
|
RMDir "$INSTDIR"
|
|
|
|
|
|
|
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qutebrowser"
|
|
|
|
|
|
|
|
SectionEnd
|