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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 # Updates the SDK to latest version firstly. | 119 # Updates the SDK to latest version firstly. |
120 "${ANDROID_SDK_ROOT}"/tools/android update sdk ${update_flag} --no-ui \ | 120 "${ANDROID_SDK_ROOT}"/tools/android update sdk ${update_flag} --no-ui \ |
121 --filter platform-tool,tool,system-image,${SDK_TARGET_ID} | 121 --filter platform-tool,tool,system-image,${SDK_TARGET_ID} |
122 fi | 122 fi |
123 | 123 |
124 # Create a Android Virtual Device named 'buildbot' with default hardware | 124 # Create a Android Virtual Device named 'buildbot' with default hardware |
125 # configuration and override the existing one, since there is no easy way to | 125 # configuration and override the existing one, since there is no easy way to |
126 # check whether current AVD has correct configuration and it takes almost no | 126 # check whether current AVD has correct configuration and it takes almost no |
127 # time to create a new one. Create one ARM AVD and one x86 AVD. | 127 # time to create a new one. Create one ARM AVD and one x86 AVD. |
128 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_armeabi \ | 128 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_armeabi \ |
129 --abi armeabi-v7a --target ${SDK_TARGET_ID} --force <<< "no" | 129 --abi armeabi-v7a --target ${SDK_TARGET_ID} -c 64M --force <<< "no" |
130 | 130 |
131 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_x86 \ | 131 "${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_x86 \ |
132 --abi x86 --target ${SDK_TARGET_ID} --force <<< "no" | 132 --abi x86 --target ${SDK_TARGET_ID} -c 64M --force <<< "no" |
133 | 133 |
134 # Install Android NDK if it doesn't exist. | 134 # Install Android NDK if it doesn't exist. |
135 if [[ ! -d "${ANDROID_NDK_ROOT}" ]]; then | 135 if [[ ! -d "${ANDROID_NDK_ROOT}" ]]; then |
136 echo 'Install ANDROID NDK ...' | 136 echo 'Install ANDROID NDK ...' |
137 (install_dev_kit "${NDK_FILE_NAME}" "${NDK_DOWNLOAD_URL}" "${NDK_MD5SUM}" \ | 137 (install_dev_kit "${NDK_FILE_NAME}" "${NDK_DOWNLOAD_URL}" "${NDK_MD5SUM}" \ |
138 $(dirname "${ANDROID_NDK_ROOT}")) | 138 $(dirname "${ANDROID_NDK_ROOT}")) |
139 fi | 139 fi |
140 | 140 |
141 # Install the 64-bit linker if needed. | 141 # Install the 64-bit linker if needed. |
142 ROOT=$(cd "$(dirname $0)/.."; pwd) | 142 ROOT=$(cd "$(dirname $0)/.."; pwd) |
(...skipping 22 matching lines...) Expand all Loading... |
165 if [[ ! -f "$linker_dirname/$NEW_LINKER" ]]; then | 165 if [[ ! -f "$linker_dirname/$NEW_LINKER" ]]; then |
166 echo "Could not copy linker" | 166 echo "Could not copy linker" |
167 exit 1 | 167 exit 1 |
168 fi | 168 fi |
169 fi | 169 fi |
170 fi | 170 fi |
171 } | 171 } |
172 | 172 |
173 replace_linker $LINKER_DIRNAME_1 $LINKER_BASENAME_1 | 173 replace_linker $LINKER_DIRNAME_1 $LINKER_BASENAME_1 |
174 replace_linker $LINKER_DIRNAME_2 $LINKER_BASENAME_2 | 174 replace_linker $LINKER_DIRNAME_2 $LINKER_BASENAME_2 |
OLD | NEW |