mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 874132 - Part 1: Handle SDK layout differences in the Android r22 SDK. r=nalexander
Author: Nathan Froyd <froydnj@gmail.com> --HG-- extra : rebase_source : 614b386efc0a2b13c6570c99d09d6ec99146c3e1
This commit is contained in:
parent
fdd5d0b966
commit
9243c80784
@ -305,6 +305,19 @@ case "$target" in
|
||||
if test ! -d "$android_platform_tools" ; then
|
||||
android_platform_tools="$android_sdk"/tools # SDK Tools < r8
|
||||
fi
|
||||
# The build tools got moved around to different directories in
|
||||
# SDK Tools r22. Try to locate them.
|
||||
android_build_tools=""
|
||||
for suffix in 17.0.0 android-4.2.2; do
|
||||
tools_directory="$android_sdk/../../build-tools/$suffix"
|
||||
if test -d "$tools_directory" ; then
|
||||
android_build_tools="$tools_directory"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$android_build_tools" ; then
|
||||
android_build_tools="$android_platform_tools" # SDK Tools < r22
|
||||
fi
|
||||
ANDROID_SDK="${android_sdk}"
|
||||
if test -e "${android_sdk}/../../extras/android/compatibility/v4/android-support-v4.jar" ; then
|
||||
ANDROID_COMPAT_LIB="${android_sdk}/../../extras/android/compatibility/v4/android-support-v4.jar"
|
||||
@ -312,12 +325,14 @@ case "$target" in
|
||||
ANDROID_COMPAT_LIB="${android_sdk}/../../extras/android/support/v4/android-support-v4.jar";
|
||||
fi
|
||||
ANDROID_PLATFORM_TOOLS="${android_platform_tools}"
|
||||
ANDROID_BUILD_TOOLS="${android_build_tools}"
|
||||
AC_SUBST(ANDROID_SDK)
|
||||
AC_SUBST(ANDROID_COMPAT_LIB)
|
||||
if ! test -e $ANDROID_COMPAT_LIB ; then
|
||||
AC_MSG_ERROR([You must download the Android support library when targeting Android. Run the Android SDK tool and install Android Support Library under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_COMPAT_LIB)])
|
||||
fi
|
||||
AC_SUBST(ANDROID_PLATFORM_TOOLS)
|
||||
AC_SUBST(ANDROID_BUILD_TOOLS)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -12,8 +12,8 @@ ifndef JAVA_CLASSPATH
|
||||
$(error JAVA_CLASSPATH must be defined before including android-common.mk)
|
||||
endif
|
||||
|
||||
DX=$(ANDROID_PLATFORM_TOOLS)/dx
|
||||
AAPT=$(ANDROID_PLATFORM_TOOLS)/aapt
|
||||
DX=$(ANDROID_BUILD_TOOLS)/dx
|
||||
AAPT=$(ANDROID_BUILD_TOOLS)/aapt
|
||||
APKBUILDER=$(ANDROID_SDK)/../../tools/apkbuilder
|
||||
ZIPALIGN=$(ANDROID_SDK)/../../tools/zipalign
|
||||
|
||||
|
@ -305,6 +305,19 @@ case "$target" in
|
||||
if test ! -d "$android_platform_tools" ; then
|
||||
android_platform_tools="$android_sdk"/tools # SDK Tools < r8
|
||||
fi
|
||||
# The build tools got moved around to different directories in
|
||||
# SDK Tools r22. Try to locate them.
|
||||
android_build_tools=""
|
||||
for suffix in 17.0.0 android-4.2.2; do
|
||||
tools_directory="$android_sdk/../../build-tools/$suffix"
|
||||
if test -d "$tools_directory" ; then
|
||||
android_build_tools="$tools_directory"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$android_build_tools" ; then
|
||||
android_build_tools="$android_platform_tools" # SDK Tools < r22
|
||||
fi
|
||||
ANDROID_SDK="${android_sdk}"
|
||||
if test -e "${android_sdk}/../../extras/android/compatibility/v4/android-support-v4.jar" ; then
|
||||
ANDROID_COMPAT_LIB="${android_sdk}/../../extras/android/compatibility/v4/android-support-v4.jar"
|
||||
@ -312,12 +325,14 @@ case "$target" in
|
||||
ANDROID_COMPAT_LIB="${android_sdk}/../../extras/android/support/v4/android-support-v4.jar";
|
||||
fi
|
||||
ANDROID_PLATFORM_TOOLS="${android_platform_tools}"
|
||||
ANDROID_BUILD_TOOLS="${android_build_tools}"
|
||||
AC_SUBST(ANDROID_SDK)
|
||||
AC_SUBST(ANDROID_COMPAT_LIB)
|
||||
if ! test -e $ANDROID_COMPAT_LIB ; then
|
||||
AC_MSG_ERROR([You must download the Android support library when targeting Android. Run the Android SDK tool and install Android Support Library under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_COMPAT_LIB)])
|
||||
fi
|
||||
AC_SUBST(ANDROID_PLATFORM_TOOLS)
|
||||
AC_SUBST(ANDROID_BUILD_TOOLS)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user