[12325] | 1 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh (revision 0)
|
---|
| 4 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh (revision 12097)
|
---|
| 5 | @@ -0,0 +1,78 @@
|
---|
| 6 | +#This installs the Android SDK (Software Development Kit)
|
---|
| 7 | +#which is needed for the compilation of the Java project.
|
---|
| 8 | +
|
---|
| 9 | +step=3;
|
---|
| 10 | +
|
---|
| 11 | +#Different steps here.
|
---|
| 12 | +#1: install sdk, ant and sdk tools
|
---|
| 13 | +#2: install an emulator.
|
---|
| 14 | +#3: test the emulator
|
---|
| 15 | +#4: cleanup
|
---|
| 16 | +
|
---|
| 17 | +present_dir=`pwd`;
|
---|
| 18 | +default_droid="Android-4.0"
|
---|
| 19 | +
|
---|
| 20 | +if [[ $step == "1" ]]; then
|
---|
| 21 | +
|
---|
| 22 | + #Cleanup the install
|
---|
| 23 | + rm -rf install-sdk install-ant
|
---|
| 24 | +
|
---|
| 25 | + # Install Android SDK and NDK.
|
---|
| 26 | + unzip -o android-sdk-r16-macosx.zip
|
---|
| 27 | + unzip -o apache-ant-1.8.2-bin.zip
|
---|
| 28 | +
|
---|
| 29 | + #Move to install
|
---|
| 30 | + mv android-sdk-macosx install-sdk
|
---|
| 31 | + mv apache-ant-1.8.2 install-ant
|
---|
| 32 | +
|
---|
| 33 | + #Post_install configuration:
|
---|
| 34 | + #We need specific settings for specific platforms, for the SDK to
|
---|
| 35 | + #function properly
|
---|
| 36 | +
|
---|
| 37 | + #For now, we need to install:
|
---|
| 38 | + #android sdk platform tools
|
---|
| 39 | + #and a specific android api: API 15
|
---|
| 40 | + #Note: API 15 corresponds to Android 4.0.3
|
---|
| 41 | +
|
---|
| 42 | + cd install-sdk/tools/ && source ./android update sdk -t platform-tools,android-15,android-14,system-image --no-ui
|
---|
| 43 | +
|
---|
| 44 | +fi
|
---|
| 45 | +
|
---|
| 46 | +if [[ $step == "2" ]]; then
|
---|
| 47 | +
|
---|
| 48 | + #Once this is done, we need to install an emulator. Location will default to ~/.android/avd,
|
---|
| 49 | + #which we will move to $ISSM_TIER/externalpackages/android-emulators.
|
---|
| 50 | + #For now, it's called: Android-4.0.3
|
---|
| 51 | +
|
---|
| 52 | +
|
---|
| 53 | + #Here we delete the Android-4.0.3 device if it already exists.
|
---|
| 54 | + cd $present_dir/install-sdk/tools
|
---|
| 55 | +
|
---|
| 56 | + if [ -e $ANDROID_DIR/android-emulators/$default_droid ]
|
---|
| 57 | + then
|
---|
| 58 | + echo "Deleting previously created device: $default_droid"
|
---|
| 59 | + ./android delete avd -n $default_droid
|
---|
| 60 | + fi
|
---|
| 61 | +
|
---|
| 62 | + #Android will prompt the user to specify hardware emulation options. For now, default
|
---|
| 63 | + #default settings will suffice. Press 'enter' to take default settings or enter 'no'.
|
---|
| 64 | +
|
---|
| 65 | + ./android create avd -f -n $default_droid -t 1 -p $ANDROID_DIR/android-emulators/$default_droid --abi armeabi-v7a
|
---|
| 66 | +fi
|
---|
| 67 | +
|
---|
| 68 | +if [[ $step == "3" ]]; then
|
---|
| 69 | + #Here we will start up our default emulator to test that it is working properly.
|
---|
| 70 | + #Once the device has booted we will use the Android Debug Bridge tool to gain
|
---|
| 71 | + #a terminal in our device.
|
---|
| 72 | +
|
---|
| 73 | + cd $present_dir/install-sdk/tools
|
---|
| 74 | + ./emulator -avd $default_droid -sdcard $ANDROID_DIR/android-emulators/test &
|
---|
| 75 | +
|
---|
| 76 | + cd ../platform-tools
|
---|
| 77 | + ./adb wait-for-device shell
|
---|
| 78 | +
|
---|
| 79 | +fi
|
---|
| 80 | +
|
---|
| 81 | +if [[ $step == "4" ]]; then
|
---|
| 82 | + rm -rf install-sdk install-ant
|
---|
| 83 | +fi
|
---|
| 84 |
|
---|
| 85 | Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
|
---|
| 86 | ___________________________________________________________________
|
---|
| 87 | Added: svn:executable
|
---|
| 88 | + *
|
---|
| 89 |
|
---|
| 90 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip
|
---|
| 91 | ===================================================================
|
---|
| 92 | Cannot display: file marked as a binary type.
|
---|
| 93 | svn:mime-type = application/octet-stream
|
---|
| 94 |
|
---|
| 95 | Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip
|
---|
| 96 | ___________________________________________________________________
|
---|
| 97 | Added: svn:mime-type
|
---|
| 98 | + application/octet-stream
|
---|
| 99 |
|
---|
| 100 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip
|
---|
| 101 | ===================================================================
|
---|
| 102 | Cannot display: file marked as a binary type.
|
---|
| 103 | svn:mime-type = application/octet-stream
|
---|
| 104 |
|
---|
| 105 | Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip
|
---|
| 106 | ___________________________________________________________________
|
---|
| 107 | Added: svn:mime-type
|
---|
| 108 | + application/octet-stream
|
---|
| 109 |
|
---|
| 110 |
|
---|
| 111 | Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk
|
---|
| 112 | ___________________________________________________________________
|
---|
| 113 | Added: svn:ignore
|
---|
| 114 | + install-sdk
|
---|
| 115 | install-ant
|
---|
| 116 |
|
---|
| 117 |
|
---|
| 118 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh
|
---|
| 119 | ===================================================================
|
---|
| 120 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh (revision 0)
|
---|
| 121 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh (revision 12097)
|
---|
| 122 | @@ -0,0 +1,22 @@
|
---|
| 123 | +#This installs the Android NDK (Native Development Kit)
|
---|
| 124 | +#which is needed for the compilation of C/C++ code into the
|
---|
| 125 | +#native architecture of the Android device.
|
---|
| 126 | +
|
---|
| 127 | +#The android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2 file was downloaded
|
---|
| 128 | +#from the android developer website:
|
---|
| 129 | +
|
---|
| 130 | +#Cleanup the install
|
---|
| 131 | +rm -rf install
|
---|
| 132 | +rm -rf $ANDROID_DIR/arm-linux-android-4.0
|
---|
| 133 | +
|
---|
| 134 | +# Install Android SDK and NDK.
|
---|
| 135 | +cp android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2
|
---|
| 136 | +bunzip2 dummy.tar.bz2
|
---|
| 137 | +tar -xvf dummy.tar
|
---|
| 138 | +rm -rf dummy.tar dummy.tar.bz2
|
---|
| 139 | +
|
---|
| 140 | +#Move to install
|
---|
| 141 | +mv android-ndk-r7b install
|
---|
| 142 | +
|
---|
| 143 | +#Create Standalone Development Directory
|
---|
| 144 | +$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=$ANDROID_DIR/arm-linux-android-4.0
|
---|
| 145 |
|
---|
| 146 | Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh
|
---|
| 147 | ___________________________________________________________________
|
---|
| 148 | Added: svn:executable
|
---|
| 149 | + *
|
---|
| 150 |
|
---|
| 151 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2
|
---|
| 152 | ===================================================================
|
---|
| 153 | Cannot display: file marked as a binary type.
|
---|
| 154 | svn:mime-type = application/octet-stream
|
---|
| 155 |
|
---|
| 156 | Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2
|
---|
| 157 | ___________________________________________________________________
|
---|
| 158 | Added: svn:mime-type
|
---|
| 159 | + application/octet-stream
|
---|
| 160 |
|
---|
| 161 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh
|
---|
| 162 | ===================================================================
|
---|
| 163 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh (revision 12096)
|
---|
| 164 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh (revision 12097)
|
---|
| 165 | @@ -172,17 +172,17 @@
|
---|
| 166 | #packagemaker
|
---|
| 167 | PACKAGEMAKER_DIR="$ISSM_TIER/externalpackages/packagemaker/install"
|
---|
| 168 |
|
---|
| 169 | +#android-dev-dir
|
---|
| 170 | +ANDROID_DIR="$ISSM_TIER/externalpackages/android"
|
---|
| 171 | +
|
---|
| 172 | #android-ndk
|
---|
| 173 | -ANDROID_NDK_DIR="$ISSM_TIER/externalpackages/android-ndk/install"
|
---|
| 174 | +ANDROID_NDK_DIR="$ANDROID_DIR/android-ndk/install"
|
---|
| 175 |
|
---|
| 176 | -#android-dev-dir
|
---|
| 177 | -ANDROID_DEV_DIR="$ISSM_TIER/externalpackages/android-dev-dir"
|
---|
| 178 | -
|
---|
| 179 | #android-sdk
|
---|
| 180 | -ANDROID_SDK_DIR="$ISSM_TIER/externalpackages/android-sdk/install-sdk"
|
---|
| 181 | +ANDROID_SDK_DIR="$ANDROID_DIR/android-sdk/install-sdk"
|
---|
| 182 |
|
---|
| 183 | #android-ant
|
---|
| 184 | -ANDROID_ANT_DIR="$ISSM_TIER/externalpackages/android-sdk/install-ant"
|
---|
| 185 | +ANDROID_ANT_DIR="$ANDROID_DIR/android-sdk/install-ant"
|
---|
| 186 |
|
---|
| 187 | #gsl
|
---|
| 188 | GSL_DIR="$ISSM_TIER/externalpackages/gsl/install"
|
---|
| 189 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
|
---|
| 190 | ===================================================================
|
---|
| 191 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh (revision 12096)
|
---|
| 192 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh (revision 12097)
|
---|
| 193 | @@ -241,8 +241,8 @@
|
---|
| 194 | export ANDROID_NDK_DIR
|
---|
| 195 | export PATH="$PATH:$ANDROID_NDK_DIR/"
|
---|
| 196 |
|
---|
| 197 | -#ANDROID_DEV_DIR
|
---|
| 198 | -export ANDROID_DEV_DIR
|
---|
| 199 | +#ANDROID_DIR
|
---|
| 200 | +export ANDROID_DIR
|
---|
| 201 |
|
---|
| 202 | #ANDROID_SDK
|
---|
| 203 | export PATH="$PATH:$ANDROID_SDK_DIR/"
|
---|