diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-27 17:26:13 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-27 17:41:34 +0200 |
commit | d33a0917b2b18486811b08007af0b1d8cb3ab9d6 (patch) | |
tree | 9740054135d575d5aeb7f319ee71eb2cca3c1ac7 /desktop | |
parent | 52523f39aff9730a308eaca07a3c487829e36e8d (diff) |
allow to override settings based updater URL and channel through env
Change-Id: Ie2d96c1f6c15f91db6410997185161e5fb443dfc
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/updater.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index 5d60916ec700..d6b5574bd2ba 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -598,6 +598,11 @@ void download_file(const OUString& rURL, size_t nFileSize, const OUString& rHash void update_checker() { OUString aDownloadCheckBaseURL = officecfg::Office::Update::Update::URL::get(); + static const char* pDownloadCheckBaseURLEnv = std::getenv("LIBO_UPDATER_URL"); + if (pDownloadCheckBaseURLEnv) + { + aDownloadCheckBaseURL = OUString::createFromAscii(pDownloadCheckBaseURLEnv); + } OUString aProductName = utl::ConfigManager::getProductName(); OUString aBuildID("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}"); @@ -605,6 +610,11 @@ void update_checker() OUString aBuildTarget = "${_OS}_${_ARCH}"; rtl::Bootstrap::expandMacros(aBuildTarget); OUString aChannel = officecfg::Office::Update::Update::UpdateChannel::get(); + static const char* pUpdateChannelEnv = std::getenv("LIBO_UPDATER_CHANNEL"); + if (pUpdateChannelEnv) + { + aChannel = OUString::createFromAscii(pUpdateChannelEnv); + } OUString aDownloadCheckURL = aDownloadCheckBaseURL + "update/check/1/" + aProductName + "/" + aBuildID + "/" + aBuildTarget + "/" + aChannel; |