Changeset 25623


Ignore:
Timestamp:
2012-05-20T19:48:37+12:00 (12 years ago)
Author:
davidb
Message:

Restructuring of scripts to use 'i-jetty' webapps preparation area

Location:
gs3-extensions/i-jetty/trunk/src
Files:
1 added
1 deleted
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • gs3-extensions/i-jetty/trunk/src/DEX-TO-PREPARED-SDCARD.sh

    r25605 r25623  
    2525
    2626/bin/cp -r lib $PREPARE_SDCARD_GSDL3HOME/WEB-INF/.
     27
     28#SRC_DIR=$PREPARE_SDCARD_GSDL3HOME
     29#DST_DIR=$WITHIN_SDCARD_GSDL3HOME
     30#if [ "x$IJOS" = "xcygwin" ] ; then
     31#  SRC_DIR=`cygpath -w $SRC_DIR`
     32#  DST_DIR=`cygpath -w $DST_DIR`
     33#elif [ "x$IJOS" = "xmingw" ] ; then
     34#  SRC_DIR=`echo $SRC_DEX | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
     35#  DST_DIR=`echo $DST_DIR | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
     36#fi
     37
     38
     39adb push war/greenstone3 "$WITHIN_SDCARD_GSDL3HOME"
  • gs3-extensions/i-jetty/trunk/src/PREPARE-JAVA-TO-DEX.sh

    r25605 r25623  
    22
    33if [ "x$PREPARE_SDCARD_GSDL3HOME" = "x" ] ; then
    4   echo "Environment variable PREPARE_SDCARD_GSDL3HOME undefined"
     4  echo "Environment variable PREPARE_SDCARD_GSDL3HOME undefined" 1>&2
    55  exit -1
    66fi
     
    3535echo "#---"
    3636
    37 if [ "x$IJOS" = "xcygwin" ] ; then
    38   SDCARD_GSDL3HOME_ONDEVICE=`echo $SDCARD_GSDL3HOME | sed 's@^/.\+/war/@/sdcard/@'`
     37if [ "x$IJOS" = "xcygwin" -o "x$IJOS" = "xmingw" ] ; then
     38  SDCARD_GSDL3HOME_ONDEVICE=`echo $PREPARE_SDCARD_GSDL3HOME | sed 's@^/.\+/war/@/sdcard/jetty/webapps/@'`
    3939else
    4040  echo "Need to change mapped location of Android device on host machine"
     
    9595INPUT_DIR=$IJETTY_HOME/jars
    9696
     97dxcmd="dx"
    9798
    9899if [ "x$IJOS" = "xcygwin" ] ; then
    99100  OUTPUT_DEX=`cygpath -w $OUTPUT_DEX`
    100101  INPUT_DIR=`cygpath -w $INPUT_DIR`
     102  dxcmd="dx.bat"
     103elif [ "x$IJOS" = "xmingw" ] ; then
     104  OUTPUT_DEX=`echo $OUTPUT_DEX | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
     105  INPUT_DIR=`echo $INPUT_DIR | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
     106  dxcmd="cmd /c dx.bat"
    101107fi
    102108
    103109# add --verbose for more information
    104 dx.bat --verbose --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR
     110$dxcmd --verbose --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR
     111
    105112##dx.bat --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR
    106113
     
    129136(cd classes && zip -r ../lib/classes.zip . && cd ..)
    130137
     138if [ $? != 0 ] ; then
     139  echo "Error(s) encountered zipping up dexified 'lib' files"
     140  exit
     141fi
     142
     143
     144
     145echo "#---"
     146echo "# Copying dexified 'lib' servlet code to "
     147echo "#   $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib"
     148echo "#---"
     149echo ""
     150
     151if [ -d $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib ] ; then
     152  /bin/rm -rf $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib
     153fi
     154
     155/bin/cp -r lib $PREPARE_SDCARD_GSDL3HOME/WEB-INF/.
     156
     157
    131158
    132159echo ""
    133160echo "####"
    134 echo "# Run ./DEX-TO-SDCARD.sh to install the latest DEX files on the device"
     161echo "# Run ./IJETTY-PUSH.sh \"webapps\" to install all the files needed on the Andorid device"
     162echo "# Run ./IJETTY-PUSH.sh \"webapps/WEB-INF/lib\" to install the latest DEX files on the device"
    135163echo "####"
    136164echo ""
  • gs3-extensions/i-jetty/trunk/src/PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh

    r25613 r25623  
    5656echo "####"
    5757echo "# If not already done so, run: "
    58 echo "#   ./JAVA-TO-DEX.sh"
     58echo "#   ./PREPARE-JAVA-TO-DEX.sh"
    5959echo "# to cross-compile the Greenstone code and supporting JAR files"
    6060echo "####"
  • gs3-extensions/i-jetty/trunk/src/setup.bash

    r25606 r25623  
     1
     2
    13
    24if [ "x$ANDROID_SDK_HOME" = "x" ] ; then
    35  if [ ! -e setup-android.bash ] ; then
    4     echo "Unable to find 'setup-android.bash'.  You either need to:"
    5     echo "  1) copy setup-android.bash.in to setup-android.bash and"
    6     echo "     edit **ANDROID_SDK_HOME** to point to where this is located"
    7     echo "     on your file system, or"
    8     echo "  2) Explicitly set the environment variable ANDROID_SDK_HOME"
    9     echo "     and make sure 'dx' is on your PATH"
     6    echo "Unable to find 'setup-android.bash'.  You either need to:" 1>&2
     7    echo "  1) copy setup-android.bash.in to setup-android.bash and" 1>&2
     8    echo "     edit **ANDROID_SDK_HOME** to point to where this is located" 1>&2
     9    echo "     on your file system, or" 1>&2
     10    echo "  2) Explicitly set the environment variable ANDROID_SDK_HOME" 1>&2
     11    echo "     and make sure 'dx' is on your PATH" 1>&2
    1012    exit
    1113  else
     
    2426fi
    2527
    26 if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
     28export PREPARE_SDCARD_GSDL3HOME=$IJETTY_HOME/webapps/greenstone3/
    2729
    28   possible_drives=""
    29   if [ "x$IJOS" = "xcygwin" ] ; then
     30export WITHIN_SDCARD_WEBAPPS=/sdcard/jetty/webapps
     31export WITHIN_SDCARD_GSDL3HOME=$WITHIN_SDCARD_WEBAPPS/greenstone3
    3032
    31     possible_drives=`ls -d /cygdrive/*/jetty/webapps 2>/dev/null`
    32   elif [ "x$IJOS" = "xmingw" ] ; then
    33     possible_drives=`ls -d /*/jetty/webapps 2>/dev/null`
    34   else
    35     # Linux and MacOS
    36     possible_drives=`ls -d /mnt/*/jetty/webapps 2>/dev/null`
    37   fi
    38 
    39   num_possible_drives=`echo $possible_drives | wc -l`
    40 
    41   if [ $num_possible_drives = "0" ] ; then
    42       echo "    Failed to automatically find and sdcard webapps folders"
    43       echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
    44       echo "      installation on the Android phone"   
    45   elif [ $num_possible_drives = "1" ] ; then
    46       export SDCARD_WEBAPPS=${possible_drives[0]}
    47   else
    48       echo "    Detected more than one possible sdcard webapps folders:"
    49       echo "      $possible_drives"
    50       echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
    51       echo "      which one is used for installation on the Android phone"   
    52   fi
    53 fi
    54 
    55 export PREPARE_SDCARD_GSDL3HOME=`pwd`/war/greenstone3/
    56 
    57 if [ "x$SDCARD_WEBAPPS" != "x" ] ; then
    58   export SDCARD_GSDL3HOME=$SDCARD_WEBAPPS/greenstone3/
    59   echo ""
    60   echo "  Using:"
    61   echo ""
    62   echo "     $PREPARE_SDCARD_GSDL3HOME"
    63   echo ""
    64   echo "  as the *preparation* area for the Greenstone servlet"
    65   echo ""
    66   echo "  Using:"
    67   echo ""
    68   echo "     $SDCARD_GSDL3HOME"
    69   echo ""
    70   echo "  as the *installation* point for the Greenstone servlet"
    71   echo ""
    72 fi
     33echo ""
     34echo "  Using:"
     35echo ""
     36echo "     $PREPARE_SDCARD_GSDL3HOME"
     37echo ""
     38echo "  as the webapps *preparation* area for the Greenstone servlet"
     39echo ""
     40echo "  Using:"
     41echo ""
     42echo "     $WITHIN_SDCARD_GSDL3HOME"
     43echo ""
     44echo "  as the *installation* point for the Greenstone servlet on the sd-card"
     45echo ""
    7346
    7447
     
    9669echo "to install jetty on your device, followed by"
    9770echo ""
    98 echo "  ./WEBAPP-ROOT-TO-SDCARD.sh"
     71echo "  ./PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh"
    9972echo ""
    100 echo "to set up tGreenstone's 'web' directory within the i-jetty webapps area."
     73echo "to set up Greenstone3's 'web' directory for the i-jetty webapps area."
     74echo ""
    10175echo "Then:"
    10276echo ""
    10377echo "  ./JAVA-TO-DEX.sh"
    10478echo ""
    105 echo "to cross-compile Greenstone java code to the Android DEX format."
     79echo "to cross-compile Greenstone java code to the Android DEX format and add it to the webapps area."
    10680echo ""
    10781echo "Finally run:"
    10882echo ""
    109 echo "  ./DEX-TO-SDCARD.sh"
     83echo "  ./IJETTY-PUSH.sh webapps/greenstone3"
    11084echo ""
    111 echo "to install the cross-compiled files on the Android device"
     85echo "to install the Greenstone3's webapps folder (including cross-compiled DEX files) on the Android device"
    11286echo "======"
    11387echo ""
Note: See TracChangeset for help on using the changeset viewer.