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

Side by Side Diff: build/android/envsetup.sh

Issue 10694048: Refactor and rename install-build-deps-android-sdk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Sets up environment for building Chromium on Android. Only Android NDK, 7 # Sets up environment for building Chromium on Android. Only Android NDK,
8 # Revision 6b on Linux or Mac is offically supported. 8 # Revision 6b on Linux or Mac is offically supported.
9 # 9 #
10 # To run this script, the system environment ANDROID_NDK_ROOT must be set 10 # To run this script, the system environment ANDROID_NDK_ROOT must be set
11 # to Android NDK's root path. 11 # to Android NDK's root path.
12 # 12 #
13 # TODO(michaelbai): Develop a standard for NDK/SDK integration. 13 # TODO(michaelbai): Develop a standard for NDK/SDK integration.
14 # 14 #
15 # If current path isn't the Chrome's src directory, CHROME_SRC must be set 15 # If current path isn't the Chrome's src directory, CHROME_SRC must be set
16 # to the Chrome's src directory. 16 # to the Chrome's src directory.
17 17
18 if [ ! -d "${ANDROID_NDK_ROOT}" ]; then 18 if [[ -z $ANDROID_SDK_ROOT ]]; then
19 echo "ANDROID_NDK_ROOT must be set to the path of Android NDK, Revision 6b." \ 19 export ANDROID_SDK_ROOT="/usr/local/google/android-sdk-linux"
20 >& 2 20 echo "ANDROID_SDK_ROOT null, setting to: $ANDROID_SDK_ROOT" >&2
21 echo "which could be installed by" >& 2 21 fi
22 echo "<chromium_tree>/src/build/install-build-deps-android-sdk.sh" >& 2 22
23 if [[ -z $ANDROID_NDK_ROOT ]]; then
24 export ANDROID_NDK_ROOT="/usr/local/google/android-ndk-r7"
25 echo "ANDROID_NDK_ROOT null, setting to: $ANDROID_NDK_ROOT" >&2
26 fi
27
28 if [[ ! -d "$ANDROID_NDK_ROOT" || ! -d "$ANDROID_SDK_ROOT" ]]; then
29 echo "SDK / NDK paths not set or not installed" >&2
30 echo "To install: <chromium src root>/build/install-android-sdk-ndk.sh"
23 return 1 31 return 1
24 fi 32 fi
25 33
26 if [ ! -d "${ANDROID_SDK_ROOT}" ]; then
27 echo "ANDROID_SDK_ROOT must be set to the path of Android SDK, Android 3.2." \
28 >& 2
29 echo "which could be installed by" >& 2
30 echo "<chromium_tree>/src/build/install-build-deps-android-sdk.sh" >& 2
31 return 1
32 fi
33
34 host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/') 34 host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
35 35
36 case "${host_os}" in 36 case "${host_os}" in
37 "linux") 37 "linux")
38 toolchain_dir="linux-x86" 38 toolchain_dir="linux-x86"
39 ;; 39 ;;
40 "mac") 40 "mac")
41 toolchain_dir="darwin-x86" 41 toolchain_dir="darwin-x86"
42 ;; 42 ;;
43 *) 43 *)
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 export GYP_DEFINES="${DEFINES}" 154 export GYP_DEFINES="${DEFINES}"
155 155
156 # Use the "android" flavor of the Makefile generator for both Linux and OS X. 156 # Use the "android" flavor of the Makefile generator for both Linux and OS X.
157 export GYP_GENERATORS="make-android" 157 export GYP_GENERATORS="make-android"
158 158
159 # Use our All target as the default 159 # Use our All target as the default
160 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" 160 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All"
161 161
162 # We want to use our version of "all" targets. 162 # We want to use our version of "all" targets.
163 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" 163 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698