Bug 1063643 - Allow for building Fennec with a limited set of resources. r=nalexander

This commit is contained in:
Richard Newman 2014-09-06 08:25:20 -07:00
parent 8fc19d1b50
commit 24259b0a9e
3 changed files with 22 additions and 0 deletions

View File

@ -413,6 +413,16 @@ case "$target" in
;;
esac
MOZ_ARG_ENABLE_BOOL(android-resource-constrained,
[ --enable-android-resource-constrained
exclude hi-res images and similar from the final APK],
MOZ_ANDROID_RESOURCE_CONSTRAINED=1)
if test -n "$MOZ_ANDROID_RESOURCE_CONSTRAINED"; then
AC_DEFINE(MOZ_ANDROID_RESOURCE_CONSTRAINED, $MOZ_ANDROID_RESOURCE_CONSTRAINED)
AC_SUBST(MOZ_ANDROID_RESOURCE_CONSTRAINED)
fi
MOZ_ARG_WITH_STRING(android-min-sdk,
[ --with-android-min-sdk=[VER] Impose a minimum Firefox for Android SDK version],
[ MOZ_ANDROID_MIN_SDK_VERSION=$withval ])

View File

@ -137,6 +137,17 @@ public class AppConstants {
null;
#endif
/**
* Whether this APK was built with constrained resources --
* no xhdpi+ images, for example.
*/
public static final boolean MOZ_ANDROID_RESOURCE_CONSTRAINED =
#ifdef MOZ_ANDROID_RESOURCE_CONSTRAINED
true;
#else
false;
#endif
public static final boolean MOZ_SERVICES_HEALTHREPORT =
#ifdef MOZ_SERVICES_HEALTHREPORT
true;

View File

@ -370,6 +370,7 @@ $(1): $$(call mkdir_deps,$(filter-out ./,$(dir $(3) $(4) $(5)))) $(2)
-F $(3) \
-J $(4) \
--output-text-symbols $(5) \
$(if $(MOZ_ANDROID_RESOURCE_CONSTRAINED),-c hdpi,) \
--ignore-assets "$$(ANDROID_AAPT_IGNORE)"
endef