From 2a8490ef3123b9d341ddea2baa351c2ef1674b55 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 14 Apr 2021 18:07:23 +0200 Subject: [PATCH] Use modern user interface and locked list also for uninstalling --- dist/windows/strawberry.nsi.in | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/dist/windows/strawberry.nsi.in b/dist/windows/strawberry.nsi.in index b4a8e65a..657ab748 100644 --- a/dist/windows/strawberry.nsi.in +++ b/dist/windows/strawberry.nsi.in @@ -70,7 +70,6 @@ Unicode True SetCompressor /SOLID lzma -!addplugindir nsisplugins !include "MUI2.nsh" !include "FileAssociation.nsh" !include "Capabilities.nsh" @@ -85,6 +84,20 @@ ReserveFile "${NSISDIR}/Plugins/x86-unicode/LockedList.dll" ReserveFile "${NSISDIR}/Plugins/LockedList64.dll" !define LockedListPATH $InstallDir +; Installer pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE COPYING +Page Custom LockedListPageShow +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_CONFIRM +UninstPage custom un.LockedListPageShow +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + !insertmacro MUI_LANGUAGE "English" ;first language is the default language Name "${PRODUCT_NAME}" @@ -125,23 +138,20 @@ InstallDir "${PRODUCT_INSTALL_DIR}" ; Get the path where Strawberry was installed previously and set it as default path InstallDirRegKey ${PRODUCT_UNINST_ROOT_KEY} ${PRODUCT_UNINST_KEY} "UninstallString" -LicenseData "COPYING" - ShowInstDetails show ShowUnInstDetails show RequestExecutionLevel admin -;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 +Function un.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 Function CheckPreviousInstall