Kaydet (Commit) 22aaa9be authored tarafından Markus Mohrhard's avatar Markus Mohrhard

updater: move the update channel info from the config to versionrc

Change-Id: Id19578a889de51cacac869d7ec681c5c18c40cf9
Reviewed-on: https://gerrit.libreoffice.org/41365Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 2d29dae5
#!/usr/bin/python3
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import sys
from config import parse_config
def main():
if len(sys.argv) < 2:
sys.exit(1)
update_config = sys.argv[1]
config = parse_config(update_config)
print(config.channel)
if __name__ == "__main__":
main()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -687,7 +687,7 @@ void update_checker()
OUString aBuildTarget = "${_OS}_${_ARCH}";
rtl::Bootstrap::expandMacros(aBuildTarget);
OUString aChannel = officecfg::Office::Update::Update::UpdateChannel::get();
OUString aChannel = Updater::getUpdateChannel();
static const char* pUpdateChannelEnv = std::getenv("LIBO_UPDATER_CHANNEL");
if (pUpdateChannelEnv)
{
......@@ -835,6 +835,14 @@ OUString Updater::getBuildID()
return aBuildID;
}
OUString Updater::getUpdateChannel()
{
OUString aUpdateChannel("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":UpdateChannel}");
rtl::Bootstrap::expandMacros(aUpdateChannel);
return aUpdateChannel;
}
void Updater::removeUpdateFiles()
{
Updater::log("Removing: " + getUpdateFileURL());
......
......@@ -29,6 +29,7 @@ public:
static OUString getInstallationPath();
static OUString getBuildID();
static OUString getUpdateChannel();
static void log(const OUString& rMessage);
static void log(const OString& rMessage);
......
......@@ -156,6 +156,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'BuildVersion=$(BUILD_VER_STRING)' \
&& echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' \
&& echo 'ExtensionUpdateURL=http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update' \
&& echo 'UpdateChannel=$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG))' \
&& echo 'ReferenceOOoMajorMinor=4.1' \
&& echo 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US' \
&& echo 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),http://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))' \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment