1 |
|
---|
2 | if [ "x$ANDROID_SDK_HOME" = "x" ] ; then
|
---|
3 | if [ ! -e setup-android.bash ] ; then
|
---|
4 | echo ""
|
---|
5 | echo "Unable to find 'setup-android.bash'. You either need to:" 1>&2
|
---|
6 | echo " 1) copy setup-android.bash.in to setup-android.bash and" 1>&2
|
---|
7 | echo " edit **ANDROID_SDK_HOME** to point to where this is located" 1>&2
|
---|
8 | echo " on your file system, or" 1>&2
|
---|
9 | echo " 2) Explicitly set the environment variable ANDROID_SDK_HOME" 1>&2
|
---|
10 | echo " and make sure 'dx' is on your PATH" 1>&2
|
---|
11 | else
|
---|
12 | source setup-android.bash
|
---|
13 |
|
---|
14 | export IJETTY_HOME=`pwd`
|
---|
15 | export IJOS=`uname | sed 's/^cygwin.*$/cygwin/i' | sed 's/^mingw.*$/mingw/i'`
|
---|
16 |
|
---|
17 | if [ "x$GSDL3HOME" = "x" ] ; then
|
---|
18 | echo " Setting GSDL3HOME to '../../web'"
|
---|
19 | export GSDL3HOME=../../web
|
---|
20 | else
|
---|
21 | echo "Using existing value of GSDL3HOME: '$GSDL3HOME'"
|
---|
22 | fi
|
---|
23 |
|
---|
24 | export PREPARE_SDCARD_GSDL3HOME=$IJETTY_HOME/webapps/greenstone3/
|
---|
25 |
|
---|
26 | export WITHIN_SDCARD_WEBAPPS=/sdcard/greenstone/webapps
|
---|
27 | export WITHIN_SDCARD_GSDL3HOME=$WITHIN_SDCARD_WEBAPPS/greenstone3
|
---|
28 |
|
---|
29 | echo ""
|
---|
30 | echo " Using:"
|
---|
31 | echo ""
|
---|
32 | echo " $PREPARE_SDCARD_GSDL3HOME"
|
---|
33 | echo ""
|
---|
34 | echo " as the webapps *preparation* area for the Greenstone servlet"
|
---|
35 | echo ""
|
---|
36 | echo " Using:"
|
---|
37 | echo ""
|
---|
38 | echo " $WITHIN_SDCARD_GSDL3HOME"
|
---|
39 | echo ""
|
---|
40 | echo " as the *installation* point for the Greenstone servlet on the sd-card"
|
---|
41 | echo ""
|
---|
42 |
|
---|
43 |
|
---|
44 | if [ "x$IJETTY_PORT" = "x" ] ; then
|
---|
45 | export IJETTY_PORT=8080
|
---|
46 | echo ""
|
---|
47 | echo " Setting IJETTY_PORT to 8080"
|
---|
48 | echo " Explicityly set this environment variable to override this default"
|
---|
49 | echo ""
|
---|
50 | else
|
---|
51 | echo ""
|
---|
52 | echo " Using IJETTY PORT = $IJETTY_PORT"
|
---|
53 | echo ""
|
---|
54 | fi
|
---|
55 |
|
---|
56 | echo "+ Your environment has now been set up with iJetty extension for Greenstone"
|
---|
57 |
|
---|
58 | echo ""
|
---|
59 | echo "======"
|
---|
60 | echo "If this is the first time you have installed Greenstone on the Android device, "
|
---|
61 | echo " run:"
|
---|
62 | echo ""
|
---|
63 | echo " adb install i-jetty-3.1-aligned.apk"
|
---|
64 | echo ""
|
---|
65 | echo "to install jetty on your device, followed by"
|
---|
66 | echo ""
|
---|
67 | echo " ./PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh"
|
---|
68 | echo ""
|
---|
69 | echo "to set up Greenstone3's 'web' directory for the i-jetty webapps area."
|
---|
70 | echo ""
|
---|
71 | echo "Then:"
|
---|
72 | echo ""
|
---|
73 | echo " ./JAVA-TO-DEX.sh"
|
---|
74 | echo ""
|
---|
75 | echo "to cross-compile Greenstone java code to the Android DEX format and add it to the webapps area."
|
---|
76 | echo ""
|
---|
77 | echo "Finally run:"
|
---|
78 | echo ""
|
---|
79 | echo " ./IJETTY-PUSH.sh webapps/greenstone3"
|
---|
80 | echo ""
|
---|
81 | echo "to install the Greenstone3's webapps folder (including cross-compiled DEX files) on the Android device"
|
---|
82 | echo "======"
|
---|
83 | echo ""
|
---|
84 |
|
---|
85 | fi
|
---|
86 | fi
|
---|
87 |
|
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 |
|
---|