OLD | NEW |
---|---|
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 |
(...skipping 29 matching lines...) Expand all Loading... | |
40 "mac") | 40 "mac") |
41 toolchain_dir="darwin-x86" | 41 toolchain_dir="darwin-x86" |
42 ;; | 42 ;; |
43 *) | 43 *) |
44 echo "Host platform ${host_os} is not supported" >& 2 | 44 echo "Host platform ${host_os} is not supported" >& 2 |
45 return 1 | 45 return 1 |
46 esac | 46 esac |
47 | 47 |
48 export ANDROID_TOOLCHAIN="${ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4 .4.3/prebuilt/${toolchain_dir}/bin/" | 48 export ANDROID_TOOLCHAIN="${ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4 .4.3/prebuilt/${toolchain_dir}/bin/" |
49 | 49 |
50 export ANDROID_SDK_VERSION="15" | |
Yaron
2012/02/29 16:55:14
I think we might need to define a few more environ
navabi
2012/02/29 18:23:52
It looks like we need to define at least JAVA_HOME
| |
51 | |
50 # Add Android SDK's platform-tools to system path. | 52 # Add Android SDK's platform-tools to system path. |
51 export PATH="${PATH}:${ANDROID_SDK_ROOT}/platform-tools/" | 53 export PATH="${PATH}:${ANDROID_SDK_ROOT}/platform-tools/" |
52 | 54 |
53 if [ ! -d "${ANDROID_TOOLCHAIN}" ]; then | 55 if [ ! -d "${ANDROID_TOOLCHAIN}" ]; then |
54 echo "Can not find Android toolchain in ${ANDROID_TOOLCHAIN}." >& 2 | 56 echo "Can not find Android toolchain in ${ANDROID_TOOLCHAIN}." >& 2 |
55 echo "The NDK version might be wrong." >& 2 | 57 echo "The NDK version might be wrong." >& 2 |
56 return 1 | 58 return 1 |
57 fi | 59 fi |
58 | 60 |
59 if [ -z "${CHROME_SRC}" ]; then | 61 if [ -z "${CHROME_SRC}" ]; then |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 export GYP_DEFINES="${DEFINES}" | 148 export GYP_DEFINES="${DEFINES}" |
147 | 149 |
148 # Use the "android" flavor of the Makefile generator for both Linux and OS X. | 150 # Use the "android" flavor of the Makefile generator for both Linux and OS X. |
149 export GYP_GENERATORS="make-android" | 151 export GYP_GENERATORS="make-android" |
150 | 152 |
151 # Use our All target as the default | 153 # Use our All target as the default |
152 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 154 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
153 | 155 |
154 # We want to use our version of "all" targets. | 156 # We want to use our version of "all" targets. |
155 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" | 157 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" |
OLD | NEW |