diff options
Diffstat (limited to '')
-rw-r--r-- | tools/update-programs/README | 19 | ||||
-rw-r--r-- | tools/update-programs/app.mozbuild | 61 | ||||
-rw-r--r-- | tools/update-programs/confvars.sh | 12 | ||||
-rw-r--r-- | tools/update-programs/moz.configure | 22 |
4 files changed, 114 insertions, 0 deletions
diff --git a/tools/update-programs/README b/tools/update-programs/README new file mode 100644 index 0000000000..35de17eb8f --- /dev/null +++ b/tools/update-programs/README @@ -0,0 +1,19 @@ +This directory defines a build project for focused work on the "update +programs": programs owned or maintained by the Install/Update team +that are standalone binaries (i.e., not part of the Firefox binary +proper). + +To use this build project, prepare a minimal mozconfig with +``` +ac_add_options --enable-project=tools/update-programs +``` + +Depending on the mozconfig options and host and target OS, some of the +following will be built: + +1. the maintenance service (when `--enable-maintenance-service`); +2. the updater binary (when `MOZ_UPDATER=1`); +3. the Windows Default Browser Agent (when `--enable-default-browser-agent`); + +Packaging the installer and uninstaller is not yet supported: instead, +use an (artifact) build with `--enable-project=browser`. diff --git a/tools/update-programs/app.mozbuild b/tools/update-programs/app.mozbuild new file mode 100644 index 0000000000..330d9b11ec --- /dev/null +++ b/tools/update-programs/app.mozbuild @@ -0,0 +1,61 @@ +# 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/. + +if CONFIG['MOZ_MAINTENANCE_SERVICE'] or \ + CONFIG['MOZ_UPDATE_AGENT'] or \ + CONFIG['MOZ_UPDATER']: + DIRS += [ + '/toolkit/mozapps/update/common', + ] + +if CONFIG['MOZ_DEFAULT_BROWSER_AGENT']: + DIRS += [ + '/toolkit/components/jsoncpp/src/lib_json', + '/toolkit/mozapps/defaultagent', + ] + +if CONFIG['MOZ_MAINTENANCE_SERVICE']: + DIRS += [ + '/toolkit/components/maintenanceservice' + ] + +if CONFIG['MOZ_UPDATER']: + # NSS (and NSPR). + DIRS += [ + '/modules/xz-embedded', + '/config/external/nspr', + '/config/external/sqlite', + '/config/external/zlib', + '/memory', + '/mfbt', + '/mozglue', + '/security', + ] + + # The signing related bits of libmar depend on NSS. + DIRS += [ + '/modules/libmar', + '/other-licenses/bsdiff', + '/toolkit/mozapps/update/updater/bspatch', + '/toolkit/mozapps/update/updater', + ] + +# Expose specific non-XPCOM headers when building standalone. +if not CONFIG['MOZ_UPDATER']: + # When building the updater, we build /mozglue, which includes this. + EXPORTS.mozilla += [ + '/mozglue/misc/DynamicallyLinkedFunctionPtr.h', + ] + +EXPORTS.mozilla += [ + '/toolkit/xre/CmdLineAndEnvUtils.h', + '/widget/windows/WinHeaderOnlyUtils.h', +] + +EXPORTS += [ + '/xpcom/base/nsAutoRef.h', + '/xpcom/base/nsWindowsHelpers.h', + '/xpcom/string/nsCharTraits.h', + '/xpcom/string/nsUTF8Utils.h', +] diff --git a/tools/update-programs/confvars.sh b/tools/update-programs/confvars.sh new file mode 100644 index 0000000000..66e2a80605 --- /dev/null +++ b/tools/update-programs/confvars.sh @@ -0,0 +1,12 @@ +#! /bin/sh +# 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/. + +MOZ_APP_VENDOR=Mozilla + +MOZ_BRANDING_DIRECTORY=browser/branding/unofficial +MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} + +# Build the updater by default. Use --disable-updater to not. +MOZ_UPDATER=1 diff --git a/tools/update-programs/moz.configure b/tools/update-programs/moz.configure new file mode 100644 index 0000000000..2b50751905 --- /dev/null +++ b/tools/update-programs/moz.configure @@ -0,0 +1,22 @@ +# 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/. + +# Spoof a stub of `js/moz.configure` for the included scripts. +@dependable +def js_standalone(): + return False + + +@depends(target) +def fold_libs(target): + return target.os in ("WINNT", "OSX", "Android") + + +set_config("MOZ_FOLD_LIBS", fold_libs) + + +include("../../build/moz.configure/rust.configure") +include("../../build/moz.configure/nspr.configure") +include("../../build/moz.configure/nss.configure") +include("../../build/moz.configure/update-programs.configure") |