Changeset 25623
- Timestamp:
- 2012-05-20T19:48:37+12:00 (12 years ago)
- 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 25 25 26 26 /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 39 adb push war/greenstone3 "$WITHIN_SDCARD_GSDL3HOME" -
gs3-extensions/i-jetty/trunk/src/PREPARE-JAVA-TO-DEX.sh
r25605 r25623 2 2 3 3 if [ "x$PREPARE_SDCARD_GSDL3HOME" = "x" ] ; then 4 echo "Environment variable PREPARE_SDCARD_GSDL3HOME undefined" 4 echo "Environment variable PREPARE_SDCARD_GSDL3HOME undefined" 1>&2 5 5 exit -1 6 6 fi … … 35 35 echo "#---" 36 36 37 if [ "x$IJOS" = "xcygwin" ] ; then38 SDCARD_GSDL3HOME_ONDEVICE=`echo $ SDCARD_GSDL3HOME | sed 's@^/.\+/war/@/sdcard/@'`37 if [ "x$IJOS" = "xcygwin" -o "x$IJOS" = "xmingw" ] ; then 38 SDCARD_GSDL3HOME_ONDEVICE=`echo $PREPARE_SDCARD_GSDL3HOME | sed 's@^/.\+/war/@/sdcard/jetty/webapps/@'` 39 39 else 40 40 echo "Need to change mapped location of Android device on host machine" … … 95 95 INPUT_DIR=$IJETTY_HOME/jars 96 96 97 dxcmd="dx" 97 98 98 99 if [ "x$IJOS" = "xcygwin" ] ; then 99 100 OUTPUT_DEX=`cygpath -w $OUTPUT_DEX` 100 101 INPUT_DIR=`cygpath -w $INPUT_DIR` 102 dxcmd="dx.bat" 103 elif [ "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" 101 107 fi 102 108 103 109 # 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 105 112 ##dx.bat --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR 106 113 … … 129 136 (cd classes && zip -r ../lib/classes.zip . && cd ..) 130 137 138 if [ $? != 0 ] ; then 139 echo "Error(s) encountered zipping up dexified 'lib' files" 140 exit 141 fi 142 143 144 145 echo "#---" 146 echo "# Copying dexified 'lib' servlet code to " 147 echo "# $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib" 148 echo "#---" 149 echo "" 150 151 if [ -d $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib ] ; then 152 /bin/rm -rf $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib 153 fi 154 155 /bin/cp -r lib $PREPARE_SDCARD_GSDL3HOME/WEB-INF/. 156 157 131 158 132 159 echo "" 133 160 echo "####" 134 echo "# Run ./DEX-TO-SDCARD.sh to install the latest DEX files on the device" 161 echo "# Run ./IJETTY-PUSH.sh \"webapps\" to install all the files needed on the Andorid device" 162 echo "# Run ./IJETTY-PUSH.sh \"webapps/WEB-INF/lib\" to install the latest DEX files on the device" 135 163 echo "####" 136 164 echo "" -
gs3-extensions/i-jetty/trunk/src/PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh
r25613 r25623 56 56 echo "####" 57 57 echo "# If not already done so, run: " 58 echo "# ./ JAVA-TO-DEX.sh"58 echo "# ./PREPARE-JAVA-TO-DEX.sh" 59 59 echo "# to cross-compile the Greenstone code and supporting JAR files" 60 60 echo "####" -
gs3-extensions/i-jetty/trunk/src/setup.bash
r25606 r25623 1 2 1 3 2 4 if [ "x$ANDROID_SDK_HOME" = "x" ] ; then 3 5 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 10 12 exit 11 13 else … … 24 26 fi 25 27 26 if [ "x$SDCARD_WEBAPPS" = "x" ] ; then 28 export PREPARE_SDCARD_GSDL3HOME=$IJETTY_HOME/webapps/greenstone3/ 27 29 28 possible_drives="" 29 if [ "x$IJOS" = "xcygwin" ] ; then 30 export WITHIN_SDCARD_WEBAPPS=/sdcard/jetty/webapps 31 export WITHIN_SDCARD_GSDL3HOME=$WITHIN_SDCARD_WEBAPPS/greenstone3 30 32 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 33 echo "" 34 echo " Using:" 35 echo "" 36 echo " $PREPARE_SDCARD_GSDL3HOME" 37 echo "" 38 echo " as the webapps *preparation* area for the Greenstone servlet" 39 echo "" 40 echo " Using:" 41 echo "" 42 echo " $WITHIN_SDCARD_GSDL3HOME" 43 echo "" 44 echo " as the *installation* point for the Greenstone servlet on the sd-card" 45 echo "" 73 46 74 47 … … 96 69 echo "to install jetty on your device, followed by" 97 70 echo "" 98 echo " ./ WEBAPP-ROOT-TO-SDCARD.sh"71 echo " ./PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh" 99 72 echo "" 100 echo "to set up tGreenstone's 'web' directory within the i-jetty webapps area." 73 echo "to set up Greenstone3's 'web' directory for the i-jetty webapps area." 74 echo "" 101 75 echo "Then:" 102 76 echo "" 103 77 echo " ./JAVA-TO-DEX.sh" 104 78 echo "" 105 echo "to cross-compile Greenstone java code to the Android DEX format ."79 echo "to cross-compile Greenstone java code to the Android DEX format and add it to the webapps area." 106 80 echo "" 107 81 echo "Finally run:" 108 82 echo "" 109 echo " ./ DEX-TO-SDCARD.sh"83 echo " ./IJETTY-PUSH.sh webapps/greenstone3" 110 84 echo "" 111 echo "to install the cross-compiled fileson the Android device"85 echo "to install the Greenstone3's webapps folder (including cross-compiled DEX files) on the Android device" 112 86 echo "======" 113 87 echo ""
Note:
See TracChangeset
for help on using the changeset viewer.