|
|
@ -339,15 +339,14 @@ void PluginsAdminDlg::collectNppCurrentStatusInfos()
|
|
|
|
|
|
|
|
|
|
|
|
bool PluginsAdminDlg::installPlugins()
|
|
|
|
bool PluginsAdminDlg::installPlugins()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
vector<size_t> indexes = _availableList.getCheckedIndexes();
|
|
|
|
vector<size_t> indexes = _availableListView.getCheckedIndexes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
|
|
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
|
|
|
generic_string updaterDir = pNppParameters->getNppPath();
|
|
|
|
generic_string updaterDir = pNppParameters->getNppPath();
|
|
|
|
updaterDir += TEXT("\\updater\\");
|
|
|
|
updaterDir += TEXT("\\updater\\");
|
|
|
|
|
|
|
|
|
|
|
|
generic_string updaterFullPath = updaterDir + TEXT("gup.exe");
|
|
|
|
generic_string updaterFullPath = updaterDir + TEXT("gup.exe");
|
|
|
|
generic_string updaterParams = TEXT("-unzipTo -clean ");
|
|
|
|
generic_string updaterParams = TEXT("-unzipTo ");
|
|
|
|
|
|
|
|
|
|
|
|
for (auto i : indexes)
|
|
|
|
for (auto i : indexes)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -355,56 +354,54 @@ bool PluginsAdminDlg::installPlugins()
|
|
|
|
|
|
|
|
|
|
|
|
// add folder to operate
|
|
|
|
// add folder to operate
|
|
|
|
generic_string destFolder = pNppParameters->getAppDataNppDir();
|
|
|
|
generic_string destFolder = pNppParameters->getAppDataNppDir();
|
|
|
|
PathAppend(destFolder, _availablePluginList[i]._name);
|
|
|
|
PathAppend(destFolder, _availableList.getPluginInfoFromIndex(i)->_folderName);
|
|
|
|
|
|
|
|
|
|
|
|
updaterParams += destFolder;
|
|
|
|
updaterParams += destFolder;
|
|
|
|
|
|
|
|
|
|
|
|
// add zipFile's url
|
|
|
|
// add zipFile's url
|
|
|
|
updaterParams += TEXT(" ");
|
|
|
|
updaterParams += TEXT(" ");
|
|
|
|
updaterParams += _availablePluginList[i]._repository;
|
|
|
|
updaterParams += _availableList.getPluginInfoFromIndex(i)->_repository;
|
|
|
|
|
|
|
|
|
|
|
|
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
|
|
|
|
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
|
|
|
|
updater.run();
|
|
|
|
updater.run();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool PluginsAdminDlg::updatePlugins()
|
|
|
|
bool PluginsAdminDlg::updatePlugins()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
vector<size_t> indexes = _updateList.getCheckedIndexes();
|
|
|
|
vector<size_t> indexes = _updateListView.getCheckedIndexes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
|
|
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
|
|
|
generic_string updaterDir = pNppParameters->getNppPath();
|
|
|
|
generic_string updaterDir = pNppParameters->getNppPath();
|
|
|
|
updaterDir += TEXT("\\updater\\");
|
|
|
|
updaterDir += TEXT("\\updater\\");
|
|
|
|
|
|
|
|
|
|
|
|
generic_string updaterFullPath = updaterDir + TEXT("gup.exe");
|
|
|
|
generic_string updaterFullPath = updaterDir + TEXT("gup.exe");
|
|
|
|
generic_string updaterParams = TEXT("-unzipTo -clean ");
|
|
|
|
generic_string updaterParams = TEXT("-unzipTo ");
|
|
|
|
|
|
|
|
|
|
|
|
for (auto i : indexes)
|
|
|
|
for (auto i : indexes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// add folder to operate
|
|
|
|
// add folder to operate
|
|
|
|
generic_string destFolder = pNppParameters->getAppDataNppDir();
|
|
|
|
generic_string destFolder = pNppParameters->getAppDataNppDir();
|
|
|
|
PathAppend(destFolder, _availablePluginList[i]._name);
|
|
|
|
PathAppend(destFolder, _availableList.getPluginInfoFromIndex(i)->_folderName);
|
|
|
|
|
|
|
|
|
|
|
|
updaterParams += destFolder;
|
|
|
|
updaterParams += destFolder;
|
|
|
|
|
|
|
|
|
|
|
|
// add zipFile's url
|
|
|
|
// add zipFile's url
|
|
|
|
updaterParams += TEXT(" ");
|
|
|
|
updaterParams += TEXT(" ");
|
|
|
|
updaterParams += _availablePluginList[i]._repository;
|
|
|
|
updaterParams += _availableList.getPluginInfoFromIndex(i)->_repository;
|
|
|
|
|
|
|
|
|
|
|
|
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
|
|
|
|
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
|
|
|
|
updater.run();
|
|
|
|
updater.run();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool PluginsAdminDlg::removePlugins()
|
|
|
|
bool PluginsAdminDlg::removePlugins()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
vector<size_t> indexes = _installedList.getCheckedIndexes();
|
|
|
|
vector<size_t> indexes = _installedListView.getCheckedIndexes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
|
|
|
NppParameters *pNppParameters = NppParameters::getInstance();
|
|
|
|
generic_string updaterDir = pNppParameters->getNppPath();
|
|
|
|
generic_string updaterDir = pNppParameters->getNppPath();
|
|
|
@ -419,14 +416,14 @@ bool PluginsAdminDlg::removePlugins()
|
|
|
|
|
|
|
|
|
|
|
|
// add folder to operate
|
|
|
|
// add folder to operate
|
|
|
|
generic_string destFolder = pNppParameters->getAppDataNppDir();
|
|
|
|
generic_string destFolder = pNppParameters->getAppDataNppDir();
|
|
|
|
PathAppend(destFolder, _availablePluginList[i]._name);
|
|
|
|
PathAppend(destFolder, _availableList.getPluginInfoFromIndex(i)->_folderName);
|
|
|
|
|
|
|
|
|
|
|
|
updaterParams += destFolder;
|
|
|
|
updaterParams += destFolder;
|
|
|
|
|
|
|
|
|
|
|
|
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
|
|
|
|
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
|
|
|
|
updater.run();
|
|
|
|
updater.run();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|