mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r=glandium
This commit is contained in:
parent
8f683e0300
commit
2fc886a158
@ -13,6 +13,7 @@ ANDROID_RES_DIRS += [
|
||||
]
|
||||
ANDROID_ASSETS_DIRS += [
|
||||
'src/main/assets',
|
||||
'!/dist/bin/gaia/assets', # We must have built /b2g/gaia before building app/.
|
||||
]
|
||||
|
||||
# Make aapt generate org/mozilla/gecko/R.java. There's a problem hidden here:
|
||||
|
@ -22,4 +22,8 @@ DIRS += [
|
||||
'/b2g/components',
|
||||
'/b2g/chrome',
|
||||
'/b2g/gaia',
|
||||
# We must build the libs target of app after building the libs target of
|
||||
# /b2g/gaia, since the gaia directory is packed into the APK as an assets/
|
||||
# directory. This relies on the serial nature of the libs tier recursion.
|
||||
'app',
|
||||
]
|
||||
|
@ -459,14 +459,14 @@ OMNIJAR_NAME := $(notdir $(OMNIJAR_NAME))
|
||||
# and the res/ directory is taken from the ap_ as part of the regular
|
||||
# packaging.
|
||||
|
||||
PKG_SUFFIX = .apk
|
||||
INNER_MAKE_PACKAGE = \
|
||||
$(if $(ALREADY_SZIPPED),,$(foreach lib,$(SZIP_LIBRARIES),host/bin/szip $(MOZ_SZIP_FLAGS) $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib) && )) \
|
||||
make -C $(GECKO_APP_AP_PATH) gecko-nodeps.ap_ && \
|
||||
cp $(GECKO_APP_AP_PATH)/gecko-nodeps.ap_ $(_ABS_DIST)/gecko.ap_ && \
|
||||
( (test ! -f $(GECKO_APP_AP_PATH)/R.txt && echo "*** Warning: The R.txt that is being packaged might not agree with the R.txt that was built. This is normal during l10n repacks.") || \
|
||||
diff $(GECKO_APP_AP_PATH)/R.txt $(GECKO_APP_AP_PATH)/gecko-nodeps/R.txt >/dev/null || \
|
||||
(echo "*** Error: The R.txt that was built and the R.txt that is being packaged are not the same. Rebuild mobile/android/base and re-package." && exit 1)) && \
|
||||
PKG_SUFFIX = .apk
|
||||
|
||||
INNER_SZIP_LIBRARIES = \
|
||||
$(if $(ALREADY_SZIPPED),,$(foreach lib,$(SZIP_LIBRARIES),host/bin/szip $(MOZ_SZIP_FLAGS) $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/$(lib) && )) true
|
||||
|
||||
# Insert $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/classes.dex into
|
||||
# $(_ABS_DIST)/gecko.ap_, producing $(_ABS_DIST)/gecko.apk.
|
||||
INNER_MAKE_APK = \
|
||||
( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \
|
||||
unzip -o $(_ABS_DIST)/gecko.ap_ && \
|
||||
rm $(_ABS_DIST)/gecko.ap_ && \
|
||||
@ -481,11 +481,30 @@ INNER_MAKE_PACKAGE = \
|
||||
$(ZIP) -j0 $(_ABS_DIST)/gecko.apk $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/classes.dex && \
|
||||
cp $(_ABS_DIST)/gecko.apk $(_ABS_DIST)/gecko-unsigned-unaligned.apk && \
|
||||
$(RELEASE_JARSIGNER) $(_ABS_DIST)/gecko.apk && \
|
||||
$(ZIPALIGN) -f -v 4 $(_ABS_DIST)/gecko.apk $(PACKAGE) && \
|
||||
$(ZIPALIGN) -f -v 4 $(_ABS_DIST)/gecko.apk $(PACKAGE)
|
||||
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
||||
INNER_MAKE_PACKAGE = \
|
||||
$(INNER_SZIP_LIBRARIES) && \
|
||||
make -C $(GECKO_APP_AP_PATH) gecko-nodeps.ap_ && \
|
||||
cp $(GECKO_APP_AP_PATH)/gecko-nodeps.ap_ $(_ABS_DIST)/gecko.ap_ && \
|
||||
( (test ! -f $(GECKO_APP_AP_PATH)/R.txt && echo "*** Warning: The R.txt that is being packaged might not agree with the R.txt that was built. This is normal during l10n repacks.") || \
|
||||
diff $(GECKO_APP_AP_PATH)/R.txt $(GECKO_APP_AP_PATH)/gecko-nodeps/R.txt >/dev/null || \
|
||||
(echo "*** Error: The R.txt that was built and the R.txt that is being packaged are not the same. Rebuild mobile/android/base and re-package." && exit 1)) && \
|
||||
$(INNER_MAKE_APK) && \
|
||||
$(INNER_ROBOCOP_PACKAGE) && \
|
||||
$(INNER_MAKE_GECKOLIBS_AAR) && \
|
||||
$(INNER_MAKE_GECKOVIEW_LIBRARY) && \
|
||||
$(INNER_MAKE_GECKOVIEW_EXAMPLE)
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android/b2gdroid)
|
||||
INNER_MAKE_PACKAGE = \
|
||||
$(INNER_SZIP_LIBRARIES) && \
|
||||
cp $(abspath $(DEPTH)/mobile/android/b2gdroid/app)/classes.dex $(_ABS_DIST)/classes.dex && \
|
||||
cp $(abspath $(DEPTH)/mobile/android/b2gdroid/app)/b2gdroid-unsigned-unaligned.apk $(_ABS_DIST)/gecko.ap_ && \
|
||||
$(INNER_MAKE_APK)
|
||||
endif
|
||||
|
||||
# Language repacks root the resources contained in assets/omni.ja
|
||||
# under assets/, but the repacks expect them to be rooted at /.
|
||||
|
Loading…
Reference in New Issue
Block a user