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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 fi | 90 fi |
91 | 91 |
92 # Setup the build variation depending on the target device | 92 # Setup the build variation depending on the target device |
93 TARGET_DEVICE="$1" | 93 TARGET_DEVICE="$1" |
94 | 94 |
95 if [ -z "$TARGET_DEVICE" ]; then | 95 if [ -z "$TARGET_DEVICE" ]; then |
96 if [ -f .android_config ]; then | 96 if [ -f .android_config ]; then |
97 TARGET_DEVICE=$(cat .android_config) | 97 TARGET_DEVICE=$(cat .android_config) |
98 verbose "no target device (-d), using ${TARGET_DEVICE} from most recent bu
ild" | 98 verbose "no target device (-d), using ${TARGET_DEVICE} from most recent bu
ild" |
99 else | 99 else |
100 TARGET_DEVICE="arm_v7" | 100 TARGET_DEVICE="arm_v7_neon" |
101 verbose "no target device (-d), using ${TARGET_DEVICE}" | 101 verbose "no target device (-d), using ${TARGET_DEVICE}" |
102 fi | 102 fi |
103 fi | 103 fi |
104 | 104 |
105 case $TARGET_DEVICE in | 105 case $TARGET_DEVICE in |
106 arm) | 106 arm) |
107 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0" | 107 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0" |
108 ANDROID_ARCH="arm" | 108 ANDROID_ARCH="arm" |
109 ;; | 109 ;; |
110 arm_v7 | nexus_4 | nexus_5 | nexus_6 | nexus_7 | nexus_10 | xoom) | 110 arm_v7 | xoom) |
111 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7" | 111 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7" |
112 ANDROID_ARCH="arm" | 112 ANDROID_ARCH="arm" |
113 ;; | 113 ;; |
114 arm_v7_neon) | 114 arm_v7_neon | nexus_4 | nexus_5 | nexus_6 | nexus_7 | nexus_10) |
115 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7" | 115 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7" |
116 ANDROID_ARCH="arm" | 116 ANDROID_ARCH="arm" |
117 ;; | 117 ;; |
118 arm64 | nexus_9) | 118 arm64 | nexus_9) |
119 DEFINES="${DEFINES} skia_arch_type=arm64 skia_arch_width=64" | 119 DEFINES="${DEFINES} skia_arch_type=arm64 skia_arch_width=64" |
120 ANDROID_ARCH="arm64" | 120 ANDROID_ARCH="arm64" |
121 ;; | 121 ;; |
122 x86) | 122 x86) |
123 DEFINES="${DEFINES} skia_arch_type=x86" | 123 DEFINES="${DEFINES} skia_arch_type=x86" |
124 ANDROID_ARCH="x86" | 124 ANDROID_ARCH="x86" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 adb_push_if_needed $HOST_SRC $ANDROID_DST | 243 adb_push_if_needed $HOST_SRC $ANDROID_DST |
244 else | 244 else |
245 echo -n "$ANDROID_DST " | 245 echo -n "$ANDROID_DST " |
246 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 246 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
247 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 247 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
248 fi | 248 fi |
249 fi | 249 fi |
250 } | 250 } |
251 | 251 |
252 setup_device "${DEVICE_ID}" | 252 setup_device "${DEVICE_ID}" |
OLD | NEW |