Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: platform_tools/android/bin/android_setup.sh

Issue 14803004: Check for third_party deps before compiling on android (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function exportVar { 1 function exportVar {
2 NAME=$1 2 NAME=$1
3 VALUE=$2 3 VALUE=$2
4 echo export $NAME=\"$VALUE\" 4 echo export $NAME=\"$VALUE\"
5 export $NAME="$VALUE" 5 export $NAME="$VALUE"
6 } 6 }
7 7
8 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 8 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9 9
10 # A valid Android SDK installation is required to build the sample app. 10 # A valid Android SDK installation is required to build the sample app.
11 if [ -z "$ANDROID_SDK_ROOT" ]; then 11 if [ -z "$ANDROID_SDK_ROOT" ]; then
12 ANDROID_TOOL=$(which android 2>/dev/null) 12 ANDROID_TOOL=$(which android 2>/dev/null)
13 if [ -z "$ANDROID_TOOL" ]; then 13 if [ -z "$ANDROID_TOOL" ]; then
14 echo "ERROR: Please define ANDROID_SDK_ROOT in your environment to point" 14 echo "ERROR: Please define ANDROID_SDK_ROOT in your environment to point"
15 echo " to a valid Android SDK installation." 15 echo " to a valid Android SDK installation."
16 return 1 16 return 1
17 fi 17 fi
18 ANDROID_SDK_ROOT=$(cd $(dirname "$ANDROID_TOOL")/.. && pwd) 18 ANDROID_SDK_ROOT=$(cd $(dirname "$ANDROID_TOOL")/.. && pwd)
19 exportVar ANDROID_SDK_ROOT "$ANDROID_SDK_ROOT" 19 exportVar ANDROID_SDK_ROOT "$ANDROID_SDK_ROOT"
20 fi 20 fi
21 21
22 # ant is required to be installed on your system and in your PATH 22 # ant is required to be installed on your system and in your PATH
23 ant -version &> /dev/null 23 ant -version &> /dev/null
24 if [[ "$?" != "0" ]]; then 24 if [[ "$?" != "0" ]]; then
25 echo "ERROR: Unable to find ant. Please install it before proceeding." 25 echo "ERROR: Unable to find ant. Please install it before proceeding."
26 exit 1 26 exit 1
27 fi 27 fi
28 28
29 # check to see that gclient sync ran successfully
30 THIRD_PARTY_EXTERNAL_DIR=${SCRIPT_DIR}/../third_party/externals
31 if [ ! -d "$ANDROID_TOOLCHAIN" ]; then
32 echo ""
33 echo "ERROR: Unable to find the required third_party dependencies needed to build."
34 echo " To fix this add the following line to your .gclient file an d run 'gclient sync'"
35 echo " target_os = ['android']"
36 echo ""
37 exit 1;
38 fi
39
29 # determine the toolchain that we will be using 40 # determine the toolchain that we will be using
30 API_LEVEL=14 41 API_LEVEL=14
31 42
32 if [[ -z "$NDK_REV" ]]; 43 if [[ -z "$NDK_REV" ]];
33 then 44 then
34 NDK_REV="8d" 45 NDK_REV="8d"
35 fi 46 fi
36 47
37 if [[ -z "$ANDROID_ARCH" ]]; 48 if [[ -z "$ANDROID_ARCH" ]];
38 then 49 then
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 # Use the "android" flavor of the Makefile generator for both Linux and OS X. 191 # Use the "android" flavor of the Makefile generator for both Linux and OS X.
181 exportVar GYP_GENERATORS "make-android" 192 exportVar GYP_GENERATORS "make-android"
182 193
183 # Helper function so that when we run "make" to build for clank it exports 194 # Helper function so that when we run "make" to build for clank it exports
184 # the toolchain variables to make. 195 # the toolchain variables to make.
185 #make_android() { 196 #make_android() {
186 # CC="$CROSS_CC" CXX="$CROSS_CXX" LINK="$CROSS_LINK" \ 197 # CC="$CROSS_CC" CXX="$CROSS_CXX" LINK="$CROSS_LINK" \
187 # AR="$CROSS_AR" RANLIB="$CROSS_RANLIB" \ 198 # AR="$CROSS_AR" RANLIB="$CROSS_RANLIB" \
188 # command make $* 199 # command make $*
189 #} 200 #}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698