source: gs3-extensions/i-jetty/trunk/src/README.txt@ 23970

Last change on this file since 23970 was 23970, checked in by davidb, 13 years ago

Mod/improvement to scripts based on fresh round of installing Greenstone on an Android phone

File size: 3.9 KB
RevLine 
[23883]1
2Greenstone3 Runtime on Android
3==============================
4
5This extension helps you set up and run Greenstone3 on your android device.
6
7It relies on the environment variable ANDROID_SDK_HOME to determine
[23970]8where the Android SDK lives on your file system, in a similar way
9JAVA_HOME gets used by many programs to determin where Java is
10installed on a particular computer. The key programs we need to run
11from the Android SDK are 'adb' and 'dex'. The most straight forward
12way to control this variable is to:
[23883]13
[23970]14 cp setup-android.bash.in setup-android.bash
15
16and then edit 'setup-android.bash' the value of **ANDROID-SDK-HOME**
17to be the top-level directory of where the Android SDK was installed to.
18
19Having done this, source the main setup file:
20
21 source setup.bash
22
23which automatically sources setup-android.bash if the ANDROID_SDK_HOME
24environment variable isn't set.
25
[23883]26Having sourced the setup file the two main steps are:
27
28 1) Install i-jetty
29
30 2) Install Greenstone3 as a web-app
31 (converting any jar and class files to DEX format)
32
33The first step typically only needs to be done once. The second step is
34composed of three sub-steps, and may require the last two sub-steps to
[23970]35be repeated if the Java code has been modified.
[23883]36
37Step 1
38=======
39
40First, install i-jetty on your Android device. You can do this through
41the Market, or else type:
42
43 adb install i-jetty-2.2-signed.apk
44
45Note: for your Android device to install applications using 'adb' you
46need to have enabled it's application 'Development' mode (under
47Settings->Application)
48
[23970]49*************
50**Important**
51*************
[23883]52
[23970]53Having installed i-jetty, find the application on the Android device
54and launch it (but you don't have to go as far as starting the i-jetty
55server from within this application). Launching i-jetty completes the
56installation of the application by creating the 'jetty' folder on the
57Android's SD-card, and populating it with the default configuration
58files for i-jetty. The 'jetty' folder is needed for your setup procedure
59as it is where Greenstone-3 will be installed to.
60
61
[23883]62Step 2
63======
64
65Next put your Android device into USB disk mode, and set up the necessary files
66to run Greenstone3 as a web-app under i-jetty. The three sub-steps are:
67
68
69Step 2.1
70--------
71
72Transfer the bulk of the <GSDL3SRCHOME>/web structure to the
73<SDCARD>/ijetty/webapps/greenstone3 with:
74
75
76 WEBAPP-ROOT-TO-SDCARD.sh
77
78This script skips any .svn files if present. It also skips installing
79'localsite' as this is rather large -- both in size and in terms of
80the number of files invovled -- so copying is rather slow, and it is
81probably not what you want anyway.
82
83
84Step 2.2
85--------
86
87Convert the class files (includes those stored in jar files) into
88classs.dex with:
89
90 JAVA-TO-DEX.sh
91
92The finished file, which is also by this point zipped up, is left in
93the 'lib' folder.
94
95
96Step 2.3
97--------
98
99Copy classes.zip onto the Android's sd-card
100
101 DEX-TO-SDCARD.sh
102
103This is the final step in getting Greenstone3 setup on an Andoird.
104Switch off the USB disk mode on the Android device. Note: it can take
105a device minute or two "preparing" the sd-card. This can be seen
106on the notification view. Alternativey, if you try to start i-jetty
107before the card is ready, then i-jetty points this out, and offers you
108a 'retry' button.
109
110
111Step 3
112======
113
114Launch i-jetty from my apps area. Then, within i-jetty, start the
115server. Once the "Jetty started" message appears, switch to your
116web-browser application. We've tested the built-in web browser, and
117Mobile Firefox 4.
118
119
120If the Java code to Greenstone3 is changed, then you need to repeat sub-steps
1212.2 and 2.3
122
123
124
125Caveats:
126========
127
1281. Due to difficulties in getting MG and MGPP working on android
129 through the NDK, these are currently not supported. Effectively,
130 the Greenstone3 used needs to be one compiled *without* JNI
131 support.
132
133
1342. Due to a runtime (reflection) error, we had to modify xalan.jar.
135 The modified version of this file is also in the 'jars' folder
136 used in this extension.
137
138
139
140
141
Note: See TracBrowser for help on using the repository browser.