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 # ios_setup.sh: Sets environment variables used by other iOS scripts. | 9 # ios_setup.sh: Sets environment variables used by other iOS scripts. |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 # BUILDTYPE is 'Debug' by default. | 34 # BUILDTYPE is 'Debug' by default. |
35 if [[ -z "$BUILDTYPE" ]]; then | 35 if [[ -z "$BUILDTYPE" ]]; then |
36 BUILDTYPE="Debug" | 36 BUILDTYPE="Debug" |
37 fi | 37 fi |
38 | 38 |
39 # Out dir is $SKIA_SRC_DIR/out by default. | 39 # Out dir is $SKIA_SRC_DIR/out by default. |
40 if [[ -z "$SKIA_OUT" ]]; then | 40 if [[ -z "$SKIA_OUT" ]]; then |
41 SKIA_OUT="$SKIA_SRC_DIR/out" | 41 SKIA_OUT="$SKIA_SRC_DIR/out" |
42 fi | 42 fi |
43 | 43 |
| 44 # Name of the iOS app. |
| 45 IOS_APP=iOSShell.ipa |
| 46 |
| 47 # Location of the compiled iOS app. |
| 48 IOS_APP_PATH=${SKIA_OUT}/${BUILDTYPE}/${IOS_APP} |
| 49 |
| 50 |
44 ios_uninstall_app() { | 51 ios_uninstall_app() { |
45 ideviceinstaller -U "$IOS_BUNDLE_ID" | 52 ideviceinstaller -U "$IOS_BUNDLE_ID" |
46 } | 53 } |
47 | 54 |
48 ios_install_app() { | 55 ios_package_app() { |
49 rm -rf $IOS_PCKG_DIR | 56 rm -rf $IOS_PCKG_DIR |
50 mkdir -p $IOS_PCKG_DIR/Payload # this directory must be named 'Payload' | 57 mkdir -p $IOS_PCKG_DIR/Payload # this directory must be named 'Payload' |
51 cp -rf "${SKIA_SRC_DIR}/xcodebuild/${BUILDTYPE}-iphoneos/iOSShell.app" "${IOS_
PCKG_DIR}/Payload/" | 58 cp -rf "${SKIA_SRC_DIR}/xcodebuild/${BUILDTYPE}-iphoneos/iOSShell.app" "${IOS_
PCKG_DIR}/Payload/" |
52 local RET_DIR=`pwd` | 59 pushd $IOS_PCKG_DIR |
53 cd $IOS_PCKG_DIR | 60 zip -r ${IOS_APP} Payload |
54 zip -r iOSShell.ipa Payload | 61 cp ${IOS_APP} ${IOS_APP_PATH} |
55 ideviceinstaller -i ./iOSShell.ipa | 62 popd |
56 cd $RET_DIR | 63 } |
| 64 |
| 65 ios_install_app() { |
| 66 ideviceinstaller -i ${IOS_APP_PATH} |
57 } | 67 } |
58 | 68 |
59 ios_rm() { | 69 ios_rm() { |
60 local TARGET="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1" | 70 local TARGET="$IOS_MOUNT_POINT/$IOS_DOCS_DIR/$1" |
61 | 71 |
62 ios_mount | 72 ios_mount |
63 rm -rf "$TARGET" | 73 rm -rf "$TARGET" |
64 ios_umount | 74 ios_umount |
65 } | 75 } |
66 | 76 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 # adb_push_if_needed $HOST_SRC $ANDROID_DST | 191 # adb_push_if_needed $HOST_SRC $ANDROID_DST |
182 # else | 192 # else |
183 # echo -n "$ANDROID_DST " | 193 # echo -n "$ANDROID_DST " |
184 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 194 # $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
185 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 195 # $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
186 # fi | 196 # fi |
187 # fi | 197 # fi |
188 # } | 198 # } |
189 | 199 |
190 # setup_device "${DEVICE_ID}" | 200 # setup_device "${DEVICE_ID}" |
OLD | NEW |