OLD | NEW |
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 # Fail-fast if anything in the script fails. | 5 # Fail-fast if anything in the script fails. |
6 set -e | 6 set -e |
7 | 7 |
8 BUILDTYPE=${BUILDTYPE-Debug} | 8 BUILDTYPE=${BUILDTYPE-Debug} |
9 | 9 |
10 while (( "$#" )); do | 10 while (( "$#" )); do |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 ;; | 139 ;; |
140 esac | 140 esac |
141 | 141 |
142 verbose "The build is targeting the device: $TARGET_DEVICE" | 142 verbose "The build is targeting the device: $TARGET_DEVICE" |
143 exportVar DEVICE_ID $TARGET_DEVICE | 143 exportVar DEVICE_ID $TARGET_DEVICE |
144 | 144 |
145 # setup the appropriate cross compiling toolchains | 145 # setup the appropriate cross compiling toolchains |
146 source $SCRIPT_DIR/utils/setup_toolchain.sh | 146 source $SCRIPT_DIR/utils/setup_toolchain.sh |
147 | 147 |
148 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" | 148 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" |
| 149 exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" |
149 | 150 |
150 exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" | 151 SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd) |
151 exportVar SKIA_OUT "${SKIA_OUT:-out/config/android-${TARGET_DEVICE}}" | 152 DEFAULT_SKIA_OUT="${SKIA_SRC_DIR}/out/config/android-${TARGET_DEVICE}" |
| 153 exportVar SKIA_OUT "${SKIA_OUT:-${DEFAULT_SKIA_OUT}}" |
152 } | 154 } |
153 | 155 |
154 # adb_pull_if_needed(android_src, host_dst) | 156 # adb_pull_if_needed(android_src, host_dst) |
155 adb_pull_if_needed() { | 157 adb_pull_if_needed() { |
156 | 158 |
157 # get adb location | 159 # get adb location |
158 source $SCRIPT_DIR/utils/setup_adb.sh | 160 source $SCRIPT_DIR/utils/setup_adb.sh |
159 | 161 |
160 # read input params | 162 # read input params |
161 ANDROID_SRC="$1" | 163 ANDROID_SRC="$1" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 221 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
220 fi | 222 fi |
221 else | 223 else |
222 echo -n "$ANDROID_DST " | 224 echo -n "$ANDROID_DST " |
223 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 225 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
224 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 226 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
225 fi | 227 fi |
226 } | 228 } |
227 | 229 |
228 setup_device "${DEVICE_ID}" | 230 setup_device "${DEVICE_ID}" |
OLD | NEW |