OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ############################################################################### | 2 ############################################################################### |
3 # Copyright 2015 Google Inc. | 3 # Copyright 2015 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 ############################################################################### | 7 ############################################################################### |
8 # | 8 # |
9 # android_setup.sh: Sets environment variables used by other Android scripts. | 9 # android_setup.sh: Sets environment variables used by other Android scripts. |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 elif [[ "$1" == "-t" ]]; then | 28 elif [[ "$1" == "-t" ]]; then |
29 BUILDTYPE=$2 | 29 BUILDTYPE=$2 |
30 shift | 30 shift |
31 elif [[ "$1" == "--debug" ]]; then | 31 elif [[ "$1" == "--debug" ]]; then |
32 BUILDTYPE=Debug | 32 BUILDTYPE=Debug |
33 elif [[ "$1" == "--release" ]]; then | 33 elif [[ "$1" == "--release" ]]; then |
34 BUILDTYPE=Release | 34 BUILDTYPE=Release |
35 elif [[ "$1" == "--gcc" ]]; then | 35 elif [[ "$1" == "--gcc" ]]; then |
36 USE_CLANG="false" | 36 USE_CLANG="false" |
37 elif [[ "$1" == "--clang" ]]; then | 37 elif [[ "$1" == "--clang" ]]; then |
38 USE_CLANG="true" | 38 USE_CLANG="true" |
39 elif [[ "$1" == "--logcat" ]]; then | 39 elif [[ "$1" == "--logcat" ]]; then |
40 LOGCAT=1 | 40 LOGCAT=1 |
41 elif [[ "$1" == "--verbose" ]]; then | 41 elif [[ "$1" == "--verbose" ]]; then |
42 VERBOSE="true" | 42 VERBOSE="true" |
43 elif [[ "$1" == "--vulkan" ]]; then | 43 elif [[ "$1" == "--vulkan" ]]; then |
44 SKIA_VULKAN="true" | 44 SKIA_VULKAN="true" |
45 else | 45 else |
46 APP_ARGS=("${APP_ARGS[@]}" "${1}") | 46 APP_ARGS=("${APP_ARGS[@]}" "${1}") |
47 fi | 47 fi |
48 shift | 48 shift |
49 done | 49 done |
50 | 50 |
51 if [ "$USE_CLANG" == "true" ]; then | 51 if [ "$USE_CLANG" == "true" ]; then |
52 export GYP_DEFINES="skia_clang_build=1 $GYP_DEFINES" | 52 export GYP_DEFINES="skia_clang_build=1 $GYP_DEFINES" |
53 fi | 53 fi |
54 | 54 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 verbose "no target device (-d), using ${TARGET_DEVICE}" | 119 verbose "no target device (-d), using ${TARGET_DEVICE}" |
120 fi | 120 fi |
121 fi | 121 fi |
122 | 122 |
123 case $TARGET_DEVICE in | 123 case $TARGET_DEVICE in |
124 arm) | 124 arm) |
125 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0" | 125 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0" |
126 ANDROID_ARCH="arm" | 126 ANDROID_ARCH="arm" |
127 ;; | 127 ;; |
128 arm_v7 | xoom) | 128 arm_v7 | xoom) |
129 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7" | 129 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_version=7" |
130 ANDROID_ARCH="arm" | 130 ANDROID_ARCH="arm" |
131 ;; | 131 ;; |
132 arm_v7_neon | nexus_4 | nexus_5 | nexus_6 | nexus_7 | nexus_10) | 132 arm_v7_neon | nexus_4 | nexus_5 | nexus_6 | nexus_7 | nexus_10) |
133 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7" | 133 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7" |
134 ANDROID_ARCH="arm" | 134 ANDROID_ARCH="arm" |
135 ;; | 135 ;; |
136 arm64 | nexus_9) | 136 arm64 | nexus_9) |
137 DEFINES="${DEFINES} skia_arch_type=arm64 arm_version=8" | 137 DEFINES="${DEFINES} skia_arch_type=arm64 arm_version=8" |
138 ANDROID_ARCH="arm64" | 138 ANDROID_ARCH="arm64" |
139 ;; | 139 ;; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 282 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
283 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 283 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
284 fi | 284 fi |
285 fi | 285 fi |
286 | 286 |
287 # turn error checking back on | 287 # turn error checking back on |
288 set -e | 288 set -e |
289 } | 289 } |
290 | 290 |
291 setup_device "${DEVICE_ID}" | 291 setup_device "${DEVICE_ID}" |
OLD | NEW |