mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
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> addNppComponents(const TCHAR *destDir, const TCHAR *extFilterName, const TCHAR *extFilter);
|
||||||
std::vector<generic_string> addNppPlugins(const TCHAR *extFilterName, const TCHAR *extFilter);
|
std::vector<generic_string> addNppPlugins(const TCHAR *extFilterName, const TCHAR *extFilter);
|
||||||
int getHtmlXmlEncoding(const TCHAR *fileName) const;
|
int getHtmlXmlEncoding(const TCHAR *fileName) const;
|
||||||
|
|
||||||
HACCEL getAccTable() const{
|
HACCEL getAccTable() const{
|
||||||
return _accelerator.getAccTable();
|
return _accelerator.getAccTable();
|
||||||
}
|
};
|
||||||
|
|
||||||
bool emergency(const generic_string& emergencySavedDir);
|
bool emergency(const generic_string& emergencySavedDir);
|
||||||
|
|
||||||
Buffer* getCurrentBuffer() {
|
Buffer* getCurrentBuffer() {
|
||||||
return _pEditView->getCurrentBuffer();
|
return _pEditView->getCurrentBuffer();
|
||||||
}
|
};
|
||||||
|
|
||||||
void launchDocumentBackupTask();
|
void launchDocumentBackupTask();
|
||||||
int getQuoteIndexFrom(const wchar_t* quoter) const;
|
int getQuoteIndexFrom(const wchar_t* quoter) const;
|
||||||
void showQuoteFromIndex(int index) const;
|
void showQuoteFromIndex(int index) const;
|
||||||
void showQuote(const QuoteParams* quote) const;
|
void showQuote(const QuoteParams* quote) const;
|
||||||
|
|
||||||
|
generic_string getPluginListVerStr() const {
|
||||||
|
return _pluginsAdminDlg.getPluginListVerStr();
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Notepad_plus_Window *_pPublicInterface = nullptr;
|
Notepad_plus_Window *_pPublicInterface = nullptr;
|
||||||
|
@ -92,6 +92,11 @@ public:
|
|||||||
_isPrelaunch = val;
|
_isPrelaunch = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generic_string getPluginListVerStr() const
|
||||||
|
{
|
||||||
|
return _notepad_plus_plus_core.getPluginListVerStr();
|
||||||
|
}
|
||||||
|
|
||||||
virtual void destroy()
|
virtual void destroy()
|
||||||
{
|
{
|
||||||
::DestroyWindow(_hSelf);
|
::DestroyWindow(_hSelf);
|
||||||
|
@ -439,6 +439,13 @@ PluginsAdminDlg::PluginsAdminDlg()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generic_string PluginsAdminDlg::getPluginListVerStr() const
|
||||||
|
{
|
||||||
|
Version v;
|
||||||
|
v.setVersionFrom(_pluginListFullPath);
|
||||||
|
return v.toString();
|
||||||
|
}
|
||||||
|
|
||||||
bool PluginsAdminDlg::exitToInstallRemovePlugins(Operation op, const vector<PluginUpdateInfo*>& puis)
|
bool PluginsAdminDlg::exitToInstallRemovePlugins(Operation op, const vector<PluginUpdateInfo*>& puis)
|
||||||
{
|
{
|
||||||
generic_string opStr;
|
generic_string opStr;
|
||||||
|
@ -207,6 +207,7 @@ public :
|
|||||||
|
|
||||||
void changeTabName(LIST_TYPE index, const TCHAR *name2change);
|
void changeTabName(LIST_TYPE index, const TCHAR *name2change);
|
||||||
void changeColumnName(COLUMN_TYPE index, const TCHAR *name2change);
|
void changeColumnName(COLUMN_TYPE index, const TCHAR *name2change);
|
||||||
|
generic_string getPluginListVerStr() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
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)
|
if (doUpdatePluginList)
|
||||||
{
|
{
|
||||||
// Update Plugin List
|
// 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
|
// 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();
|
updater.run();
|
||||||
|
|
||||||
// TODO: Update next update date
|
// TODO: Update next update date
|
||||||
|
Loading…
x
Reference in New Issue
Block a user