diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index c6f644a88..0709d036b 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -86,7 +86,58 @@ page Custom ExtraOptions !include "nsisInclude\langs4Installer.nsh" + + + +!include "nsisInclude\mainSectionFuncs.nsh" + +Section -"Notepad++" mainSection + + Call setPathAndOptions + + ${If} $diffArchDir2Remove != "" + !insertmacro uninstallRegKey + !insertmacro uninstallDir $diffArchDir2Remove + ${endIf} + + Call copyCommonFiles + + Call removeUnstablePlugins + + Call removeOldContextMenu + + Call shortcutLinkManagement + +SectionEnd + +!include "nsisInclude\langs4Npp.nsh" +!include "nsisInclude\autoCompletion.nsh" +!include "nsisInclude\themes.nsh" +!include "nsisInclude\binariesComponents.nsh" + + +InstType "Minimalist" + +${MementoSectionDone} + +;-------------------------------- + !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${explorerContextMenu} 'Explorer context menu entry for Notepad++ : Open whatever you want in Notepad++ from Windows Explorer.' + !insertmacro MUI_DESCRIPTION_TEXT ${autoCompletionComponent} 'Install the API files you need for the auto-completion feature (Ctrl+Space).' + !insertmacro MUI_DESCRIPTION_TEXT ${Plugins} 'You may need these plugins to extend the capabilities of Notepad++.' + !insertmacro MUI_DESCRIPTION_TEXT ${localization} 'To use Notepad++ in your favorite language(s), install all/desired language(s).' + !insertmacro MUI_DESCRIPTION_TEXT ${Themes} 'The eye-candy to change visual effects. Use Theme selector to switch among them.' + !insertmacro MUI_DESCRIPTION_TEXT ${AutoUpdater} 'Keep Notepad++ updated: Automatically download and install the latest updates.' + !insertmacro MUI_FUNCTION_DESCRIPTION_END +;-------------------------------- + +Section -FinishSection + Call writeInstallInfoInRegistry +SectionEnd + + Var diffArchDir2Remove +Var noUpdater Function .onInit ${GetParameters} $R0 @@ -99,6 +150,20 @@ appdataLoadYes: StrCpy $allowAppDataPluginsLoading "true" appdataLoadDone: + ${GetOptions} $R0 "/noUpdater" $R1 ;case insensitive + IfErrors withUpdater withoutUpdater +withUpdater: + StrCpy $noUpdater "false" + Goto updaterDone +withoutUpdater: + StrCpy $noUpdater "true" +updaterDone: + +${If} $noUpdater == "true" + !insertmacro UnSelectSection ${AutoUpdater} + SectionSetText ${AutoUpdater} "" +${EndIf} + SectionSetSize ${mainSection} 4500 ; This is rough estimation of files present in function copyCommonFiles InitPluginsDir ; Initializes the plug-ins dir ($PLUGINSDIR) if not already initialized. Call preventInstallInWin9x @@ -151,52 +216,6 @@ Function .onInstSuccess ${MementoSectionSave} FunctionEnd - -!include "nsisInclude\mainSectionFuncs.nsh" - -Section -"Notepad++" mainSection - - Call setPathAndOptions - - ${If} $diffArchDir2Remove != "" - !insertmacro uninstallRegKey - !insertmacro uninstallDir $diffArchDir2Remove - ${endIf} - - Call copyCommonFiles - - Call removeUnstablePlugins - - Call removeOldContextMenu - - Call shortcutLinkManagement - -SectionEnd - -!include "nsisInclude\langs4Npp.nsh" -!include "nsisInclude\autoCompletion.nsh" -!include "nsisInclude\themes.nsh" -!include "nsisInclude\binariesComponents.nsh" - -InstType "Minimalist" - -${MementoSectionDone} - -;-------------------------------- - !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${explorerContextMenu} 'Explorer context menu entry for Notepad++ : Open whatever you want in Notepad++ from Windows Explorer.' - !insertmacro MUI_DESCRIPTION_TEXT ${autoCompletionComponent} 'Install the API files you need for the auto-completion feature (Ctrl+Space).' - !insertmacro MUI_DESCRIPTION_TEXT ${Plugins} 'You may need these plugins to extend the capabilities of Notepad++.' - !insertmacro MUI_DESCRIPTION_TEXT ${localization} 'To use Notepad++ in your favorite language(s), install all/desired language(s).' - !insertmacro MUI_DESCRIPTION_TEXT ${Themes} 'The eye-candy to change visual effects. Use Theme selector to switch among them.' - !insertmacro MUI_DESCRIPTION_TEXT ${AutoUpdater} 'Keep Notepad++ updated: Automatically download and install the latest updates.' - !insertmacro MUI_FUNCTION_DESCRIPTION_END -;-------------------------------- - -Section -FinishSection - Call writeInstallInfoInRegistry -SectionEnd - BrandingText "Don HO" diff --git a/PowerEditor/installer/nsisInclude/binariesComponents.nsh b/PowerEditor/installer/nsisInclude/binariesComponents.nsh index ac06971e1..2b48b4844 100644 --- a/PowerEditor/installer/nsisInclude/binariesComponents.nsh +++ b/PowerEditor/installer/nsisInclude/binariesComponents.nsh @@ -56,15 +56,6 @@ SectionGroup "Plugins" Plugins File "..\bin\plugins\NppExport.dll" ${MementoSectionEnd} - ${MementoSection} "Plugin Manager" PluginManager - Delete "$INSTDIR\plugins\PluginManager.dll" - SetOutPath "$INSTDIR\plugins" - File "..\bin\plugins\PluginManager.dll" - SetOutPath "$UPDATE_PATH\plugins\Config" - File "..\bin\plugins\Config\PluginManager.ini" - SetOutPath "$INSTDIR\updater" - File "..\bin\updater\gpup.exe" - ${MementoSectionEnd} !endif ${MementoSection} "Mime Tools" MimeTools @@ -108,7 +99,6 @@ ${MementoSection} "Auto-Updater" AutoUpdater !endif ${MementoSectionEnd} - ;Uninstall section SectionGroup un.Plugins Section un.NppExport