1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Issue #251 - Move chrome packaging options to ac configure

Also adds options for new functionality in #1683
This commit is contained in:
Matt A. Tobin
2020-11-16 12:47:54 -05:00
committed by roytam1
parent aa16c6c7ee
commit e31680357e
6 changed files with 86 additions and 34 deletions
+3
View File
@@ -161,6 +161,8 @@ def old_configure_options(*options):
'--enable-b2g-camera',
'--enable-b2g-ril',
'--enable-bundled-fonts',
'--enable-chrome-compression',
'--enable-chrome-format',
'--enable-clang-plugin',
'--enable-content-sandbox',
'--enable-cookies',
@@ -263,6 +265,7 @@ def old_configure_options(*options):
'--with-app-name',
'--with-arch',
'--with-branding',
'--with-chrome-name',
'--with-crashreporter-enable-percent',
'--with-cross-lib',
'--with-debug-label',
+1 -1
View File
@@ -216,7 +216,7 @@ endif # NO_PROFILE_GUIDED_OPTIMIZE
MAKE_JARS_FLAGS = \
-t $(topsrcdir) \
-f $(MOZ_JAR_MAKER_FILE_FORMAT) \
-f $(MOZ_CHROME_FILE_FORMAT) \
$(NULL)
ifdef USE_EXTENSION_MANIFEST
+1 -1
View File
@@ -22,7 +22,7 @@ REF_MANIFEST = $(if $(USE_EXTENSION_MANIFEST),chrome.manifest,test.manifest)
check-%::
if test -d $(FINAL_TARGET); then rm -rf $(FINAL_TARGET); fi;
$(MAKE) realchrome MOZ_JAR_MAKER_FILE_FORMAT=$*
$(MAKE) realchrome MOZ_CHROME_FILE_FORMAT=$*
@echo 'Comparing manifests...'
@if ! sort $(MY_MANIFEST) | diff --text -U 0 $(srcdir)/../$(REF_MANIFEST).$* - ; then \
echo 'TEST-UNEXPECTED-FAIL | config/tests/$(REF_MANIFEST).$* | differing content in manifest!' ; \
+79
View File
@@ -4402,6 +4402,85 @@ dnl =
dnl ========================================================
MOZ_ARG_HEADER(Misc. Options)
dnl =========================================================
dnl = Chrome format
dnl =========================================================
MOZ_ARG_ENABLE_STRING([chrome-format],
[ --enable-chrome-format=jar|flat|omni
Select FORMAT of chrome files during packaging],
MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`)
if test -z "$MOZ_CHROME_FILE_FORMAT"; then
MOZ_CHROME_FILE_FORMAT=omni
fi
if test "$MOZ_CHROME_FILE_FORMAT" = "symlink"; then
AC_MSG_ERROR([--enable-chrome-format=symlink has been deprecated. It is now used by default in $DIST/bin on platforms that support it])
fi
if test "$MOZ_CHROME_FILE_FORMAT" != "jar" &&
test "$MOZ_CHROME_FILE_FORMAT" != "flat" &&
test "$MOZ_CHROME_FILE_FORMAT" != "omni"; then
AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, or omni])
fi
dnl =========================================================
dnl = Chrome compression
dnl =========================================================
MOZ_ARG_ENABLE_STRING([chrome-compression],
[ --enable-chrome-compression=none|deflate|brotli
Select COMPRESSION type of chrome files during packaging],
JAR_COMPRESSION=`echo $enableval | tr A-Z a-z`)
if test -z "$JAR_COMPRESSION"; then
JAR_COMPRESSION=deflate
fi
if test "$JAR_COMPRESSION" != "none" &&
test "$JAR_COMPRESSION" != "deflate" &&
test "$JAR_COMPRESSION" != "brotli"; then
AC_MSG_ERROR([--enable-chrome-compression must be set to either none, deflate, or brotli])
fi
dnl =========================================================
dnl Omnijar packaging (bug 552121)
dnl =========================================================
dnl Omnijar packaging is compatible with flat packaging.
dnl In unpackaged builds, omnijar looks for files as if
dnl things were flat packaged. After packaging, all files
dnl are loaded from a single jar. MOZ_CHROME_FILE_FORMAT
dnl is set to flat since putting files into jars is only
dnl done during packaging with omnijar.
if test "$MOZ_CHROME_FILE_FORMAT" = "omni"; then
MOZ_OMNIJAR=1
AC_DEFINE(MOZ_OMNIJAR)
fi
# Allow someone to change OMNIJAR_NAME in mozconfig
MOZ_ARG_WITH_STRING(chrome-name,
[ --with-chrome-name=CHROMENAME
Set chrome jar name (default=omni.ja)],
[ val=`echo $withval`
OMNIJAR_NAME="$val"])
# Default Omni Jar Name
if test -z "$OMNIJAR_NAME" ; then
OMNIJAR_NAME=omni.ja
fi
MOZ_PACKAGER_FORMAT="$MOZ_CHROME_FILE_FORMAT"
if test "$OS_ARCH" = "WINNT"; then
MOZ_CHROME_FILE_FORMAT=flat
else
MOZ_CHROME_FILE_FORMAT=symlink
fi
AC_SUBST(JAR_COMPRESSION)
AC_SUBST(OMNIJAR_NAME)
AC_SUBST(MOZ_OMNIJAR)
AC_SUBST(MOZ_PACKAGER_FORMAT)
AC_SUBST(MOZ_CHROME_FILE_FORMAT)
dnl ========================================================
dnl = Disable Jetpack
dnl ========================================================
@@ -84,7 +84,7 @@ class TestBuild(unittest.TestCase):
config.topobjdir)
overrides = [
'install_manifest_depends=',
'MOZ_JAR_MAKER_FILE_FORMAT=flat',
'MOZ_CHROME_FILE_FORMAT=flat',
'TEST_MOZBUILD=1',
]
with self.line_handler() as handle_make_line:
@@ -108,7 +108,7 @@ class TestBuild(unittest.TestCase):
config.topobjdir)
overrides = [
'install_manifest_depends=',
'MOZ_JAR_MAKER_FILE_FORMAT=flat',
'MOZ_CHROME_FILE_FORMAT=flat',
'TEST_MOZBUILD=1',
]
with self.line_handler() as handle_make_line:
-30
View File
@@ -344,36 +344,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',