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

Side by Side Diff: platform_tools/android/bin/android_setup.sh

Issue 24833002: Add android_ninja, like android_make for ninja. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: still bad Created 7 years, 2 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
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_setup.sh: Sets environment variables used by other Android scripts. 3 # android_setup.sh: Sets environment variables used by other Android scripts.
4 4
5 # Parse the arguments for a DEVICE_ID. 5 # Parse the arguments for a DEVICE_ID.
6 DEVICE_ID="" 6 DEVICE_ID=""
7 DEVICE_SERIAL="" 7 DEVICE_SERIAL=""
8 while (( "$#" )); do 8 while (( "$#" )); do
9 if [[ $(echo "$1" | grep "^-d$") != "" ]]; 9 if [[ $(echo "$1" | grep "^-d$") != "" ]];
10 then 10 then
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 DEFINES="${DEFINES} skia_shared_lib=1" 158 DEFINES="${DEFINES} skia_shared_lib=1"
159 159
160 # Setup the build variation depending on the target device 160 # Setup the build variation depending on the target device
161 TARGET_DEVICE="$1" 161 TARGET_DEVICE="$1"
162 162
163 if [ -z "$TARGET_DEVICE" ]; then 163 if [ -z "$TARGET_DEVICE" ]; then
164 if [ -f .android_config ]; then 164 if [ -f .android_config ]; then
165 TARGET_DEVICE=$(cat .android_config) 165 TARGET_DEVICE=$(cat .android_config)
166 echo "INFO: no target device was specified so using the device (${TARGET_D EVICE}) from the most recent build" 166 echo "INFO: no target device was specified so using the device (${TARGET_D EVICE}) from the most recent build"
167 else 167 else
168 TARGET_DEVICE="arm_v7_thumb" 168 TARGET_DEVICE="arm_v7_thumb"
169 echo "INFO: no target device type was specified so using the default '${TA RGET_DEVICE}'" 169 echo "INFO: no target device type was specified so using the default '${TA RGET_DEVICE}'"
170 fi 170 fi
171 fi 171 fi
172 172
173 case $TARGET_DEVICE in 173 case $TARGET_DEVICE in
174 nexus_s) 174 nexus_s)
175 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb= 1" 175 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb= 1"
176 DEFINES="${DEFINES} skia_texture_cache_mb_limit=24" 176 DEFINES="${DEFINES} skia_texture_cache_mb_limit=24"
177 ANDROID_ARCH="arm" 177 ANDROID_ARCH="arm"
178 ;; 178 ;;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 echo "The build is targeting the device: $TARGET_DEVICE" 230 echo "The build is targeting the device: $TARGET_DEVICE"
231 export DEVICE_ID="$TARGET_DEVICE" 231 export DEVICE_ID="$TARGET_DEVICE"
232 232
233 # Set up the toolchain. 233 # Set up the toolchain.
234 setup_toolchain 234 setup_toolchain
235 if [[ "$?" != "0" ]]; then 235 if [[ "$?" != "0" ]]; then
236 return 1 236 return 1
237 fi 237 fi
238 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" 238 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}"
239 239
240 # Use the "android" flavor of the Makefile generator for both Linux and OS X.
241 exportVar GYP_GENERATORS "make-android"
242 exportVar GYP_DEFINES "$DEFINES" 240 exportVar GYP_DEFINES "$DEFINES"
243 exportVar SKIA_OUT "out/config/android-${TARGET_DEVICE}" 241 exportVar SKIA_OUT "out/config/android-${TARGET_DEVICE}"
244 } 242 }
245 243
246 # adb_pull_if_needed(android_src, host_dst) 244 # adb_pull_if_needed(android_src, host_dst)
247 adb_pull_if_needed() { 245 adb_pull_if_needed() {
248 246
249 # get adb location 247 # get adb location
250 source $SCRIPT_DIR/utils/setup_adb.sh 248 source $SCRIPT_DIR/utils/setup_adb.sh
251 249
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 else 317 else
320 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST 318 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST
321 fi 319 fi
322 } 320 }
323 321
324 # Set up the device. 322 # Set up the device.
325 setup_device "${DEVICE_ID}" 323 setup_device "${DEVICE_ID}"
326 if [[ "$?" != "0" ]]; then 324 if [[ "$?" != "0" ]]; then
327 exit 1 325 exit 1
328 fi 326 fi
OLDNEW
« platform_tools/android/bin/android_ninja ('K') | « platform_tools/android/bin/android_ninja ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698