source: issm/oecreview/Archive/12081-12100/ISSM-12096-12097.diff@ 12325

Last change on this file since 12325 was 12325, checked in by Eric.Larour, 13 years ago

11990 to 12321 oec compliance

File size: 7.5 KB
  • TabularUnified proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh

     
     1#This installs the Android SDK (Software Development Kit)
     2#which is needed for the compilation of the Java project.
     3
     4step=3;
     5
     6#Different steps here.
     7#1: install sdk, ant and sdk tools
     8#2: install an emulator.
     9#3: test the emulator
     10#4: cleanup
     11
     12present_dir=`pwd`;
     13default_droid="Android-4.0"
     14
     15if [[ $step == "1" ]]; then
     16
     17        #Cleanup the install
     18        rm -rf install-sdk install-ant
     19
     20        # Install Android SDK and NDK.
     21        unzip -o android-sdk-r16-macosx.zip
     22        unzip -o apache-ant-1.8.2-bin.zip
     23
     24        #Move to install
     25        mv android-sdk-macosx install-sdk
     26        mv apache-ant-1.8.2 install-ant
     27
     28        #Post_install configuration:
     29        #We need specific settings for specific platforms, for the SDK to
     30        #function properly
     31
     32        #For now, we need to install: 
     33        #android sdk platform tools 
     34        #and a specific android api: API 15
     35        #Note: API 15 corresponds to Android 4.0.3
     36
     37        cd install-sdk/tools/ && source ./android update sdk -t platform-tools,android-15,android-14,system-image --no-ui
     38
     39fi
     40
     41if [[ $step == "2" ]]; then
     42
     43        #Once this is done, we need to install an emulator. Location will default to ~/.android/avd,
     44        #which we will move to $ISSM_TIER/externalpackages/android-emulators. 
     45        #For now, it's called: Android-4.0.3
     46
     47
     48        #Here we delete the Android-4.0.3 device if it already exists.
     49        cd $present_dir/install-sdk/tools
     50
     51    if [ -e $ANDROID_DIR/android-emulators/$default_droid ]
     52    then
     53        echo "Deleting previously created device: $default_droid"
     54            ./android delete avd -n $default_droid
     55    fi
     56
     57        #Android will prompt the user to specify hardware emulation options. For now, default
     58        #default settings will suffice. Press 'enter' to take default settings or enter 'no'.
     59
     60        ./android create avd -f -n $default_droid -t 1 -p $ANDROID_DIR/android-emulators/$default_droid --abi armeabi-v7a
     61fi
     62
     63if [[ $step == "3" ]]; then
     64    #Here we will start up our default emulator to test that it is working properly.
     65    #Once the device has booted we will use the Android Debug Bridge tool to gain
     66    #a terminal in our device.
     67
     68        cd $present_dir/install-sdk/tools
     69        ./emulator -avd $default_droid -sdcard $ANDROID_DIR/android-emulators/test &
     70
     71    cd ../platform-tools
     72    ./adb wait-for-device shell
     73
     74fi
     75
     76if [[ $step == "4" ]]; then
     77        rm -rf install-sdk install-ant
     78fi
  • TabularUnified proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh

    Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
    ___________________________________________________________________
    Added: svn:executable
       + *
    
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
    
    Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk
    ___________________________________________________________________
    Added: svn:ignore
       + install-sdk
    install-ant
    
    
     
     1#This installs the Android NDK (Native Development Kit)
     2#which is needed for the compilation of C/C++ code into the
     3#native architecture of the Android device.
     4
     5#The android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2 file was downloaded
     6#from the android developer website:
     7
     8#Cleanup the install
     9rm -rf install
     10rm -rf $ANDROID_DIR/arm-linux-android-4.0
     11
     12# Install Android SDK and NDK.
     13cp android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2
     14bunzip2 dummy.tar.bz2
     15tar -xvf dummy.tar
     16rm -rf dummy.tar dummy.tar.bz2
     17
     18#Move to install
     19mv android-ndk-r7b install
     20
     21#Create Standalone Development Directory
     22$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=$ANDROID_DIR/arm-linux-android-4.0
  • TabularUnified proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh

    Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh
    ___________________________________________________________________
    Added: svn:executable
       + *
    
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
     
    172172#packagemaker
    173173PACKAGEMAKER_DIR="$ISSM_TIER/externalpackages/packagemaker/install"
    174174
     175#android-dev-dir
     176ANDROID_DIR="$ISSM_TIER/externalpackages/android"
     177
    175178#android-ndk
    176 ANDROID_NDK_DIR="$ISSM_TIER/externalpackages/android-ndk/install"
     179ANDROID_NDK_DIR="$ANDROID_DIR/android-ndk/install"
    177180
    178 #android-dev-dir
    179 ANDROID_DEV_DIR="$ISSM_TIER/externalpackages/android-dev-dir"
    180 
    181181#android-sdk
    182 ANDROID_SDK_DIR="$ISSM_TIER/externalpackages/android-sdk/install-sdk"
     182ANDROID_SDK_DIR="$ANDROID_DIR/android-sdk/install-sdk"
    183183
    184184#android-ant
    185 ANDROID_ANT_DIR="$ISSM_TIER/externalpackages/android-sdk/install-ant"
     185ANDROID_ANT_DIR="$ANDROID_DIR/android-sdk/install-ant"
    186186
    187187#gsl
    188188GSL_DIR="$ISSM_TIER/externalpackages/gsl/install"
  • TabularUnified proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh

     
    241241export ANDROID_NDK_DIR
    242242export PATH="$PATH:$ANDROID_NDK_DIR/"
    243243
    244 #ANDROID_DEV_DIR
    245 export ANDROID_DEV_DIR
     244#ANDROID_DIR
     245export ANDROID_DIR
    246246
    247247#ANDROID_SDK
    248248export PATH="$PATH:$ANDROID_SDK_DIR/"
Note: See TracBrowser for help on using the repository browser.