diff --git a/PowerEditor/bin/userDefinedLang-markdown.default.modern.xml b/PowerEditor/bin/userDefineLangs/userDefinedLang-markdown.default.modern.xml similarity index 100% rename from PowerEditor/bin/userDefinedLang-markdown.default.modern.xml rename to PowerEditor/bin/userDefineLangs/userDefinedLang-markdown.default.modern.xml diff --git a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh index 91c2ff159..45823989e 100644 --- a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh +++ b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh @@ -105,10 +105,6 @@ Function copyCommonFiles File "..\bin\change.log" File "..\bin\readme.txt" - IfFileExists "$UPDATE_PATH\userDefineLang.xml" 0 +2 - File "..\bin\userDefinedLang-markdown.default.modern.xml" - File /oname=$INSTDIR\userDefineLang.xml "..\bin\userDefinedLang-markdown.default.modern.xml" - !ifdef ARCH64 File "..\bin64\SciLexer.dll" File "..\bin64\notepad++.exe" @@ -116,6 +112,11 @@ Function copyCommonFiles File "..\bin\SciLexer.dll" File "..\bin\notepad++.exe" !endif + + ; Markdown in user defined languages + SetOutPath "$UPDATE_PATH\userDefineLangs\" + File "..\bin\userDefineLangs\userDefinedLang-markdown.default.modern.xml" + ; Localization ; Default language English SetOutPath "$INSTDIR\localization\" diff --git a/PowerEditor/installer/nsisInclude/themes.nsh b/PowerEditor/installer/nsisInclude/themes.nsh index f82b7105f..7a94f2ee1 100644 --- a/PowerEditor/installer/nsisInclude/themes.nsh +++ b/PowerEditor/installer/nsisInclude/themes.nsh @@ -136,121 +136,121 @@ SectionGroup un.Themes Section un.BlackBoard ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Black board.xml" + Delete "$installPath\themes\Black board.xml" ${endIf} SectionEnd Section un.Choco ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Choco.xml" + Delete "$installPath\themes\Choco.xml" ${endIf} SectionEnd Section un.HelloKitty ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Hello Kitty.xml" + Delete "$installPath\themes\Hello Kitty.xml" ${endIf} SectionEnd Section un.MonoIndustrial ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Mono Industrial.xml" + Delete "$installPath\themes\Mono Industrial.xml" ${endIf} SectionEnd Section un.Monokai ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Monokai.xml" + Delete "$installPath\themes\Monokai.xml" ${endIf} SectionEnd Section un.Obsidian ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\obsidian.xml" + Delete "$installPath\themes\obsidian.xml" ${endIf} SectionEnd Section un.PlasticCodeWrap ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Plastic Code Wrap.xml" + Delete "$installPath\themes\Plastic Code Wrap.xml" ${endIf} SectionEnd Section un.RubyBlue ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Ruby Blue.xml" + Delete "$installPath\themes\Ruby Blue.xml" ${endIf} SectionEnd Section un.Twilight ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Twilight.xml" + Delete "$installPath\themes\Twilight.xml" ${endIf} SectionEnd Section un.VibrantInk ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Vibrant Ink.xml" + Delete "$installPath\themes\Vibrant Ink.xml" ${endIf} SectionEnd Section un.DeepBlack ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Deep Black.xml" + Delete "$installPath\themes\Deep Black.xml" ${endIf} SectionEnd Section un.vimDarkBlue ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\vim Dark Blue.xml" + Delete "$installPath\themes\vim Dark Blue.xml" ${endIf} SectionEnd Section un.Bespin ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Bespin.xml" + Delete "$installPath\themes\Bespin.xml" ${endIf} SectionEnd Section un.Zenburn ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Zenburn.xml" + Delete "$installPath\themes\Zenburn.xml" ${endIf} SectionEnd Section un.Solarized ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Solarized.xml" + Delete "$installPath\themes\Solarized.xml" ${endIf} SectionEnd Section un.Solarized-light ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Solarized-light.xml" + Delete "$installPath\themes\Solarized-light.xml" ${endIf} SectionEnd Section un.HotFudgeSundae ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\HotFudgeSundae.xml" + Delete "$installPath\themes\HotFudgeSundae.xml" ${endIf} SectionEnd Section un.khaki ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\khaki.xml" + Delete "$installPath\themes\khaki.xml" ${endIf} SectionEnd Section un.MossyLawn ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\MossyLawn.xml" + Delete "$installPath\themes\MossyLawn.xml" ${endIf} SectionEnd Section un.Navajo ${If} $keepUserData == "false" - Delete "$themesParentPath\themes\Navajo.xml" + Delete "$installPath\themes\Navajo.xml" ${endIf} SectionEnd diff --git a/PowerEditor/installer/nsisInclude/uninstall.nsh b/PowerEditor/installer/nsisInclude/uninstall.nsh index 7b9db2f53..0b62f480b 100644 --- a/PowerEditor/installer/nsisInclude/uninstall.nsh +++ b/PowerEditor/installer/nsisInclude/uninstall.nsh @@ -25,17 +25,17 @@ ; along with this program; if not, write to the Free Software ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -Var themesParentPath +Var installPath Var doLocalConf Var keepUserData Function un.onInit StrCpy $keepUserData "false" ; default value(It is must, otherwise few files such as shortcuts.xml, contextMenu.xml etc, will not be removed when $INSTDIR\doLocalConf.xml is not avaliable.) ; determinate theme path for uninstall themes - StrCpy $themesParentPath "$APPDATA\${APPNAME}" + StrCpy $installPath "$APPDATA\${APPNAME}" StrCpy $doLocalConf "false" IfFileExists $INSTDIR\doLocalConf.xml doesExist noneExist doesExist: - StrCpy $themesParentPath $INSTDIR + StrCpy $installPath $INSTDIR StrCpy $doLocalConf "true" noneExist: ;MessageBox MB_OK "doLocalConf == $doLocalConf" @@ -46,7 +46,6 @@ FunctionEnd Function un.onUninstSuccess ; make sure all the empty folders are deleted on successful uninstall ; These folders will be deleted only if they are empty - RMDir "$INSTDIR\autoCompletion\" RMDir "$INSTDIR\localization\" RMDir "$INSTDIR\plugins\APIs\" RMDir "$INSTDIR\plugins\disabled\" @@ -55,8 +54,10 @@ Function un.onUninstSuccess RMDir "$INSTDIR\" RMDir "$APPDATA\${APPNAME}\plugins\" - RMDir "$themesParentPath\themes\" ; if files are kept because of $keepUserData, this will not be deleted - RMDir "$themesParentPath\" + RMDir "$installPath\autoCompletion\" + RMDir "$installPath\userDefineLangs\" + RMDir "$installPath\themes\" ; if files are kept because of $keepUserData, this will not be deleted + RMDir "$installPath\" FunctionEnd @@ -246,6 +247,7 @@ Section Uninstall Delete "$INSTDIR\SourceCodePro-BoldIt.ttf" Delete "$INSTDIR\NppHelp.chm" Delete "$INSTDIR\userDefinedLang-markdown.default.modern.xml" + Delete "$INSTDIR\userDefineLangs\userDefinedLang-markdown.default.modern.xml" Delete "$INSTDIR\doLocalConf.xml" Delete "$INSTDIR\uninstall.ini" @@ -266,7 +268,7 @@ Section Uninstall Delete "$APPDATA\${APPNAME}\session.xml" Delete "$APPDATA\${APPNAME}\userDefineLang.xml" Delete "$APPDATA\${APPNAME}\insertExt.ini" - + Delete "$APPDATA\${APPNAME}\userDefineLangs\userDefinedLang-markdown.default.modern.xml" RMDir /r "$APPDATA\${APPNAME}\plugins\" RMDir /r "$APPDATA\${APPNAME}\backup\" ; Remove backup folder recursively if not empty RMDir "$APPDATA\${APPNAME}\themes\" ; has no effect as not empty at this momenet, but it is taken care at un.onUninstSuccess diff --git a/PowerEditor/installer/packageAll.bat b/PowerEditor/installer/packageAll.bat index ed95db384..97e109a5a 100644 --- a/PowerEditor/installer/packageAll.bat +++ b/PowerEditor/installer/packageAll.bat @@ -71,6 +71,7 @@ mkdir .\build rem Notepad++ minimalist package rmdir /S /Q .\minimalist mkdir .\minimalist +mkdir .\minimalist\userDefineLangs copy /Y ..\bin\license.txt .\minimalist\ If ErrorLevel 1 goto End @@ -78,6 +79,8 @@ copy /Y ..\bin\readme.txt .\minimalist\ If ErrorLevel 1 goto End copy /Y ..\bin\change.log .\minimalist\ If ErrorLevel 1 goto End +copy /Y "..\bin\userDefineLangs\userDefinedLang-markdown.default.modern.xml" .\minimalist\userDefineLangs\ +If ErrorLevel 1 goto End copy /Y ..\src\langs.model.xml .\minimalist\ If ErrorLevel 1 goto End copy /Y ..\src\stylers.model.xml .\minimalist\ @@ -95,6 +98,7 @@ If ErrorLevel 1 goto End rmdir /S /Q .\minimalist64 mkdir .\minimalist64 +mkdir .\minimalist64\userDefineLangs copy /Y ..\bin\license.txt .\minimalist64\ If ErrorLevel 1 goto End @@ -102,6 +106,8 @@ copy /Y ..\bin\readme.txt .\minimalist64\ If ErrorLevel 1 goto End copy /Y ..\bin\change.log .\minimalist64\ If ErrorLevel 1 goto End +copy /Y "..\bin\userDefineLangs\userDefinedLang-markdown.default.modern.xml" .\minimalist64\userDefineLangs\ +If ErrorLevel 1 goto End copy /Y ..\src\langs.model.xml .\minimalist64\ If ErrorLevel 1 goto End copy /Y ..\src\stylers.model.xml .\minimalist64\ @@ -117,7 +123,6 @@ If ErrorLevel 1 goto End copy /Y ..\bin64\SciLexer.dll .\minimalist64\ If ErrorLevel 1 goto End - rem Remove old built Notepad++ 32-bit package rmdir /S /Q .\zipped.package.release @@ -127,6 +132,7 @@ mkdir .\zipped.package.release\updater mkdir .\zipped.package.release\localization mkdir .\zipped.package.release\themes mkdir .\zipped.package.release\autoCompletion +mkdir .\zipped.package.release\userDefineLangs mkdir .\zipped.package.release\plugins mkdir .\zipped.package.release\plugins\NppExport mkdir .\zipped.package.release\plugins\mimeTools @@ -144,6 +150,7 @@ mkdir .\zipped.package.release64\updater mkdir .\zipped.package.release64\localization mkdir .\zipped.package.release64\themes mkdir .\zipped.package.release64\autoCompletion +mkdir .\zipped.package.release64\userDefineLangs mkdir .\zipped.package.release64\plugins mkdir .\zipped.package.release64\plugins\mimeTools mkdir .\zipped.package.release64\plugins\NppConverter @@ -248,6 +255,12 @@ If ErrorLevel 1 goto End copy /Y ".\APIs\*.xml" .\zipped.package.release64\autoCompletion\ If ErrorLevel 1 goto End +rem Markdown as UserDefineLanguge: Markdown syntax highlighter into Notepad++ 32-bit/64-bit package folders +copy /Y "..\bin\userDefineLangs\userDefinedLang-markdown.default.modern.xml" .\zipped.package.release\userDefineLangs\ +If ErrorLevel 1 goto End +copy /Y "..\bin\userDefineLangs\userDefinedLang-markdown.default.modern.xml" .\zipped.package.release64\userDefineLangs\ +If ErrorLevel 1 goto End + rem theme: Copy all files into Notepad++ 32-bit/64-bit package folders copy /Y ".\themes\*.xml" .\zipped.package.release\themes\ If ErrorLevel 1 goto End @@ -258,7 +271,7 @@ rem Plugins Admin rem for disabling auto-updater copy /Y ..\src\config.4zipPackage.xml .\zipped.package.release\config.xml If ErrorLevel 1 goto End -copy /Y ..\bin\nppPluginList.dll .\zipped.package.release\plugins\Config\ +copy /Y ..\bin\plugins\Config\nppPluginList.dll .\zipped.package.release\plugins\Config\ If ErrorLevel 1 goto End copy /Y ..\bin\updater\GUP.exe .\zipped.package.release\updater\ If ErrorLevel 1 goto End @@ -274,7 +287,7 @@ If ErrorLevel 1 goto End rem For disabling auto-updater copy /Y ..\src\config.4zipPackage.xml .\zipped.package.release64\config.xml If ErrorLevel 1 goto End -copy /Y ..\bin64\nppPluginList.dll .\zipped.package.release64\plugins\Config\ +copy /Y ..\bin64\plugins\Config\nppPluginList.dll .\zipped.package.release64\plugins\Config\ If ErrorLevel 1 goto End copy /Y ..\bin64\updater\GUP.exe .\zipped.package.release64\updater\ If ErrorLevel 1 goto End