📄 nppsetup.nsi.svn-base
字号:
Delete "$UPDATE_PATH\nativeLang.xml"
commun:
; remove all the npp shortcuts from current user
Delete "$DESKTOP\Notepad++.lnk"
Delete "$SMPROGRAMS\Notepad++\Notepad++.lnk"
Delete "$SMPROGRAMS\Notepad++\readme.lnk"
Delete "$SMPROGRAMS\Notepad++\Uninstall.lnk"
Delete "$INSTDIR\plugins\Explorer.dll"
Delete "$INSTDIR\plugins\HexEditor.dll"
Delete "$INSTDIR\plugins\HexEditorPlugin.dll"
Delete "$INSTDIR\plugins\NppSearchInFiles.dll"
CreateDirectory "$SMPROGRAMS\Notepad++"
CreateShortCut "$SMPROGRAMS\Notepad++\Uninstall.lnk" "$INSTDIR\uninstall.exe"
; detect the right of
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +2
SetShellVarContext all
; add all the npp shortcuts for all user or current user
CreateDirectory "$SMPROGRAMS\Notepad++"
CreateShortCut "$DESKTOP\Notepad++.lnk" "$INSTDIR\notepad++.exe"
CreateShortCut "$SMPROGRAMS\Notepad++\Notepad++.lnk" "$INSTDIR\notepad++.exe"
CreateShortCut "$SMPROGRAMS\Notepad++\readme.lnk" "$INSTDIR\readme.txt"
SetShellVarContext current
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe" "" "$INSTDIR\notepad++.exe"
SectionEnd
Section "Context Menu Entry" explorerContextMenu
SetOverwrite off
SetOutPath "$INSTDIR\"
File "..\bin\nppcm.dll"
Exec 'regsvr32 /s "$INSTDIR\nppcm.dll"'
Exec 'regsvr32 /u /s "$INSTDIR\nppshellext.dll"'
Delete "$INSTDIR\nppshellext.dll"
SectionEnd
SubSection "Auto-completion Files" autoCompletionComponent
SetOverwrite off
Section C
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\c.api"
SectionEnd
Section C++
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\cpp.api"
SectionEnd
Section Java
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\java.api"
SectionEnd
Section C#
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\cs.api"
SectionEnd
Section PHP
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\php.api"
SectionEnd
Section CSS
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\css.api"
SectionEnd
Section VB
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\vb.api"
SectionEnd
Section Perl
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\perl.api"
SectionEnd
Section JavaScript
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\javascript.api"
SectionEnd
Section Python
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\python.api"
SectionEnd
Section ActionScript
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\flash.api"
SectionEnd
Section LISP
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\lisp.api"
SectionEnd
Section VHDL
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\vhdl.api"
SectionEnd
Section TeX
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\tex.api"
SectionEnd
Section DocBook
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\xml.api"
SectionEnd
Section NSIS
SetOutPath "$INSTDIR\plugins\APIs"
File "..\bin\plugins\APIs\nsis.api"
SectionEnd
SubSectionEnd
SubSection "Plugins" Plugins
SetOverwrite on
Section "NPPTextFX" NPPTextFX
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\NPPTextFX.dll"
StrCmp $IS_LOCAL "1" 0 NOT_LOCAL
SetOutPath "$INSTDIR\plugins"
goto LOCAL
NOT_LOCAL:
SetOutPath "$APPDATA\Notepad++"
LOCAL:
File "..\bin\plugins\NPPTextFX.ini"
SetOutPath "$INSTDIR\plugins\NPPTextFX"
File "..\bin\plugins\NPPTextFX\AsciiToEBCDIC.bin"
File "..\bin\plugins\NPPTextFX\libTidy.dll"
File "..\bin\plugins\NPPTextFX\NPPTextFXdemo.TXT"
File "..\bin\plugins\NPPTextFX\W3C-CSSValidator.htm"
File "..\bin\plugins\NPPTextFX\W3C-HTMLValidator.htm"
SectionEnd
Section "Function List" FunctionList
Delete "$INSTDIR\plugins\FunctionListPlugin.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\FunctionList.dll"
SectionEnd
Section "File Browser" FileBrowser
Delete "$INSTDIR\plugins\ExplorerPlugin.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\Explorer.dll"
SectionEnd
Section "Hex Editor" HexEditor
Delete "$INSTDIR\plugins\HexEditorPlugin.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\HexEditor.dll"
SectionEnd
Section "ConvertExt" ConvertExt
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\ConvertExt.dll"
StrCmp $IS_LOCAL "1" 0 NOT_LOCAL2
SetOutPath "$INSTDIR"
goto LOCAL2
NOT_LOCAL2:
SetOutPath "$APPDATA\Notepad++"
LOCAL2:
File "..\bin\ConvertExt.ini"
File "..\bin\ConvertExt.enc"
File "..\bin\ConvertExt.lng"
SectionEnd
Section "Spell-Checker" SpellChecker
Delete "$INSTDIR\plugins\SpellChecker.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\SpellChecker.dll"
SectionEnd
Section "NppExec" NppExec
Delete "$INSTDIR\plugins\NppExec.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\NppExec.dll"
SetOutPath "$INSTDIR\plugins\doc"
File "..\bin\plugins\doc\NppExec.txt"
File "..\bin\plugins\doc\NppExec_TechInfo.txt"
SectionEnd
Section "QuickText" QuickText
Delete "$INSTDIR\plugins\QuickText.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\QuickText.dll"
SetOutPath "$INSTDIR\"
File "..\bin\QuickText.ini"
SetOutPath "$INSTDIR\plugins\doc"
File "..\bin\plugins\doc\quickText_README.txt"
SectionEnd
/*
Section "XMLTools" XMLTools
Delete "$INSTDIR\plugins\XMLTools.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\XMLTools.dll"
SetOutPath "$INSTDIR\plugins\doc"
File "..\bin\plugins\doc\XMLToolsReadMe.txt"
SectionEnd
*/
SubSectionEnd
Section /o "As default html viewer" htmlViewer
SetOutPath "$INSTDIR\"
File "..\bin\nppIExplorerShell.exe"
WriteRegStr HKLM "SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name" "" "$INSTDIR\nppIExplorerShell.exe"
SectionEnd
;--------------------------------
;Descriptions
;Language strings
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${makeLocal} 'Enable this option to make Notepad++ load/write the configuration files from/to its install directory. Check it if you use Notepad++ in an USB device.'
!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 those plugins to extend the capacity of Notepad++.'
!insertmacro MUI_DESCRIPTION_TEXT ${htmlViewer} 'Open the html file in Notepad++ while you choose <view source> from IE.'
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
Section -FinishSection
WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd
;Uninstall section
SubSection un.autoCompletionComponent
Section un.PHP
Delete "$INSTDIR\plugins\APIs\php.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.CSS
Delete "$INSTDIR\plugins\APIs\css.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.VB
Delete "$INSTDIR\plugins\APIs\vb.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.Perl
Delete "$INSTDIR\plugins\APIs\perl.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.C
Delete "$INSTDIR\plugins\APIs\c.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.C++
Delete "$INSTDIR\plugins\APIs\cpp.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.Java
Delete "$INSTDIR\plugins\APIs\java.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.C#
Delete "$INSTDIR\plugins\APIs\cs.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.JavaScript
Delete "$INSTDIR\plugins\APIs\javascript.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.Python
Delete "$INSTDIR\plugins\APIs\python.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.ActionScript
Delete "$INSTDIR\plugins\APIs\flash.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.LISP
Delete "$INSTDIR\plugins\APIs\lisp.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.VHDL
Delete "$INSTDIR\plugins\APIs\vhdl.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.TeX
Delete "$INSTDIR\plugins\APIs\tex.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.DocBook
Delete "$INSTDIR\plugins\APIs\xml.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
Section un.NSIS
Delete "$INSTDIR\plugins\APIs\nsis.api"
RMDir "$INSTDIR\plugins\APIs\"
SectionEnd
SubSectionEnd
SubSection un.Plugins
Section un.NPPTextFX
Delete "$INSTDIR\plugins\NPPTextFX.dll"
Delete "$INSTDIR\plugins\NPPTextFX.ini"
Delete "$APPDATA\Notepad++\NPPTextFX.ini"
Delete "$INSTDIR\plugins\NPPTextFX\AsciiToEBCDIC.bin"
Delete "$INSTDIR\plugins\NPPTextFX\libTidy.dll"
Delete "$INSTDIR\plugins\NPPTextFX\NPPTextFXdemo.TXT"
Delete "$INSTDIR\plugins\NPPTextFX\W3C-CSSValidator.htm"
Delete "$INSTDIR\plugins\NPPTextFX\W3C-HTMLValidator.htm"
RMDir "$INSTDIR\plugins\NPPTextFX\"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.FunctionList
Delete "$INSTDIR\plugins\FunctionList.dll"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.FileBrowser
Delete "$INSTDIR\plugins\Explorer.dll"
Delete "$INSTDIR\plugins\Config\Explorer.ini"
RMDir "$INSTDIR\plugins\Config"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.HexEditor
Delete "$INSTDIR\plugins\HexEditor.dll"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.ConvertExt
Delete "$INSTDIR\plugins\ConvertExt.dll"
Delete "$APPDATA\Notepad++\ConvertExt.ini"
Delete "$APPDATA\Notepad++\ConvertExt.enc"
Delete "$APPDATA\Notepad++\ConvertExt.lng"
Delete "$INSTDIR\ConvertExt.ini"
Delete "$INSTDIR\ConvertExt.enc"
Delete "$INSTDIR\ConvertExt.lng"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.SpellChecker
Delete "$INSTDIR\plugins\SpellChecker.dll"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.NppExec
Delete "$INSTDIR\plugins\NppExec.dll"
Delete "$INSTDIR\plugins\doc\NppExec.txt"
Delete "$INSTDIR\plugins\doc\NppExec_TechInfo.txt"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.QuickText
Delete "$INSTDIR\plugins\QuickText.dll"
Delete "$INSTDIR\QuickText.ini"
Delete "$INSTDIR\plugins\doc\quickText_README.txt"
RMDir "$INSTDIR\plugins\"
SectionEnd
/*
Section un.XMLTools
Delete "$INSTDIR\plugins\XMLTools.dll"
Delete "$INSTDIR\plugins\doc\XMLToolsReadMe.txt"
RMDir "$INSTDIR\plugins\"
SectionEnd
*/
SubSectionEnd
Section un.htmlViewer
DeleteRegKey HKLM "SOFTWARE\Microsoft\Internet Explorer\View Source Editor"
Delete "$INSTDIR\nppIExplorerShell.exe"
SectionEnd
Section un.explorerContextMenu
Exec 'regsvr32 /u /s "$INSTDIR\nppcm.dll"'
Delete "$INSTDIR\nppcm.dll"
SectionEnd
Section Uninstall
;Remove from registry...
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
DeleteRegKey HKLM "SOFTWARE\${APPNAME}"
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe"
; Delete self
Delete "$INSTDIR\uninstall.exe"
; Delete Shortcuts
Delete "$SMPROGRAMS\Notepad++\Uninstall.lnk"
RMDir "$SMPROGRAMS\Notepad++"
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +2
SetShellVarContext all
Delete "$DESKTOP\Notepad++.lnk"
Delete "$SMPROGRAMS\Notepad++\Notepad++.lnk"
Delete "$SMPROGRAMS\Notepad++\readme.lnk"
; Clean up Notepad++
Delete "$INSTDIR\LINEDRAW.TTF"
Delete "$INSTDIR\SciLexer.dll"
Delete "$INSTDIR\change.log"
Delete "$INSTDIR\license.txt"
Delete "$INSTDIR\notepad++.exe"
Delete "$INSTDIR\readme.txt"
Delete "$INSTDIR\config.xml"
Delete "$INSTDIR\langs.xml"
Delete "$INSTDIR\stylers.xml"
Delete "$INSTDIR\contextMenu.xml"
Delete "$INSTDIR\shortcuts.xml"
Delete "$INSTDIR\nativeLang.xml"
Delete "$INSTDIR\session.xml"
SetShellVarContext current
Delete "$APPDATA\Notepad++\config.xml"
Delete "$APPDATA\Notepad++\stylers.xml"
Delete "$APPDATA\Notepad++\contextMenu.xml"
Delete "$APPDATA\Notepad++\shortcuts.xml"
Delete "$APPDATA\Notepad++\nativeLang.xml"
Delete "$APPDATA\Notepad++\session.xml"
Delete "$APPDATA\Notepad++\insertExt.ini"
RMDir "$APPDATA\Notepad++"
StrCmp $1 "Admin" 0 +2
SetShellVarContext all
; Remove remaining directories
RMDir "$SMPROGRAMS\Notepad++"
RMDir "$INSTDIR\"
RMDir "$APPDATA\Notepad++"
SectionEnd
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
BrandingText "Don HO"
; eof
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -