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/.

--HG--
extra : commitid : BLgM6ZCm9AY
extra : rebase_source : 572d1ff35a02505f452fee67130b48c8df4499b5
extra : histedit_source : 0b8f087bc6d70fa42401f4a2476898139bdf606c
This commit is contained in:
Nick Alexander 2016-01-27 12:25:04 -08:00
Родитель ac44079df1
Коммит 609e5edb32
5 изменённых файлов: 26 добавлений и 2 удалений

Просмотреть файл

@ -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 ========================================================

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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.

Просмотреть файл

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

Просмотреть файл

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