Plugin list updater (in progress)
This commit is contained in:
parent
45d4c8d35c
commit
a739eade8e
@ -241,18 +241,25 @@ public:
|
||||
std::vector<generic_string> addNppComponents(const TCHAR *destDir, const TCHAR *extFilterName, const TCHAR *extFilter);
|
||||
std::vector<generic_string> addNppPlugins(const TCHAR *extFilterName, const TCHAR *extFilter);
|
||||
int getHtmlXmlEncoding(const TCHAR *fileName) const;
|
||||
|
||||
HACCEL getAccTable() const{
|
||||
return _accelerator.getAccTable();
|
||||
}
|
||||
};
|
||||
|
||||
bool emergency(const generic_string& emergencySavedDir);
|
||||
|
||||
Buffer* getCurrentBuffer() {
|
||||
return _pEditView->getCurrentBuffer();
|
||||
}
|
||||
};
|
||||
|
||||
void launchDocumentBackupTask();
|
||||
int getQuoteIndexFrom(const wchar_t* quoter) const;
|
||||
void showQuoteFromIndex(int index) const;
|
||||
void showQuote(const QuoteParams* quote) const;
|
||||
|
||||
generic_string getPluginListVerStr() const {
|
||||
return _pluginsAdminDlg.getPluginListVerStr();
|
||||
};
|
||||
|
||||
private:
|
||||
Notepad_plus_Window *_pPublicInterface = nullptr;
|
||||
|
@ -92,6 +92,11 @@ public:
|
||||
_isPrelaunch = val;
|
||||
}
|
||||
|
||||
generic_string getPluginListVerStr() const
|
||||
{
|
||||
return _notepad_plus_plus_core.getPluginListVerStr();
|
||||
}
|
||||
|
||||
virtual void destroy()
|
||||
{
|
||||
::DestroyWindow(_hSelf);
|
||||
|
@ -439,6 +439,13 @@ PluginsAdminDlg::PluginsAdminDlg()
|
||||
#endif
|
||||
}
|
||||
|
||||
generic_string PluginsAdminDlg::getPluginListVerStr() const
|
||||
{
|
||||
Version v;
|
||||
v.setVersionFrom(_pluginListFullPath);
|
||||
return v.toString();
|
||||
}
|
||||
|
||||
bool PluginsAdminDlg::exitToInstallRemovePlugins(Operation op, const vector<PluginUpdateInfo*>& puis)
|
||||
{
|
||||
generic_string opStr;
|
||||
|
@ -207,6 +207,7 @@ public :
|
||||
|
||||
void changeTabName(LIST_TYPE index, const TCHAR *name2change);
|
||||
void changeColumnName(COLUMN_TYPE index, const TCHAR *name2change);
|
||||
generic_string getPluginListVerStr() const;
|
||||
|
||||
protected:
|
||||
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
@ -570,12 +570,23 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int)
|
||||
if (doUpdatePluginList)
|
||||
{
|
||||
// Update Plugin List
|
||||
updaterParams += TEXT(" -upPL");
|
||||
generic_string upPlParams = TEXT("-v");
|
||||
upPlParams += notepad_plus_plus.getPluginListVerStr();
|
||||
|
||||
if (nppParameters.isx64())
|
||||
{
|
||||
upPlParams += TEXT(" -px64");
|
||||
}
|
||||
|
||||
upPlParams += TEXT(" -upZip");
|
||||
|
||||
// overrided "InfoUrl" in gup.xml
|
||||
updaterParams += TEXT(" https://notepad-plus-plus.org/update/pluginListDownloadUrl.php");
|
||||
upPlParams += TEXT(" https://notepad-plus-plus.org/update/pluginListDownloadUrl.php");
|
||||
|
||||
Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str());
|
||||
// indicate the pluginList installation location
|
||||
upPlParams += nppParameters.getPluginConfDir();
|
||||
|
||||
Process updater(updaterFullPath.c_str(), upPlParams.c_str(), updaterDir.c_str());
|
||||
updater.run();
|
||||
|
||||
// TODO: Update next update date
|
||||
|
Loading…
Reference in New Issue
Block a user