From 4972dcf4b3761a673f16b99c3050c617731ea9cb Mon Sep 17 00:00:00 2001 From: xomx Date: Sun, 20 Oct 2024 16:46:44 +0200 Subject: [PATCH] Add "Show details" functionality in installer Fix #15718, close #15719 --- PowerEditor/installer/nppSetup.nsi | 5 +++++ PowerEditor/installer/nsisInclude/tools.nsh | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index ff9fee6c0..de91e6ff3 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -283,6 +283,11 @@ FunctionEnd Section -"Notepad++" mainSection + ${If} $showDetailsChecked == ${BST_CHECKED} + SetDetailsView show + SetAutoClose false + ${endIf} + ${If} $diffArchDir2Remove != "" !insertmacro uninstallRegKey !insertmacro uninstallDir $diffArchDir2Remove diff --git a/PowerEditor/installer/nsisInclude/tools.nsh b/PowerEditor/installer/nsisInclude/tools.nsh index 3cdb51d63..1ee286fe3 100644 --- a/PowerEditor/installer/nsisInclude/tools.nsh +++ b/PowerEditor/installer/nsisInclude/tools.nsh @@ -72,9 +72,11 @@ FunctionEnd Var Dialog Var NoUserDataCheckboxHandle Var ShortcutCheckboxHandle +Var ShowDetailsCheckboxHandle Var WinVer Var noUserDataChecked Var createShortcutChecked +Var showDetailsChecked ; The definition of "OnChange" event for checkbox Function OnChange_NoUserDataCheckBox @@ -85,6 +87,10 @@ Function OnChange_ShortcutCheckBox ${NSD_GetState} $ShortcutCheckboxHandle $createShortcutChecked FunctionEnd +Function OnChange_ShowDetailsCheckbox + ${NSD_GetState} $ShowDetailsCheckboxHandle $showDetailsChecked +FunctionEnd + Function ExtraOptions nsDialogs::Create 1018 Pop $Dialog @@ -98,8 +104,8 @@ Function ExtraOptions StrCmp $WinVer "8" 0 +2 ${NSD_Check} $ShortcutCheckboxHandle ${NSD_OnClick} $ShortcutCheckboxHandle OnChange_ShortcutCheckBox - - ${NSD_CreateCheckbox} 0 120 100% 30u "Don't use %APPDATA%$\nEnable this option to make Notepad++ load/write the configuration files from/to its install directory. Check it if you use Notepad++ in a USB device." + + ${NSD_CreateCheckbox} 0 80 100% 30u "Don't use %APPDATA%$\nEnable this option to make Notepad++ load/write the configuration files from/to its install directory. Check it if you use Notepad++ in a USB device." Pop $NoUserDataCheckboxHandle IfFileExists $INSTDIR\doLocalConf.xml doLocalConfExists doLocalConfDoesNotExists doLocalConfExists: @@ -108,7 +114,11 @@ Function ExtraOptions StrCpy $noUserDataChecked ${BST_CHECKED} doLocalConfDoesNotExists: ${NSD_OnClick} $NoUserDataCheckboxHandle OnChange_NoUserDataCheckBox - + + ${NSD_CreateCheckbox} 0 160 100% 30u "Show installation details" + Pop $ShowDetailsCheckboxHandle + ${NSD_OnClick} $ShowDetailsCheckboxHandle OnChange_ShowDetailsCheckbox + StrLen $0 $PROGRAMFILES StrCpy $1 $InstDir $0