Bug 1163082 - Part 1: Add --with-android-distribution-directory. r=gps

This simply packs the assets/ subdirectory of the distribution
directory into the assets/ directory of the Android APK using existing
mechanisms.  It also removes the older method of manually pushing
files into dist/bin/distribution, from where they would be packaged
into the APK under distribution/.
This commit is contained in:
Nick Alexander 2016-01-27 12:25:04 -08:00
parent 3c349c1000
commit 61ddcc0a51
5 changed files with 26 additions and 2 deletions

View File

@ -4008,6 +4008,22 @@ if test -n "$MOZ_ANDROID_RESOURCE_CONSTRAINED"; then
fi
AC_SUBST(MOZ_ANDROID_RESOURCE_CONSTRAINED)
# Optional Firefox for Android partner distribution directory.
MOZ_ARG_WITH_STRING(android-distribution-directory,
[ --with-android-distribution-directory=dir
Optional Firefox for Android partner distribution directory.],
MOZ_ANDROID_DISTRIBUTION_DIRECTORY=$withval)
if test -n "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY"; then
# A distribution directory must have an assets/distribution directory.
# See https://wiki.mozilla.org/Mobile/Distribution_Files.
if test ! -d "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY/assets/distribution" ; then
AC_MSG_ERROR([--with-android-distribution-directory does not contain assets/distribution;
(looked for ${MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets/distribution).])
fi
fi
AC_SUBST(MOZ_ANDROID_DISTRIBUTION_DIRECTORY)
dnl ========================================================
dnl = Trademarked Branding
dnl ========================================================

View File

@ -65,6 +65,11 @@ android {
sourceSets {
main {
manifest.srcFile "${topobjdir}/mobile/android/base/AndroidManifest.xml"
assets {
if (mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY) {
srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
}
}
}
androidTest {

View File

@ -885,6 +885,11 @@ ANDROID_ASSETS_DIRS += [
'/mobile/android/app/assets',
]
if CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY']:
ANDROID_ASSETS_DIRS += [
'%' + CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY'] + '/assets',
]
# We do not expose MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN here because that
# would leak the value to build logs. Instead we expose the token quietly where
# appropriate in Makefile.in.

View File

@ -78,7 +78,6 @@
[xpcom]
@BINPATH@/package-name.txt
@BINPATH@/classes.dex
@BINPATH@/distribution/*
[browser]
; [Base Browser Files]

View File

@ -302,7 +302,6 @@ DIST_FILES += \
chrome.manifest \
update.locale \
removed-files \
distribution \
$(NULL)
NON_DIST_FILES = \