Fix Markdown not working in installer package of v7.6.3

and add Markdown in zip packages
This commit is contained in:
Don HO 2019-03-03 03:12:27 +01:00
parent ea08e037d2
commit dcd3942362
5 changed files with 50 additions and 34 deletions

View File

@ -105,10 +105,6 @@ Function copyCommonFiles
File "..\bin\change.log" File "..\bin\change.log"
File "..\bin\readme.txt" 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 !ifdef ARCH64
File "..\bin64\SciLexer.dll" File "..\bin64\SciLexer.dll"
File "..\bin64\notepad++.exe" File "..\bin64\notepad++.exe"
@ -116,6 +112,11 @@ Function copyCommonFiles
File "..\bin\SciLexer.dll" File "..\bin\SciLexer.dll"
File "..\bin\notepad++.exe" File "..\bin\notepad++.exe"
!endif !endif
; Markdown in user defined languages
SetOutPath "$UPDATE_PATH\userDefineLangs\"
File "..\bin\userDefineLangs\userDefinedLang-markdown.default.modern.xml"
; Localization ; Localization
; Default language English ; Default language English
SetOutPath "$INSTDIR\localization\" SetOutPath "$INSTDIR\localization\"

View File

@ -136,121 +136,121 @@ SectionGroup un.Themes
Section un.BlackBoard Section un.BlackBoard
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Black board.xml" Delete "$installPath\themes\Black board.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Choco Section un.Choco
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Choco.xml" Delete "$installPath\themes\Choco.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.HelloKitty Section un.HelloKitty
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Hello Kitty.xml" Delete "$installPath\themes\Hello Kitty.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.MonoIndustrial Section un.MonoIndustrial
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Mono Industrial.xml" Delete "$installPath\themes\Mono Industrial.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Monokai Section un.Monokai
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Monokai.xml" Delete "$installPath\themes\Monokai.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Obsidian Section un.Obsidian
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\obsidian.xml" Delete "$installPath\themes\obsidian.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.PlasticCodeWrap Section un.PlasticCodeWrap
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Plastic Code Wrap.xml" Delete "$installPath\themes\Plastic Code Wrap.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.RubyBlue Section un.RubyBlue
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Ruby Blue.xml" Delete "$installPath\themes\Ruby Blue.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Twilight Section un.Twilight
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Twilight.xml" Delete "$installPath\themes\Twilight.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.VibrantInk Section un.VibrantInk
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Vibrant Ink.xml" Delete "$installPath\themes\Vibrant Ink.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.DeepBlack Section un.DeepBlack
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Deep Black.xml" Delete "$installPath\themes\Deep Black.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.vimDarkBlue Section un.vimDarkBlue
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\vim Dark Blue.xml" Delete "$installPath\themes\vim Dark Blue.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Bespin Section un.Bespin
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Bespin.xml" Delete "$installPath\themes\Bespin.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Zenburn Section un.Zenburn
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Zenburn.xml" Delete "$installPath\themes\Zenburn.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Solarized Section un.Solarized
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Solarized.xml" Delete "$installPath\themes\Solarized.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Solarized-light Section un.Solarized-light
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Solarized-light.xml" Delete "$installPath\themes\Solarized-light.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.HotFudgeSundae Section un.HotFudgeSundae
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\HotFudgeSundae.xml" Delete "$installPath\themes\HotFudgeSundae.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.khaki Section un.khaki
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\khaki.xml" Delete "$installPath\themes\khaki.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.MossyLawn Section un.MossyLawn
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\MossyLawn.xml" Delete "$installPath\themes\MossyLawn.xml"
${endIf} ${endIf}
SectionEnd SectionEnd
Section un.Navajo Section un.Navajo
${If} $keepUserData == "false" ${If} $keepUserData == "false"
Delete "$themesParentPath\themes\Navajo.xml" Delete "$installPath\themes\Navajo.xml"
${endIf} ${endIf}
SectionEnd SectionEnd

View File

@ -25,17 +25,17 @@
; along with this program; if not, write to the Free Software ; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Var themesParentPath Var installPath
Var doLocalConf Var doLocalConf
Var keepUserData Var keepUserData
Function un.onInit 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.) 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 ; determinate theme path for uninstall themes
StrCpy $themesParentPath "$APPDATA\${APPNAME}" StrCpy $installPath "$APPDATA\${APPNAME}"
StrCpy $doLocalConf "false" StrCpy $doLocalConf "false"
IfFileExists $INSTDIR\doLocalConf.xml doesExist noneExist IfFileExists $INSTDIR\doLocalConf.xml doesExist noneExist
doesExist: doesExist:
StrCpy $themesParentPath $INSTDIR StrCpy $installPath $INSTDIR
StrCpy $doLocalConf "true" StrCpy $doLocalConf "true"
noneExist: noneExist:
;MessageBox MB_OK "doLocalConf == $doLocalConf" ;MessageBox MB_OK "doLocalConf == $doLocalConf"
@ -46,7 +46,6 @@ FunctionEnd
Function un.onUninstSuccess Function un.onUninstSuccess
; make sure all the empty folders are deleted on successful uninstall ; make sure all the empty folders are deleted on successful uninstall
; These folders will be deleted only if they are empty ; These folders will be deleted only if they are empty
RMDir "$INSTDIR\autoCompletion\"
RMDir "$INSTDIR\localization\" RMDir "$INSTDIR\localization\"
RMDir "$INSTDIR\plugins\APIs\" RMDir "$INSTDIR\plugins\APIs\"
RMDir "$INSTDIR\plugins\disabled\" RMDir "$INSTDIR\plugins\disabled\"
@ -55,8 +54,10 @@ Function un.onUninstSuccess
RMDir "$INSTDIR\" RMDir "$INSTDIR\"
RMDir "$APPDATA\${APPNAME}\plugins\" RMDir "$APPDATA\${APPNAME}\plugins\"
RMDir "$themesParentPath\themes\" ; if files are kept because of $keepUserData, this will not be deleted RMDir "$installPath\autoCompletion\"
RMDir "$themesParentPath\" RMDir "$installPath\userDefineLangs\"
RMDir "$installPath\themes\" ; if files are kept because of $keepUserData, this will not be deleted
RMDir "$installPath\"
FunctionEnd FunctionEnd
@ -246,6 +247,7 @@ Section Uninstall
Delete "$INSTDIR\SourceCodePro-BoldIt.ttf" Delete "$INSTDIR\SourceCodePro-BoldIt.ttf"
Delete "$INSTDIR\NppHelp.chm" Delete "$INSTDIR\NppHelp.chm"
Delete "$INSTDIR\userDefinedLang-markdown.default.modern.xml" Delete "$INSTDIR\userDefinedLang-markdown.default.modern.xml"
Delete "$INSTDIR\userDefineLangs\userDefinedLang-markdown.default.modern.xml"
Delete "$INSTDIR\doLocalConf.xml" Delete "$INSTDIR\doLocalConf.xml"
Delete "$INSTDIR\uninstall.ini" Delete "$INSTDIR\uninstall.ini"
@ -266,7 +268,7 @@ Section Uninstall
Delete "$APPDATA\${APPNAME}\session.xml" Delete "$APPDATA\${APPNAME}\session.xml"
Delete "$APPDATA\${APPNAME}\userDefineLang.xml" Delete "$APPDATA\${APPNAME}\userDefineLang.xml"
Delete "$APPDATA\${APPNAME}\insertExt.ini" Delete "$APPDATA\${APPNAME}\insertExt.ini"
Delete "$APPDATA\${APPNAME}\userDefineLangs\userDefinedLang-markdown.default.modern.xml"
RMDir /r "$APPDATA\${APPNAME}\plugins\" RMDir /r "$APPDATA\${APPNAME}\plugins\"
RMDir /r "$APPDATA\${APPNAME}\backup\" ; Remove backup folder recursively if not empty 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 RMDir "$APPDATA\${APPNAME}\themes\" ; has no effect as not empty at this momenet, but it is taken care at un.onUninstSuccess

View File

@ -71,6 +71,7 @@ mkdir .\build
rem Notepad++ minimalist package rem Notepad++ minimalist package
rmdir /S /Q .\minimalist rmdir /S /Q .\minimalist
mkdir .\minimalist mkdir .\minimalist
mkdir .\minimalist\userDefineLangs
copy /Y ..\bin\license.txt .\minimalist\ copy /Y ..\bin\license.txt .\minimalist\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
@ -78,6 +79,8 @@ copy /Y ..\bin\readme.txt .\minimalist\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y ..\bin\change.log .\minimalist\ copy /Y ..\bin\change.log .\minimalist\
If ErrorLevel 1 goto End 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\ copy /Y ..\src\langs.model.xml .\minimalist\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y ..\src\stylers.model.xml .\minimalist\ copy /Y ..\src\stylers.model.xml .\minimalist\
@ -95,6 +98,7 @@ If ErrorLevel 1 goto End
rmdir /S /Q .\minimalist64 rmdir /S /Q .\minimalist64
mkdir .\minimalist64 mkdir .\minimalist64
mkdir .\minimalist64\userDefineLangs
copy /Y ..\bin\license.txt .\minimalist64\ copy /Y ..\bin\license.txt .\minimalist64\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
@ -102,6 +106,8 @@ copy /Y ..\bin\readme.txt .\minimalist64\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y ..\bin\change.log .\minimalist64\ copy /Y ..\bin\change.log .\minimalist64\
If ErrorLevel 1 goto End 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\ copy /Y ..\src\langs.model.xml .\minimalist64\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y ..\src\stylers.model.xml .\minimalist64\ copy /Y ..\src\stylers.model.xml .\minimalist64\
@ -117,7 +123,6 @@ If ErrorLevel 1 goto End
copy /Y ..\bin64\SciLexer.dll .\minimalist64\ copy /Y ..\bin64\SciLexer.dll .\minimalist64\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
rem Remove old built Notepad++ 32-bit package rem Remove old built Notepad++ 32-bit package
rmdir /S /Q .\zipped.package.release rmdir /S /Q .\zipped.package.release
@ -127,6 +132,7 @@ mkdir .\zipped.package.release\updater
mkdir .\zipped.package.release\localization mkdir .\zipped.package.release\localization
mkdir .\zipped.package.release\themes mkdir .\zipped.package.release\themes
mkdir .\zipped.package.release\autoCompletion mkdir .\zipped.package.release\autoCompletion
mkdir .\zipped.package.release\userDefineLangs
mkdir .\zipped.package.release\plugins mkdir .\zipped.package.release\plugins
mkdir .\zipped.package.release\plugins\NppExport mkdir .\zipped.package.release\plugins\NppExport
mkdir .\zipped.package.release\plugins\mimeTools mkdir .\zipped.package.release\plugins\mimeTools
@ -144,6 +150,7 @@ mkdir .\zipped.package.release64\updater
mkdir .\zipped.package.release64\localization mkdir .\zipped.package.release64\localization
mkdir .\zipped.package.release64\themes mkdir .\zipped.package.release64\themes
mkdir .\zipped.package.release64\autoCompletion mkdir .\zipped.package.release64\autoCompletion
mkdir .\zipped.package.release64\userDefineLangs
mkdir .\zipped.package.release64\plugins mkdir .\zipped.package.release64\plugins
mkdir .\zipped.package.release64\plugins\mimeTools mkdir .\zipped.package.release64\plugins\mimeTools
mkdir .\zipped.package.release64\plugins\NppConverter mkdir .\zipped.package.release64\plugins\NppConverter
@ -248,6 +255,12 @@ If ErrorLevel 1 goto End
copy /Y ".\APIs\*.xml" .\zipped.package.release64\autoCompletion\ copy /Y ".\APIs\*.xml" .\zipped.package.release64\autoCompletion\
If ErrorLevel 1 goto End 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 rem theme: Copy all files into Notepad++ 32-bit/64-bit package folders
copy /Y ".\themes\*.xml" .\zipped.package.release\themes\ copy /Y ".\themes\*.xml" .\zipped.package.release\themes\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
@ -258,7 +271,7 @@ rem Plugins Admin
rem for disabling auto-updater rem for disabling auto-updater
copy /Y ..\src\config.4zipPackage.xml .\zipped.package.release\config.xml copy /Y ..\src\config.4zipPackage.xml .\zipped.package.release\config.xml
If ErrorLevel 1 goto End 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 If ErrorLevel 1 goto End
copy /Y ..\bin\updater\GUP.exe .\zipped.package.release\updater\ copy /Y ..\bin\updater\GUP.exe .\zipped.package.release\updater\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
@ -274,7 +287,7 @@ If ErrorLevel 1 goto End
rem For disabling auto-updater rem For disabling auto-updater
copy /Y ..\src\config.4zipPackage.xml .\zipped.package.release64\config.xml copy /Y ..\src\config.4zipPackage.xml .\zipped.package.release64\config.xml
If ErrorLevel 1 goto End 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 If ErrorLevel 1 goto End
copy /Y ..\bin64\updater\GUP.exe .\zipped.package.release64\updater\ copy /Y ..\bin64\updater\GUP.exe .\zipped.package.release64\updater\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End