Bug 1515451 Part 2 - Build update agent in-tree r=firefox-build-system-reviewers,mhowell,rstewart

The configure option --enable-update-agent is left disabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D35506

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Adam Gashlin 2020-03-11 22:32:26 +00:00
parent 215d47ef61
commit b7a227398f
8 changed files with 61 additions and 0 deletions

View File

@ -43,6 +43,7 @@ ac_add_options --enable-proxy-bypass-protection
# These aren't supported on mingw at this time
ac_add_options --disable-webrtc # Bug 1393901
ac_add_options --disable-geckodriver # Bug 1489320
ac_add_options --disable-update-agent # Bug 1561797
# Find our toolchain
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"

View File

@ -43,6 +43,7 @@ ac_add_options --enable-proxy-bypass-protection
# These aren't supported on mingw at this time
ac_add_options --disable-webrtc # Bug 1393901
ac_add_options --disable-geckodriver # Bug 1489320
ac_add_options --disable-update-agent # Bug 1561797
# Find our toolchain
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"

View File

@ -0,0 +1,2 @@
RUST_PROGRAMS += ['updateagent']
RCINCLUDE = 'updateagent.rc'

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="*"
name="Mozilla Update Agent"
type="win32"
/>
<description>Mozilla Update Agent</description>
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
<ms_asmv3:security>
<ms_asmv3:requestedPrivileges>
<ms_asmv3:requestedExecutionLevel level="asInvoker" uiAccess="false" />
</ms_asmv3:requestedPrivileges>
</ms_asmv3:security>
</ms_asmv3:trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
</assembly>

View File

@ -0,0 +1,3 @@
#include <winresrc.h>
1 RT_MANIFEST "updateagent.exe.manifest"

View File

@ -219,6 +219,13 @@ this.AppConstants = Object.freeze({
false,
#endif
MOZ_UPDATE_AGENT:
#ifdef MOZ_UPDATE_AGENT
true,
#else
false,
#endif
MOZ_BITS_DOWNLOAD:
#ifdef MOZ_BITS_DOWNLOAD
true,

View File

@ -39,6 +39,11 @@ if CONFIG['MOZ_MAINTENANCE_SERVICE']:
'components/maintenanceservice'
]
if CONFIG['MOZ_UPDATE_AGENT']:
DIRS += [
'components/updateagent'
]
DIRS += ['xre']
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':

View File

@ -1316,6 +1316,23 @@ set_config('MOZ_MAINTENANCE_SERVICE',
depends_if('--enable-maintenance-service',
when=target_is_windows)(lambda _: True))
# Update agent (currently Windows 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,
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))
# BITS download (Windows only)
# ==============================================================