Installer enhancement: remember "Don't use_%APPDATA%" option
Added detection of the "doLocalConf.xml" trigger-file from the previous installation. Fix #12202, close #12326
This commit is contained in:
parent
8ff003412a
commit
a6a1442bab
|
@ -73,6 +73,17 @@ Var Dialog
|
||||||
Var NoUserDataCheckboxHandle
|
Var NoUserDataCheckboxHandle
|
||||||
Var ShortcutCheckboxHandle
|
Var ShortcutCheckboxHandle
|
||||||
Var WinVer
|
Var WinVer
|
||||||
|
Var noUserDataChecked
|
||||||
|
Var createShortcutChecked
|
||||||
|
|
||||||
|
; The definition of "OnChange" event for checkbox
|
||||||
|
Function OnChange_NoUserDataCheckBox
|
||||||
|
${NSD_GetState} $NoUserDataCheckboxHandle $noUserDataChecked
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function OnChange_ShortcutCheckBox
|
||||||
|
${NSD_GetState} $ShortcutCheckboxHandle $createShortcutChecked
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Function ExtraOptions
|
Function ExtraOptions
|
||||||
nsDialogs::Create 1018
|
nsDialogs::Create 1018
|
||||||
|
@ -90,6 +101,12 @@ Function ExtraOptions
|
||||||
|
|
||||||
${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 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."
|
||||||
Pop $NoUserDataCheckboxHandle
|
Pop $NoUserDataCheckboxHandle
|
||||||
|
IfFileExists $INSTDIR\doLocalConf.xml doLocalConfExists doLocalConfDoesNotExists
|
||||||
|
doLocalConfExists:
|
||||||
|
; a previous portable N++ installation detected
|
||||||
|
${NSD_SetState} $NoUserDataCheckboxHandle ${BST_CHECKED}
|
||||||
|
StrCpy $noUserDataChecked ${BST_CHECKED}
|
||||||
|
doLocalConfDoesNotExists:
|
||||||
${NSD_OnClick} $NoUserDataCheckboxHandle OnChange_NoUserDataCheckBox
|
${NSD_OnClick} $NoUserDataCheckboxHandle OnChange_NoUserDataCheckBox
|
||||||
|
|
||||||
StrLen $0 $PROGRAMFILES
|
StrLen $0 $PROGRAMFILES
|
||||||
|
@ -144,18 +161,6 @@ ws2003_goQuit:
|
||||||
ws2003_endTest:
|
ws2003_endTest:
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Var noUserDataChecked
|
|
||||||
Var createShortcutChecked
|
|
||||||
|
|
||||||
; The definition of "OnChange" event for checkbox
|
|
||||||
Function OnChange_NoUserDataCheckBox
|
|
||||||
${NSD_GetState} $NoUserDataCheckboxHandle $noUserDataChecked
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function OnChange_ShortcutCheckBox
|
|
||||||
${NSD_GetState} $ShortcutCheckboxHandle $createShortcutChecked
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
|
|
||||||
Function writeInstallInfoInRegistry
|
Function writeInstallInfoInRegistry
|
||||||
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe" "" "$INSTDIR\notepad++.exe"
|
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe" "" "$INSTDIR\notepad++.exe"
|
||||||
|
|
Loading…
Reference in New Issue