mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 15:54:17 +02:00
Define the plugin-list's path for Plugin Admin
It will be in plugins/Config/
This commit is contained in:
parent
bfff12fd9c
commit
da49749438
@ -418,30 +418,50 @@ vector<PluginUpdateInfo*> PluginViewList::fromUiIndexesToPluginInfos(const std::
|
|||||||
|
|
||||||
PluginsAdminDlg::PluginsAdminDlg()
|
PluginsAdminDlg::PluginsAdminDlg()
|
||||||
{
|
{
|
||||||
|
// Get wingup path
|
||||||
NppParameters *pNppParameters = NppParameters::getInstance();
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
||||||
_updaterDir = pNppParameters->getNppPath();
|
_updaterDir = pNppParameters->getNppPath();
|
||||||
PathAppend(_updaterDir, TEXT("updater"));
|
PathAppend(_updaterDir, TEXT("updater"));
|
||||||
|
|
||||||
_updaterFullPath = _updaterDir;
|
_updaterFullPath = _updaterDir;
|
||||||
PathAppend(_updaterFullPath, TEXT("gup.exe"));
|
PathAppend(_updaterFullPath, TEXT("gup.exe"));
|
||||||
|
|
||||||
|
// get plugin-list path
|
||||||
|
_pluginListFullPath = getPluginConfigPath();
|
||||||
|
|
||||||
#ifdef DEBUG // if not debug, then it's release
|
#ifdef DEBUG // if not debug, then it's release
|
||||||
|
|
||||||
// load from nppPluginList.json instead of nppPluginList.dll
|
// load from nppPluginList.json instead of nppPluginList.dll
|
||||||
_pluginListFullPath = TEXT("C:\\tmp\\nppPluginList.json");
|
PathAppend(_pluginListFullPath, TEXT("nppPluginList.json"));
|
||||||
|
|
||||||
#else //RELEASE
|
#else //RELEASE
|
||||||
|
PathAppend(_pluginListFullPath, TEXT("nppPluginList.dll"));
|
||||||
#ifdef _WIN64
|
|
||||||
_pluginListFullPath = TEXT("C:\\sources\\nppPluginList\\vcxproj\\x64\\Debug\\nppPluginList.dll");
|
|
||||||
#else
|
|
||||||
_pluginListFullPath = TEXT("C:\\sources\\nppPluginList\\vcxproj\\Debug\\nppPluginList.dll");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generic_string PluginsAdminDlg::getPluginConfigPath() const
|
||||||
|
{
|
||||||
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
||||||
|
generic_string nppPluginsConfDir;
|
||||||
|
|
||||||
|
if (pNppParameters->isLocal())
|
||||||
|
{
|
||||||
|
nppPluginsConfDir = pNppParameters->getNppPath();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nppPluginsConfDir = pNppParameters->getAppDataNppDir();
|
||||||
|
}
|
||||||
|
|
||||||
|
PathAppend(nppPluginsConfDir, TEXT("plugins"));
|
||||||
|
PathAppend(nppPluginsConfDir, TEXT("Config"));
|
||||||
|
|
||||||
|
if (!::PathFileExists(nppPluginsConfDir.c_str()))
|
||||||
|
{
|
||||||
|
::CreateDirectory(nppPluginsConfDir.c_str(), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return nppPluginsConfDir;
|
||||||
|
}
|
||||||
|
|
||||||
generic_string PluginsAdminDlg::getPluginsPath() const
|
generic_string PluginsAdminDlg::getPluginsPath() const
|
||||||
{
|
{
|
||||||
NppParameters *pNppParameters = NppParameters::getInstance();
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
||||||
|
@ -183,6 +183,7 @@ public :
|
|||||||
bool updateListAndLoadFromJson();
|
bool updateListAndLoadFromJson();
|
||||||
void setAdminMode(bool isAdm) { _nppCurrentStatus._isAdminMode = isAdm; };
|
void setAdminMode(bool isAdm) { _nppCurrentStatus._isAdminMode = isAdm; };
|
||||||
generic_string getPluginsPath() const;
|
generic_string getPluginsPath() const;
|
||||||
|
generic_string getPluginConfigPath() const;
|
||||||
|
|
||||||
bool installPlugins();
|
bool installPlugins();
|
||||||
bool updatePlugins();
|
bool updatePlugins();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user