Use LockedList nsis plugin
This commit is contained in:
34
dist/windows/strawberry.nsi.in
vendored
34
dist/windows/strawberry.nsi.in
vendored
@@ -66,6 +66,8 @@
|
|||||||
!define CAPABILITIES_HIDE_ICONS "Command to hide icons"
|
!define CAPABILITIES_HIDE_ICONS "Command to hide icons"
|
||||||
!define CAPABILITIES_SHOW_ICONS "Command to show icons"
|
!define CAPABILITIES_SHOW_ICONS "Command to show icons"
|
||||||
|
|
||||||
|
Unicode True
|
||||||
|
|
||||||
SetCompressor /SOLID lzma
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
!addplugindir nsisplugins
|
!addplugindir nsisplugins
|
||||||
@@ -79,16 +81,9 @@ SetCompressor /SOLID lzma
|
|||||||
|
|
||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
|
|
||||||
; Installer pages
|
ReserveFile "${NSISDIR}/Plugins/x86-unicode/LockedList.dll"
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
ReserveFile "${NSISDIR}/Plugins/LockedList64.dll"
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!define LockedListPATH $InstallDir
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
|
|
||||||
; Uninstaller pages
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
!insertmacro MUI_UNPAGE_FINISH
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
||||||
|
|
||||||
@@ -130,11 +125,23 @@ InstallDir "${PRODUCT_INSTALL_DIR}"
|
|||||||
; Get the path where Strawberry was installed previously and set it as default path
|
; Get the path where Strawberry was installed previously and set it as default path
|
||||||
InstallDirRegKey ${PRODUCT_UNINST_ROOT_KEY} ${PRODUCT_UNINST_KEY} "UninstallString"
|
InstallDirRegKey ${PRODUCT_UNINST_ROOT_KEY} ${PRODUCT_UNINST_KEY} "UninstallString"
|
||||||
|
|
||||||
|
LicenseData "COPYING"
|
||||||
|
|
||||||
ShowInstDetails show
|
ShowInstDetails show
|
||||||
ShowUnInstDetails show
|
ShowUnInstDetails show
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
;RequestExecutionLevel user
|
;RequestExecutionLevel user
|
||||||
|
|
||||||
|
Page license
|
||||||
|
Page directory
|
||||||
|
Page Custom LockedListPageShow
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
|
Function LockedListPageShow
|
||||||
|
LockedList::AddModule /NOUNLOAD \strawberry.exe
|
||||||
|
LockedList::Dialog /heading "Checking for running programs:" /noprograms "No programs need to close." /searching "Searching for running programs..."
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
; Check for previous installation, and call the uninstaller if any
|
; Check for previous installation, and call the uninstaller if any
|
||||||
Function CheckPreviousInstall
|
Function CheckPreviousInstall
|
||||||
|
|
||||||
@@ -169,8 +176,6 @@ SectionEnd
|
|||||||
Section "Strawberry" Strawberry
|
Section "Strawberry" Strawberry
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
|
|
||||||
nsExec::Exec '"$INSTDIR\killproc.exe" strawberry.exe'
|
|
||||||
|
|
||||||
File "strawberry.exe"
|
File "strawberry.exe"
|
||||||
File "strawberry-tagreader.exe"
|
File "strawberry-tagreader.exe"
|
||||||
File "strawberry.ico"
|
File "strawberry.ico"
|
||||||
@@ -290,8 +295,6 @@ Section "Strawberry" Strawberry
|
|||||||
File "libtermcap.dll"
|
File "libtermcap.dll"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
File "killproc.exe"
|
|
||||||
|
|
||||||
; Register Strawberry with Default Programs
|
; Register Strawberry with Default Programs
|
||||||
Var /GLOBAL AppIcon
|
Var /GLOBAL AppIcon
|
||||||
Var /GLOBAL AppExe
|
Var /GLOBAL AppExe
|
||||||
@@ -436,8 +439,6 @@ SectionEnd
|
|||||||
|
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
|
|
||||||
nsExec::Exec '"$INSTDIR\killproc.exe" strawberry.exe'
|
|
||||||
|
|
||||||
; Delete all the files
|
; Delete all the files
|
||||||
|
|
||||||
Delete "$INSTDIR\strawberry.ico"
|
Delete "$INSTDIR\strawberry.ico"
|
||||||
@@ -611,7 +612,6 @@ Section "Uninstall"
|
|||||||
Delete "$INSTDIR\gstreamer-plugins\libgstrtp.dll"
|
Delete "$INSTDIR\gstreamer-plugins\libgstrtp.dll"
|
||||||
Delete "$INSTDIR\gstreamer-plugins\libgstrtsp.dll"
|
Delete "$INSTDIR\gstreamer-plugins\libgstrtsp.dll"
|
||||||
|
|
||||||
Delete "$INSTDIR\killproc.exe"
|
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
Delete "$INSTDIR\Uninstall.exe"
|
||||||
|
|
||||||
; Remove the installation folders.
|
; Remove the installation folders.
|
||||||
|
|||||||
Reference in New Issue
Block a user