From e16d3b3695d54eee6ee7a76f3c1bdbd86342c0eb Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Sun, 21 Sep 2025 22:45:20 +0300 Subject: [PATCH] Change plugins url to releases --- DesktopEditor/pluginsmanager/main.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/DesktopEditor/pluginsmanager/main.cpp b/DesktopEditor/pluginsmanager/main.cpp index 96590b4a03..5aa4a16246 100644 --- a/DesktopEditor/pluginsmanager/main.cpp +++ b/DesktopEditor/pluginsmanager/main.cpp @@ -255,6 +255,7 @@ private: std::wstring m_sPluginsDir; std::wstring m_sMarketplaceUrl; + std::wstring m_sMarketplaceRepo; std::wstring m_sSettingsDir; std::wstring m_sSettingsFile; @@ -267,6 +268,7 @@ public: { m_sPluginsDir = L""; m_sMarketplaceUrl = L"https://onlyoffice.github.io"; + m_sMarketplaceRepo = L"https://github.com/ONLYOFFICE/onlyoffice.github.io"; m_sSettingsDir = NSSystemUtils::GetAppDataDir() + L"/pluginsmanager"; @@ -323,7 +325,28 @@ public: if ( sUrl.length() ) { - m_sMarketplaceUrl = sUrl; + if (0 == sUrl.find(L"https://onlyoffice.github.io")) + { + m_sMarketplaceUrl = L"https://onlyoffice.github.io"; + m_sMarketplaceRepo = L"https://github.com/ONLYOFFICE/onlyoffice.github.io"; + } + else if (0 == sUrl.find(L"https://onlyoffice-plugins.github.io/onlyoffice.github.io")) + { + m_sMarketplaceUrl = L"https://onlyoffice-plugins.github.io/onlyoffice.github.io"; + m_sMarketplaceRepo = L"https://github.com/ONLYOFFICE-PLUGINS/onlyoffice.github.io"; + } + else + { + m_sMarketplaceUrl = sUrl; + m_sMarketplaceRepo = L""; + std::wstring::size_type posDelimeter = m_sMarketplaceUrl.find(';'); + if (posDelimeter != std::wstring::npos) + { + m_sMarketplaceUrl = sUrl.substr(0, posDelimeter); + m_sMarketplaceRepo = sUrl.substr(posDelimeter + 1); + } + } + bResult = true; } @@ -758,6 +781,8 @@ private: if (pPlugin) { sPackageUrl = m_sMarketplaceUrl + L"/sdkjs-plugins/content/" + pPlugin->m_sName + L"/deploy/" + pPlugin->m_sName + L".plugin"; + if (!m_sMarketplaceRepo.empty()) + sPackageUrl = m_sMarketplaceRepo + L"/releases/latest/download/" + pPlugin->m_sName + L".plugin"; } else if (IsNeedDownload(sPlugin)) {