diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-20 09:47:03 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-20 09:47:03 +0000 |
commit | 5165ed02285315cc0bed7977c7bac6d0a90ca43c (patch) | |
tree | 9b761a21eb924915e51c2d803208e6c01b505a45 /toolkit | |
parent | e1db27e19989db11fef70f439cf95821316535b3 (diff) | |
parent | ca9abcdf1702c37bf00048dab3f460b2252873a3 (diff) | |
download | UXP-5165ed02285315cc0bed7977c7bac6d0a90ca43c.tar UXP-5165ed02285315cc0bed7977c7bac6d0a90ca43c.tar.gz UXP-5165ed02285315cc0bed7977c7bac6d0a90ca43c.tar.lz UXP-5165ed02285315cc0bed7977c7bac6d0a90ca43c.tar.xz UXP-5165ed02285315cc0bed7977c7bac6d0a90ca43c.zip |
Merge branch 'redwood' into releaseRELBASE_20201124RELBASE_20201120RC_20201120
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/moz.configure | 30 | ||||
-rw-r--r-- | toolkit/mozapps/installer/packager.mk | 2 | ||||
-rw-r--r-- | toolkit/mozapps/installer/packager.py | 17 | ||||
-rw-r--r-- | toolkit/mozapps/installer/upload-files.mk | 2 |
4 files changed, 14 insertions, 37 deletions
diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 863327751..8d399be67 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -345,36 +345,6 @@ set_config('MOZ_FMP4', fmp4) set_define('MOZ_FMP4', fmp4) add_old_configure_assignment('MOZ_FMP4', fmp4) -# Miscellaneous -# ============================================================== -option(name='--enable-chrome-format', - help='Select FORMAT of chrome files during packaging.', - nargs=1, - choices=('omni', 'jar', 'flat'), - default='omni') - -@depends('--enable-chrome-format') -def packager_format(value): - return value[0] - -set_config('MOZ_PACKAGER_FORMAT', packager_format) - -@depends(host, build_project) -def jar_maker_format(host, build_project): - # Multilocales for mobile/android use the same mergedirs for all locales, - # so we can't use symlinks for those builds. - if host.os == 'WINNT': - return 'flat' - return 'symlink' - -set_config('MOZ_JAR_MAKER_FILE_FORMAT', jar_maker_format) - -@depends(toolkit) -def omnijar_name(toolkit): - return 'omni.ja' - -set_config('OMNIJAR_NAME', omnijar_name) - # Permissions system # ============================================================== option(name='--disable-permissions', diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index e700b5162..6cae15658 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -50,7 +50,7 @@ stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_MANIFEST_DEPS) ) \ $(if $(JARLOG_DIR),$(addprefix --jarlog ,$(wildcard $(JARLOG_FILE_AB_CD)))) \ $(if $(OPTIMIZEJARS),--optimizejars) \ - $(if $(DISABLE_JAR_COMPRESSION),--disable-compression) \ + $(addprefix --compress ,$(JAR_COMPRESSION)) \ $(addprefix --unify ,$(UNIFY_DIST)) \ $(MOZ_PKG_MANIFEST) '$(DIST)' '$(DIST)'/$(STAGEPATH)$(MOZ_PKG_DIR)$(if $(MOZ_PKG_MANIFEST),,$(_BINPATH)) \ $(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES))) diff --git a/toolkit/mozapps/installer/packager.py b/toolkit/mozapps/installer/packager.py index 1a144823c..3b90e97c2 100644 --- a/toolkit/mozapps/installer/packager.py +++ b/toolkit/mozapps/installer/packager.py @@ -23,6 +23,7 @@ from mozpack.copier import ( Jarrer, ) from mozpack.errors import errors +from mozpack.mozjar import JAR_BROTLI from mozpack.unify import UnifiedBuildFinder import mozpack.path as mozpath import buildconfig @@ -270,9 +271,9 @@ def main(): help='Enable jar optimizations') parser.add_argument('--unify', default='', help='Base directory of another build to unify with') - parser.add_argument('--disable-compression', action='store_false', - dest='compress', default=True, - help='Disable jar compression') + parser.add_argument('--compress', choices=('none', 'deflate', 'brotli'), + default='deflate', + help='Use given jar compression (default: deflate)') parser.add_argument('manifest', default=None, nargs='?', help='Manifest file name') parser.add_argument('source', help='Source directory') @@ -290,15 +291,21 @@ def main(): for name, value in [split_define(d) for d in args.defines]: defines[name] = value + compress = { + 'none': False, + 'deflate': True, + 'brotli': JAR_BROTLI, + }[args.compress] + copier = FileCopier() if args.format == 'flat': formatter = FlatFormatter(copier) elif args.format == 'jar': - formatter = JarFormatter(copier, compress=args.compress, optimize=args.optimizejars) + formatter = JarFormatter(copier, compress=compress, optimize=args.optimizejars) elif args.format == 'omni': formatter = OmniJarFormatter(copier, buildconfig.substs['OMNIJAR_NAME'], - compress=args.compress, + compress=compress, optimize=args.optimizejars, non_resources=args.non_resource) else: diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk index 82b550fb4..865d2cf6a 100644 --- a/toolkit/mozapps/installer/upload-files.mk +++ b/toolkit/mozapps/installer/upload-files.mk @@ -385,7 +385,7 @@ ifneq (android,$(MOZ_WIDGET_TOOLKIT)) OPTIMIZEJARS = 1 ifneq (gonk,$(MOZ_WIDGET_TOOLKIT)) ifdef NIGHTLY_BUILD - DISABLE_JAR_COMPRESSION = 1 + JAR_COMPRESSION ?= none endif endif endif |