OLD | NEW |
1 #!/bin/bash -x | 1 #!/bin/bash -x |
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 set -e | 7 set -e |
8 | 8 |
9 # The script is to install Android SDK, NDK for build chromium on Android, and | 9 # The script is to install Android SDK, NDK for build chromium on Android, and |
10 # doesn't need to run as root. | 10 # doesn't need to run as root. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 fi | 122 fi |
123 # Updates the SDK to latest version firstly. | 123 # Updates the SDK to latest version firstly. |
124 "${ANDROID_SDK_ROOT}"/tools/android update sdk ${update_flag} --no-ui \ | 124 "${ANDROID_SDK_ROOT}"/tools/android update sdk ${update_flag} --no-ui \ |
125 --filter platform-tool,tool,system-image,${SDK_TARGET_ID} | 125 --filter platform-tool,tool,system-image,${SDK_TARGET_ID} |
126 fi | 126 fi |
127 | 127 |
128 # Create a Android Virtual Device named 'buildbot' with default hardware | 128 # Create a Android Virtual Device named 'buildbot' with default hardware |
129 # configuration and override the existing one, since there is no easy way to | 129 # configuration and override the existing one, since there is no easy way to |
130 # check whether current AVD has correct configuration and it takes almost no | 130 # check whether current AVD has correct configuration and it takes almost no |
131 # time to create a new one. Create one ARM AVD and one x86 AVD. | 131 # time to create a new one. Create one ARM AVD and one x86 AVD. |
| 132 export ANDROID_SDK_HOME=${ANDROID_SDK_ROOT} |
132 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_armeabi \ | 133 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_armeabi \ |
133 --abi armeabi-v7a --target ${SDK_TARGET_ID} -c 64M --force <<< "no" | 134 --abi armeabi-v7a --target ${SDK_TARGET_ID} -c 64M --force <<< "no" |
134 | 135 |
135 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_x86 \ | 136 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_x86 \ |
136 --abi x86 --target ${SDK_TARGET_ID} -c 64M --force <<< "no" | 137 --abi x86 --target ${SDK_TARGET_ID} -c 64M --force <<< "no" |
137 | 138 |
138 # Install Android NDK if it doesn't exist. | 139 # Install Android NDK if it doesn't exist. |
139 if [[ ! -d "${ANDROID_NDK_ROOT}" ]]; then | 140 if [[ ! -d "${ANDROID_NDK_ROOT}" ]]; then |
140 echo 'Install ANDROID NDK ...' | 141 echo 'Install ANDROID NDK ...' |
141 (install_dev_kit "${NDK_FILE_NAME}" "${NDK_DOWNLOAD_URL}" "${NDK_MD5SUM}" \ | 142 (install_dev_kit "${NDK_FILE_NAME}" "${NDK_DOWNLOAD_URL}" "${NDK_MD5SUM}" \ |
(...skipping 27 matching lines...) Expand all Loading... |
169 if [[ ! -f "$linker_dirname/$NEW_LINKER" ]]; then | 170 if [[ ! -f "$linker_dirname/$NEW_LINKER" ]]; then |
170 echo "Could not copy linker" | 171 echo "Could not copy linker" |
171 exit 1 | 172 exit 1 |
172 fi | 173 fi |
173 fi | 174 fi |
174 fi | 175 fi |
175 } | 176 } |
176 | 177 |
177 replace_linker $LINKER_DIRNAME_1 $LINKER_BASENAME_1 | 178 replace_linker $LINKER_DIRNAME_1 $LINKER_BASENAME_1 |
178 replace_linker $LINKER_DIRNAME_2 $LINKER_BASENAME_2 | 179 replace_linker $LINKER_DIRNAME_2 $LINKER_BASENAME_2 |
OLD | NEW |