1 |
|
---|
2 | Greenstone3 Runtime on Android
|
---|
3 | ==============================
|
---|
4 |
|
---|
5 | This extension helps you set up and run Greenstone3 on your android device.
|
---|
6 |
|
---|
7 | It relies on the environment variable ANDROID_SDK_HOME to determine
|
---|
8 | where Android's SDK lives on your file system (primarily to be able to
|
---|
9 | run 'adb' and 'dex'). If this is not set prior to running the scripts
|
---|
10 | this extension provides, it can be set explicitly in setup.bash/bat.
|
---|
11 |
|
---|
12 | Having sourced the setup file the two main steps are:
|
---|
13 |
|
---|
14 | 1) Install i-jetty
|
---|
15 |
|
---|
16 | 2) Install Greenstone3 as a web-app
|
---|
17 | (converting any jar and class files to DEX format)
|
---|
18 |
|
---|
19 | The first step typically only needs to be done once. The second step is
|
---|
20 | composed of three sub-steps, and may require the last two sub-steps to
|
---|
21 | be repeated if the Java code is changed.
|
---|
22 |
|
---|
23 | Step 1
|
---|
24 | =======
|
---|
25 |
|
---|
26 | First, install i-jetty on your Android device. You can do this through
|
---|
27 | the Market, or else type:
|
---|
28 |
|
---|
29 | adb install i-jetty-2.2-signed.apk
|
---|
30 |
|
---|
31 | Note: for your Android device to install applications using 'adb' you
|
---|
32 | need to have enabled it's application 'Development' mode (under
|
---|
33 | Settings->Application)
|
---|
34 |
|
---|
35 |
|
---|
36 | Step 2
|
---|
37 | ======
|
---|
38 |
|
---|
39 | Next put your Android device into USB disk mode, and set up the necessary files
|
---|
40 | to run Greenstone3 as a web-app under i-jetty. The three sub-steps are:
|
---|
41 |
|
---|
42 |
|
---|
43 | Step 2.1
|
---|
44 | --------
|
---|
45 |
|
---|
46 | Transfer the bulk of the <GSDL3SRCHOME>/web structure to the
|
---|
47 | <SDCARD>/ijetty/webapps/greenstone3 with:
|
---|
48 |
|
---|
49 |
|
---|
50 | WEBAPP-ROOT-TO-SDCARD.sh
|
---|
51 |
|
---|
52 | This script skips any .svn files if present. It also skips installing
|
---|
53 | 'localsite' as this is rather large -- both in size and in terms of
|
---|
54 | the number of files invovled -- so copying is rather slow, and it is
|
---|
55 | probably not what you want anyway.
|
---|
56 |
|
---|
57 |
|
---|
58 | Step 2.2
|
---|
59 | --------
|
---|
60 |
|
---|
61 | Convert the class files (includes those stored in jar files) into
|
---|
62 | classs.dex with:
|
---|
63 |
|
---|
64 | JAVA-TO-DEX.sh
|
---|
65 |
|
---|
66 | The finished file, which is also by this point zipped up, is left in
|
---|
67 | the 'lib' folder.
|
---|
68 |
|
---|
69 |
|
---|
70 | Step 2.3
|
---|
71 | --------
|
---|
72 |
|
---|
73 | Copy classes.zip onto the Android's sd-card
|
---|
74 |
|
---|
75 | DEX-TO-SDCARD.sh
|
---|
76 |
|
---|
77 | This is the final step in getting Greenstone3 setup on an Andoird.
|
---|
78 | Switch off the USB disk mode on the Android device. Note: it can take
|
---|
79 | a device minute or two "preparing" the sd-card. This can be seen
|
---|
80 | on the notification view. Alternativey, if you try to start i-jetty
|
---|
81 | before the card is ready, then i-jetty points this out, and offers you
|
---|
82 | a 'retry' button.
|
---|
83 |
|
---|
84 |
|
---|
85 | Step 3
|
---|
86 | ======
|
---|
87 |
|
---|
88 | Launch i-jetty from my apps area. Then, within i-jetty, start the
|
---|
89 | server. Once the "Jetty started" message appears, switch to your
|
---|
90 | web-browser application. We've tested the built-in web browser, and
|
---|
91 | Mobile Firefox 4.
|
---|
92 |
|
---|
93 |
|
---|
94 | If the Java code to Greenstone3 is changed, then you need to repeat sub-steps
|
---|
95 | 2.2 and 2.3
|
---|
96 |
|
---|
97 |
|
---|
98 |
|
---|
99 | Caveats:
|
---|
100 | ========
|
---|
101 |
|
---|
102 | 1. Due to difficulties in getting MG and MGPP working on android
|
---|
103 | through the NDK, these are currently not supported. Effectively,
|
---|
104 | the Greenstone3 used needs to be one compiled *without* JNI
|
---|
105 | support.
|
---|
106 |
|
---|
107 |
|
---|
108 | 2. Due to a runtime (reflection) error, we had to modify xalan.jar.
|
---|
109 | The modified version of this file is also in the 'jars' folder
|
---|
110 | used in this extension.
|
---|
111 |
|
---|
112 |
|
---|
113 |
|
---|
114 |
|
---|
115 |
|
---|