Chromium Code Reviews| 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 # Defines functions for envsetup.sh which sets up environment for building | 7 # Defines functions for envsetup.sh which sets up environment for building |
| 8 # Chromium on Android. The build can be either use the Android NDK/SDK or | 8 # Chromium on Android. The build can be either use the Android NDK/SDK or |
| 9 # android source tree. Each has a unique init function which calls functions | 9 # android source tree. Each has a unique init function which calls functions |
| 10 # prefixed with "common_" that is common for both environment setups. | 10 # prefixed with "common_" that is common for both environment setups. |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 221 sdk_build_init() { | 221 sdk_build_init() { |
| 222 | 222 |
| 223 # Allow the caller to override a few environment variables. If any of them is | 223 # Allow the caller to override a few environment variables. If any of them is |
| 224 # unset, we default to a sane value that's known to work. This allows for | 224 # unset, we default to a sane value that's known to work. This allows for |
| 225 # experimentation with a custom SDK. | 225 # experimentation with a custom SDK. |
| 226 local sdk_defines="" | 226 local sdk_defines="" |
| 227 if [[ -z "${ANDROID_NDK_ROOT}" || ! -d "${ANDROID_NDK_ROOT}" ]]; then | 227 if [[ -z "${ANDROID_NDK_ROOT}" || ! -d "${ANDROID_NDK_ROOT}" ]]; then |
| 228 export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/" | 228 export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/" |
| 229 fi | 229 fi |
| 230 if [[ -z "${ANDROID_SDK_VERSION}" ]]; then | 230 if [[ -z "${ANDROID_SDK_VERSION}" ]]; then |
| 231 export ANDROID_SDK_VERSION=18 | 231 export ANDROID_SDK_VERSION=19 |
| 232 else | 232 else |
| 233 sdk_defines+=" android_sdk_version=${ANDROID_SDK_VERSION}" | 233 sdk_defines+=" android_sdk_version=${ANDROID_SDK_VERSION}" |
| 234 fi | 234 fi |
| 235 local sdk_suffix=platforms/android-${ANDROID_SDK_VERSION} | 235 local sdk_suffix=platforms/android-${ANDROID_SDK_VERSION} |
| 236 if [[ -z "${ANDROID_SDK_ROOT}" || \ | 236 if [[ -z "${ANDROID_SDK_ROOT}" || \ |
| 237 ! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then | 237 ! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then |
| 238 export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/" | 238 export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/" |
| 239 else | 239 else |
| 240 sdk_defines+=" android_sdk_root=${ANDROID_SDK_ROOT}" | 240 sdk_defines+=" android_sdk_root=${ANDROID_SDK_ROOT}" |
| 241 fi | 241 fi |
| 242 if [[ -z "${ANDROID_SDK_BUILD_TOOLS_VERSION}" ]]; then | 242 if [[ -z "${ANDROID_SDK_BUILD_TOOLS_VERSION}" ]]; then |
| 243 export ANDROID_SDK_BUILD_TOOLS_VERSION=18.0.1 | 243 export ANDROID_SDK_BUILD_TOOLS_VERSION=19.0.0 |
| 244 fi | 244 fi |
| 245 | 245 |
| 246 unset ANDROID_BUILD_TOP | 246 unset ANDROID_BUILD_TOP |
| 247 | 247 |
| 248 # Set default target. | 248 # Set default target. |
| 249 export TARGET_PRODUCT="${TARGET_PRODUCT:-trygon}" | 249 export TARGET_PRODUCT="${TARGET_PRODUCT:-trygon}" |
| 250 | 250 |
| 251 # Unset toolchain so that it can be set based on TARGET_PRODUCT. | 251 # Unset toolchain so that it can be set based on TARGET_PRODUCT. |
| 252 # This makes it easy to switch between architectures. | 252 # This makes it easy to switch between architectures. |
| 253 unset ANDROID_TOOLCHAIN | 253 unset ANDROID_TOOLCHAIN |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 272 ${ANDROID_SDK_BUILD_TOOLS_VERSION}" | 272 ${ANDROID_SDK_BUILD_TOOLS_VERSION}" |
| 273 } | 273 } |
| 274 | 274 |
| 275 ################################################################################ | 275 ################################################################################ |
| 276 # To build WebView, we use the Android build system and build inside an Android | 276 # To build WebView, we use the Android build system and build inside an Android |
| 277 # source tree. This method is called from non_sdk_build_init() and adds to the | 277 # source tree. This method is called from non_sdk_build_init() and adds to the |
| 278 # settings specified there. | 278 # settings specified there. |
| 279 ############################################################################# | 279 ############################################################################# |
| 280 webview_build_init() { | 280 webview_build_init() { |
| 281 # Use the latest API in the AOSP prebuilts directory (change with AOSP roll). | 281 # Use the latest API in the AOSP prebuilts directory (change with AOSP roll). |
| 282 export ANDROID_SDK_VERSION=18 | 282 export ANDROID_SDK_VERSION=19 |
|
navabi
2013/11/14 00:35:20
This is one potential reason we may need 18. When
| |
| 283 | 283 |
| 284 # For the WebView build we always use the NDK and SDK in the Android tree, | 284 # For the WebView build we always use the NDK and SDK in the Android tree, |
| 285 # and we don't touch ANDROID_TOOLCHAIN which is already set by Android. | 285 # and we don't touch ANDROID_TOOLCHAIN which is already set by Android. |
| 286 export ANDROID_NDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/ndk/8 | 286 export ANDROID_NDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/ndk/8 |
| 287 export ANDROID_SDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/sdk/\ | 287 export ANDROID_SDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/sdk/\ |
| 288 ${ANDROID_SDK_VERSION} | 288 ${ANDROID_SDK_VERSION} |
| 289 | 289 |
| 290 common_vars_defines | 290 common_vars_defines |
| 291 | 291 |
| 292 # We need to supply SDK paths relative to the top of the Android tree to make | 292 # We need to supply SDK paths relative to the top of the Android tree to make |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 export GYP_DEFINES="${DEFINES}" | 326 export GYP_DEFINES="${DEFINES}" |
| 327 | 327 |
| 328 export GYP_GENERATORS="android" | 328 export GYP_GENERATORS="android" |
| 329 | 329 |
| 330 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 330 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 331 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 331 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 332 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 332 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
| 333 | 333 |
| 334 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 334 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 335 } | 335 } |
| OLD | NEW |