Adapt new plugin file system structure for the future release.

This commit is contained in:
Don HO 2018-04-30 19:36:15 +02:00
parent 7cf5232056
commit 454f92af4a
3 changed files with 40 additions and 29 deletions

View File

@ -31,29 +31,32 @@ SectionGroup "Plugins" Plugins
!ifndef ARCH64 !ifndef ARCH64
${MementoSection} "NppExport" NppExport ${MementoSection} "NppExport" NppExport
Delete "$INSTDIR\plugins\NppExport.dll" Delete "$INSTDIR\plugins\NppExport.dll"
SetOutPath "$INSTDIR\plugins" Delete "$INSTDIR\plugins\NppExport\NppExport.dll"
File "..\bin\plugins\NppExport.dll" SetOutPath "$INSTDIR\plugins\NppExport"
File "..\bin\plugins\NppExport\NppExport.dll"
${MementoSectionEnd} ${MementoSectionEnd}
!endif !endif
${MementoSection} "Mime Tools" MimeTools ${MementoSection} "Mime Tools" MimeTools
Delete "$INSTDIR\plugins\mimeTools.dll" Delete "$INSTDIR\plugins\mimeTools.dll"
SetOutPath "$INSTDIR\plugins" Delete "$INSTDIR\plugins\mimeTools\mimeTools.dll"
SetOutPath "$INSTDIR\plugins\mimeTools"
!ifdef ARCH64 !ifdef ARCH64
File "..\bin64\plugins\mimeTools.dll" File "..\bin64\plugins\mimeTools\mimeTools.dll"
!else !else
File "..\bin\plugins\mimeTools.dll" File "..\bin\plugins\mimeTools\mimeTools.dll"
!endif !endif
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Converter" Converter ${MementoSection} "Converter" Converter
Delete "$INSTDIR\plugins\NppConverter.dll" Delete "$INSTDIR\plugins\NppConverter.dll"
SetOutPath "$INSTDIR\plugins" Delete "$INSTDIR\plugins\NppConverter\NppConverter.dll"
SetOutPath "$INSTDIR\plugins\NppConverter"
!ifdef ARCH64 !ifdef ARCH64
File "..\bin64\plugins\NppConverter.dll" File "..\bin64\plugins\NppConverter\NppConverter.dll"
!else !else
File "..\bin\plugins\NppConverter.dll" File "..\bin\plugins\NppConverter\NppConverter.dll"
!endif !endif
${MementoSectionEnd} ${MementoSectionEnd}
@ -61,14 +64,15 @@ SectionGroup "Plugins" Plugins
Call setPathAndOptions Call setPathAndOptions
Delete "$INSTDIR\plugins\DSpellCheck.dll" Delete "$INSTDIR\plugins\DSpellCheck.dll"
SetOutPath "$INSTDIR\plugins" Delete "$INSTDIR\plugins\DSpellCheck\DSpellCheck.dll"
SetOutPath "$INSTDIR\plugins\DSpellCheck"
!ifdef ARCH64 !ifdef ARCH64
File "..\bin64\plugins\DSpellCheck.dll" File "..\bin64\plugins\DSpellCheck\DSpellCheck.dll"
SetOutPath "$INSTDIR\plugins\Config\Hunspell" SetOutPath "$INSTDIR\plugins\Config\Hunspell"
File "..\bin64\plugins\Config\Hunspell\en_US.aff" File "..\bin64\plugins\Config\Hunspell\en_US.aff"
File "..\bin64\plugins\Config\Hunspell\en_US.dic" File "..\bin64\plugins\Config\Hunspell\en_US.dic"
!else !else
File "..\bin\plugins\DSpellCheck.dll" File "..\bin\plugins\DSpellCheck\DSpellCheck.dll"
SetOutPath "$INSTDIR\plugins\Config\Hunspell" SetOutPath "$INSTDIR\plugins\Config\Hunspell"
File "..\bin\plugins\Config\Hunspell\en_US.aff" File "..\bin\plugins\Config\Hunspell\en_US.aff"
File "..\bin\plugins\Config\Hunspell\en_US.dic" File "..\bin\plugins\Config\Hunspell\en_US.dic"
@ -102,14 +106,17 @@ ${MementoSectionEnd}
SectionGroup un.Plugins SectionGroup un.Plugins
Section un.NppExport Section un.NppExport
Delete "$INSTDIR\plugins\NppExport.dll" Delete "$INSTDIR\plugins\NppExport.dll"
Delete "$INSTDIR\plugins\NppExport\NppExport.dll"
SectionEnd SectionEnd
Section un.Converter Section un.Converter
Delete "$INSTDIR\plugins\NppConverter.dll" Delete "$INSTDIR\plugins\NppConverter.dll"
Delete "$INSTDIR\plugins\NppConverter\NppConverter.dll"
SectionEnd SectionEnd
Section un.MimeTools Section un.MimeTools
Delete "$INSTDIR\plugins\mimeTools.dll" Delete "$INSTDIR\plugins\mimeTools.dll"
Delete "$INSTDIR\plugins\mimeTools\mimeTools.dll"
SectionEnd SectionEnd
Section un.PluginManager Section un.PluginManager
@ -121,6 +128,7 @@ SectionGroup un.Plugins
Section un.DSpellCheck Section un.DSpellCheck
Delete "$INSTDIR\plugins\DSpellCheck.dll" Delete "$INSTDIR\plugins\DSpellCheck.dll"
Delete "$INSTDIR\plugins\DSpellCheck\DSpellCheck.dll"
Delete "$UPDATE_PATH\plugins\Config\DSpellCheck.ini" Delete "$UPDATE_PATH\plugins\Config\DSpellCheck.ini"
Delete "$INSTDIR\plugins\Config\Hunspell\en_US.aff" Delete "$INSTDIR\plugins\Config\Hunspell\en_US.aff"
Delete "$INSTDIR\plugins\Config\Hunspell\en_US.dic" Delete "$INSTDIR\plugins\Config\Hunspell\en_US.dic"

View File

@ -43,17 +43,17 @@ If ErrorLevel 1 goto End
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\updater\libcurl.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\updater\libcurl.dll
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\NppExport.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\NppExport\NppExport.dll
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\mimeTools.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\mimeTools\mimeTools.dll
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\plugins\mimeTools.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\plugins\mimeTools\mimeTools.dll
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\NppConverter.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\NppConverter\NppConverter.dll
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\plugins\NppConverter.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\plugins\NppConverter\NppConverter.dll
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\DSpellCheck.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\DSpellCheck\DSpellCheck.dll
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\plugins\DSpellCheck.dll signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\plugins\DSpellCheck\DSpellCheck.dll
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
:NoSign :NoSign
@ -120,6 +120,10 @@ 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\plugins mkdir .\zipped.package.release\plugins
mkdir .\zipped.package.release\plugins\NppExport
mkdir .\zipped.package.release\plugins\mimeTools
mkdir .\zipped.package.release\plugins\NppConverter
mkdir .\zipped.package.release\plugins\DSpellCheck
mkdir .\zipped.package.release\plugins\APIs mkdir .\zipped.package.release\plugins\APIs
mkdir .\zipped.package.release\plugins\Config mkdir .\zipped.package.release\plugins\Config
mkdir .\zipped.package.release\plugins\doc mkdir .\zipped.package.release\plugins\doc
@ -131,6 +135,9 @@ 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\plugins mkdir .\zipped.package.release64\plugins
mkdir .\zipped.package.release64\plugins\mimeTools
mkdir .\zipped.package.release64\plugins\NppConverter
mkdir .\zipped.package.release64\plugins\DSpellCheck
mkdir .\zipped.package.release64\plugins\APIs mkdir .\zipped.package.release64\plugins\APIs
mkdir .\zipped.package.release64\plugins\Config mkdir .\zipped.package.release64\plugins\Config
mkdir .\zipped.package.release64\plugins\doc mkdir .\zipped.package.release64\plugins\doc
@ -185,13 +192,13 @@ If ErrorLevel 1 goto End
rem Plugins rem Plugins
copy /Y "..\bin\plugins\NppExport.dll" .\zipped.package.release\plugins\ copy /Y "..\bin\plugins\NppExport\NppExport.dll" .\zipped.package.release\plugins\NppExport\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y "..\bin\plugins\mimeTools.dll" .\zipped.package.release\plugins\ copy /Y "..\bin\plugins\mimeTools\mimeTools.dll" .\zipped.package.release\plugins\mimeTools\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y "..\bin\plugins\NppConverter.dll" .\zipped.package.release\plugins\ copy /Y "..\bin\plugins\NppConverter\NppConverter.dll" .\zipped.package.release\plugins\NppConverter\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y "..\bin\plugins\DSpellCheck.dll" .\zipped.package.release\plugins\ copy /Y "..\bin\plugins\DSpellCheck\DSpellCheck.dll" .\zipped.package.release\plugins\DSpellCheck\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
mkdir .\zipped.package.release\plugins\Config\Hunspell mkdir .\zipped.package.release\plugins\Config\Hunspell
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
@ -202,11 +209,11 @@ If ErrorLevel 1 goto End
copy /Y "..\bin\plugins\Config\Hunspell\en_US.dic" .\zipped.package.release\plugins\Config\Hunspell\ copy /Y "..\bin\plugins\Config\Hunspell\en_US.dic" .\zipped.package.release\plugins\Config\Hunspell\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y "..\bin64\plugins\mimeTools.dll" .\zipped.package.release64\plugins\ copy /Y "..\bin64\plugins\mimeTools\mimeTools.dll" .\zipped.package.release64\plugins\mimeTools\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y "..\bin64\plugins\NppConverter.dll" .\zipped.package.release64\plugins\ copy /Y "..\bin64\plugins\NppConverter\NppConverter.dll" .\zipped.package.release64\plugins\NppConverter\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
copy /Y "..\bin64\plugins\DSpellCheck.dll" .\zipped.package.release64\plugins\ copy /Y "..\bin64\plugins\DSpellCheck\DSpellCheck.dll" .\zipped.package.release64\plugins\DSpellCheck\
If ErrorLevel 1 goto End If ErrorLevel 1 goto End
mkdir .\zipped.package.release64\plugins\Config\Hunspell mkdir .\zipped.package.release64\plugins\Config\Hunspell
If ErrorLevel 1 goto End If ErrorLevel 1 goto End

View File

@ -369,7 +369,6 @@ bool PluginsManager::loadPluginsV2(const TCHAR* dir)
PathAppend(pluginsFolderFilter, TEXT("*.*")); PathAppend(pluginsFolderFilter, TEXT("*.*"));
WIN32_FIND_DATA foundData; WIN32_FIND_DATA foundData;
printStr(pluginsFolder.c_str());
HANDLE hFindFolder = ::FindFirstFile(pluginsFolderFilter.c_str(), &foundData); HANDLE hFindFolder = ::FindFirstFile(pluginsFolderFilter.c_str(), &foundData);
HANDLE hFindDll = INVALID_HANDLE_VALUE; HANDLE hFindDll = INVALID_HANDLE_VALUE;
@ -382,7 +381,6 @@ bool PluginsManager::loadPluginsV2(const TCHAR* dir)
generic_string dllName = foundData.cFileName; generic_string dllName = foundData.cFileName;
dllName += TEXT(".dll"); dllName += TEXT(".dll");
PathAppend(pluginsFullPathFilter, dllName); PathAppend(pluginsFullPathFilter, dllName);
printStr(pluginsFullPathFilter.c_str());
// get plugin // get plugin
hFindDll = ::FindFirstFile(pluginsFullPathFilter.c_str(), &foundData); hFindDll = ::FindFirstFile(pluginsFullPathFilter.c_str(), &foundData);
@ -403,7 +401,6 @@ bool PluginsManager::loadPluginsV2(const TCHAR* dir)
generic_string dllName2 = foundData.cFileName; generic_string dllName2 = foundData.cFileName;
dllName2 += TEXT(".dll"); dllName2 += TEXT(".dll");
PathAppend(pluginsFullPathFilter2, dllName2); PathAppend(pluginsFullPathFilter2, dllName2);
printStr(pluginsFullPathFilter2.c_str());
// get plugin // get plugin
hFindDll = ::FindFirstFile(pluginsFullPathFilter2.c_str(), &foundData); hFindDll = ::FindFirstFile(pluginsFullPathFilter2.c_str(), &foundData);
if (hFindDll != INVALID_HANDLE_VALUE && !(foundData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) if (hFindDll != INVALID_HANDLE_VALUE && !(foundData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
@ -419,7 +416,6 @@ bool PluginsManager::loadPluginsV2(const TCHAR* dir)
::FindClose(hFindFolder); ::FindClose(hFindFolder);
::FindClose(hFindDll); ::FindClose(hFindDll);
for (size_t i = 0, len = dllNames.size(); i < len; ++i) for (size_t i = 0, len = dllNames.size(); i < len; ++i)
{ {
loadPlugin(dllNames[i].c_str(), dll2Remove); loadPlugin(dllNames[i].c_str(), dll2Remove);