Bug 1687783 - Part 1: Enable MOZ_UPDATE_AGENT by default on macOS and Windows. r=firefox-build-system-reviewers,mhentges

At the same time, remove the global define, which isn't necessary and
triggers some rebuilds.  Nothing is using MOZ_UPDATE_AGENT right now
so it's safe to enable more broadly, and it will be used to gate new
background update work.

Differential Revision: https://phabricator.services.mozilla.com/D102786
This commit is contained in:
Nick Alexander 2021-03-10 04:28:54 +00:00
parent 62a9d11677
commit 6e8c03946e
3 changed files with 11 additions and 13 deletions

View File

@ -35,26 +35,23 @@ set_config(
depends_if("--enable-maintenance-service", when=target_is_windows)(lambda _: True),
)
# Update agent (currently Windows only)
# Update agent (currently Windows and macOS only)
# This is an independent task that runs on a schedule to
# check for, download, and install updates.
# ==============================================================
option(
"--enable-update-agent",
when=target_is_windows,
default=False,
"--disable-update-agent",
when=target_is_windows | target_is_osx,
default=True,
help="{Enable|Disable} building update agent",
)
set_define(
"MOZ_UPDATE_AGENT",
depends_if("--enable-update-agent", when=target_is_windows)(lambda _: True),
)
set_config(
"MOZ_UPDATE_AGENT",
depends_if("--enable-update-agent", when=target_is_windows)(lambda _: True),
depends_if("--enable-update-agent", when=target_is_windows | target_is_osx)(
lambda _: True
),
)
# Enable or disable the default browser agent, which monitors the user's default

View File

@ -9,18 +9,18 @@ with Files("**"):
XPCSHELL_TESTS_MANIFESTS += ["tests/xpcshell/xpcshell.ini"]
XPIDL_MODULE = "taskscheduler"
XPCOM_MANIFESTS += ["components.conf"]
EXTRA_JS_MODULES += ["TaskScheduler.jsm"]
# This whole component is currently Windows-only, but a Mac implementation is planned.
# Only the Windows C++ interface is an XPCOM component.
if CONFIG["OS_TARGET"] == "WINNT":
EXTRA_JS_MODULES += ["TaskSchedulerWinImpl.jsm"]
XPCOM_MANIFESTS += ["components.conf"]
XPIDL_MODULE = "taskscheduler"
XPIDL_SOURCES += ["nsIWinTaskSchedulerService.idl"]
EXPORTS += ["nsWinTaskScheduler.h"]
SOURCES += ["nsWinTaskScheduler.cpp"]
OS_LIBS += ["taskschd"]
DEFINES["UNICODE"] = True
FINAL_LIBRARY = "xul"

View File

@ -300,6 +300,7 @@ for var in (
"MOZ_SYSTEM_NSS",
"MOZ_UNSIGNED_APP_SCOPE",
"MOZ_UNSIGNED_SYSTEM_SCOPE",
"MOZ_UPDATE_AGENT",
"MOZ_UPDATER",
):
if CONFIG[var]: