Add "Show details" functionality in installer

Fix #15718, close #15719
This commit is contained in:
xomx 2024-10-20 16:46:44 +02:00 committed by Don Ho
parent b3110cdccf
commit 4972dcf4b3
2 changed files with 18 additions and 3 deletions

View File

@ -283,6 +283,11 @@ FunctionEnd
Section -"Notepad++" mainSection Section -"Notepad++" mainSection
${If} $showDetailsChecked == ${BST_CHECKED}
SetDetailsView show
SetAutoClose false
${endIf}
${If} $diffArchDir2Remove != "" ${If} $diffArchDir2Remove != ""
!insertmacro uninstallRegKey !insertmacro uninstallRegKey
!insertmacro uninstallDir $diffArchDir2Remove !insertmacro uninstallDir $diffArchDir2Remove

View File

@ -72,9 +72,11 @@ FunctionEnd
Var Dialog Var Dialog
Var NoUserDataCheckboxHandle Var NoUserDataCheckboxHandle
Var ShortcutCheckboxHandle Var ShortcutCheckboxHandle
Var ShowDetailsCheckboxHandle
Var WinVer Var WinVer
Var noUserDataChecked Var noUserDataChecked
Var createShortcutChecked Var createShortcutChecked
Var showDetailsChecked
; The definition of "OnChange" event for checkbox ; The definition of "OnChange" event for checkbox
Function OnChange_NoUserDataCheckBox Function OnChange_NoUserDataCheckBox
@ -85,6 +87,10 @@ Function OnChange_ShortcutCheckBox
${NSD_GetState} $ShortcutCheckboxHandle $createShortcutChecked ${NSD_GetState} $ShortcutCheckboxHandle $createShortcutChecked
FunctionEnd FunctionEnd
Function OnChange_ShowDetailsCheckbox
${NSD_GetState} $ShowDetailsCheckboxHandle $showDetailsChecked
FunctionEnd
Function ExtraOptions Function ExtraOptions
nsDialogs::Create 1018 nsDialogs::Create 1018
Pop $Dialog Pop $Dialog
@ -98,8 +104,8 @@ Function ExtraOptions
StrCmp $WinVer "8" 0 +2 StrCmp $WinVer "8" 0 +2
${NSD_Check} $ShortcutCheckboxHandle ${NSD_Check} $ShortcutCheckboxHandle
${NSD_OnClick} $ShortcutCheckboxHandle OnChange_ShortcutCheckBox ${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 Pop $NoUserDataCheckboxHandle
IfFileExists $INSTDIR\doLocalConf.xml doLocalConfExists doLocalConfDoesNotExists IfFileExists $INSTDIR\doLocalConf.xml doLocalConfExists doLocalConfDoesNotExists
doLocalConfExists: doLocalConfExists:
@ -108,7 +114,11 @@ Function ExtraOptions
StrCpy $noUserDataChecked ${BST_CHECKED} StrCpy $noUserDataChecked ${BST_CHECKED}
doLocalConfDoesNotExists: doLocalConfDoesNotExists:
${NSD_OnClick} $NoUserDataCheckboxHandle OnChange_NoUserDataCheckBox ${NSD_OnClick} $NoUserDataCheckboxHandle OnChange_NoUserDataCheckBox
${NSD_CreateCheckbox} 0 160 100% 30u "Show installation details"
Pop $ShowDetailsCheckboxHandle
${NSD_OnClick} $ShowDetailsCheckboxHandle OnChange_ShowDetailsCheckbox
StrLen $0 $PROGRAMFILES StrLen $0 $PROGRAMFILES
StrCpy $1 $InstDir $0 StrCpy $1 $InstDir $0