gecko-dev/toolkit/components/updateagent/UpdateUrlConstants.py
Kirk Steuber 9579958b80 Bug 1624391 - Add Update URL Generation to the update agent r=agashlin,mhowell
This patch does not include the capability to read update URLs set by enterprise policy. That capability will be added later, when we add other enterprise policy support.

Differential Revision: https://phabricator.services.mozilla.com/D69062
2020-04-17 20:47:30 +00:00

25 lines
1 KiB
Python

#!/usr/bin/env python
# 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 buildconfig
def main(output, locale=None):
assert(locale is not None)
output.write("/* THIS FILE IS GENERATED BY UpdateUrlConstants.py - DO NOT EDIT */\n\n")
OS_TARGET = buildconfig.substs["OS_TARGET"]
output.write("pub const OS_TARGET: &str = \"{}\";\n".format(OS_TARGET))
TARGET_XPCOM_ABI = buildconfig.substs["TARGET_XPCOM_ABI"]
output.write("pub const TARGET_XPCOM_ABI: &str = \"{}\";\n".format(TARGET_XPCOM_ABI))
MOZ_ASAN = "true" if buildconfig.substs.get("MOZ_ASAN") else "false"
output.write("pub const MOZ_ASAN: bool = {};\n".format(MOZ_ASAN))
GRE_MILESTONE = buildconfig.substs["GRE_MILESTONE"]
output.write("pub const GRE_MILESTONE: &str = \"{}\";\n".format(GRE_MILESTONE))
output.write("pub const LOCALE: &str = \"{}\";\n".format(locale))