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

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

Issue 22873004: [Android] Allow more support for experimentation with SDK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 # 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 # environment ANDROID_NDK_ROOT must be set to Android NDK's root path. The 211 # environment ANDROID_NDK_ROOT must be set to Android NDK's root path. The
212 # ANDROID_SDK_ROOT only needs to be set to override the default SDK which is in 212 # ANDROID_SDK_ROOT only needs to be set to override the default SDK which is in
213 # the tree under $ROOT/src/third_party/android_tools/sdk. 213 # the tree under $ROOT/src/third_party/android_tools/sdk.
214 # To build Chromium for Android with NDK/SDK follow the steps below: 214 # To build Chromium for Android with NDK/SDK follow the steps below:
215 # > export ANDROID_NDK_ROOT=<android ndk root> 215 # > export ANDROID_NDK_ROOT=<android ndk root>
216 # > export ANDROID_SDK_ROOT=<android sdk root> # to override the default sdk 216 # > export ANDROID_SDK_ROOT=<android sdk root> # to override the default sdk
217 # > . build/android/envsetup.sh 217 # > . build/android/envsetup.sh
218 # > make 218 # > make
219 ################################################################################ 219 ################################################################################
220 sdk_build_init() { 220 sdk_build_init() {
221 export ANDROID_SDK_VERSION=18
222 export ANDROID_SDK_BUILD_TOOLS_VERSION=18.0.1
223 221
224 # If ANDROID_NDK_ROOT is set when envsetup is run, use the ndk pointed to by 222 # Allow the caller to override a few environment variables. If any of them is
225 # the environment variable. Otherwise, use the default ndk from the tree. 223 # unset, we default to a sane value that's known to work. This allows for
224 # experimentation with a custom SDK.
226 if [[ -z "${ANDROID_NDK_ROOT}" || ! -d "${ANDROID_NDK_ROOT}" ]]; then 225 if [[ -z "${ANDROID_NDK_ROOT}" || ! -d "${ANDROID_NDK_ROOT}" ]]; then
Isaac (away) 2013/08/13 02:19:54 How about we remove the -d check (checks the varia
227 export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/" 226 export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/"
228 fi 227 fi
229 228 if [[ -z "${ANDROID_SDK_VERSION}" ]]; then
Isaac (away) 2013/08/13 02:19:54 technically quotes aren't needed in a double brack
230 # If ANDROID_SDK_ROOT is set when envsetup is run, and if it has the 229 export ANDROID_SDK_VERSION=18
231 # right SDK-compatible directory layout, use the sdk pointed to by the 230 fi
232 # environment variable. Otherwise, use the default sdk from the tree.
233 local sdk_suffix=platforms/android-${ANDROID_SDK_VERSION} 231 local sdk_suffix=platforms/android-${ANDROID_SDK_VERSION}
234 if [[ -z "${ANDROID_SDK_ROOT}" || \ 232 if [[ -z "${ANDROID_SDK_ROOT}" || \
235 ! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then 233 ! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then
Isaac (away) 2013/08/13 02:19:54 ditto on -d here
Yaron 2013/08/13 02:24:46 I actually like this. It helped me catch an issue
236 export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/" 234 export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/"
237 fi 235 fi
236 if [[ -z "${ANDROID_SDK_BUILD_TOOLS_VERSION}" ]]; then
237 export ANDROID_SDK_BUILD_TOOLS_VERSION=18.0.1
238 fi
238 239
239 unset ANDROID_BUILD_TOP 240 unset ANDROID_BUILD_TOP
240 241
241 # Set default target. 242 # Set default target.
242 export TARGET_PRODUCT="${TARGET_PRODUCT:-trygon}" 243 export TARGET_PRODUCT="${TARGET_PRODUCT:-trygon}"
243 244
244 # Unset toolchain so that it can be set based on TARGET_PRODUCT. 245 # Unset toolchain so that it can be set based on TARGET_PRODUCT.
245 # This makes it easy to switch between architectures. 246 # This makes it easy to switch between architectures.
246 unset ANDROID_TOOLCHAIN 247 unset ANDROID_TOOLCHAIN
247 248
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 export GYP_DEFINES="${DEFINES}" 317 export GYP_DEFINES="${DEFINES}"
317 318
318 export GYP_GENERATORS="android" 319 export GYP_GENERATORS="android"
319 320
320 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" 321 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All"
321 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" 322 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1"
322 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" 323 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0"
323 324
324 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" 325 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp"
325 } 326 }
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698