Changeset 26684
- Timestamp:
- 2013-01-11T15:40:23+13:00 (11 years ago)
- Location:
- gs3-extensions/android-war/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/android-war/trunk/src
- Property svn:externals set to
-
gs3-extensions/android-war/trunk/src/README.txt
r26521 r26684 1 1 2 2 Greenstone3 Runtime on Android 3 (NEWER README FILE) 3 4 ============================== 4 5 … … 26 27 Having sourced the setup file the two main steps are: 27 28 28 1) Install i-jetty on the Android device 29 1) Install i-greenstone-server on the Android device 30 (in order to do this you must checkout on SVN the extension 31 "i-greenstone-server", which has its own seperate README.txt 32 in order to build the application) 29 33 30 2) Install Greenstone3 as a web-app application on Andoird device 34 2) Install Greenstone3 as a web-app application for i-greenstone-server, for 35 your Android device. 36 37 Step 1 38 -------- 31 39 32 The first step typically only needs to be done once. 40 First, install i-greenstone-server on your Android device. You can do this by 41 typing in your terminal: 33 42 34 35 The key task for the second step is to transfer greenstone3's "web" 36 directory to /sdcard/jetty/webapps/ on the Android device. In 37 principle that would be: 38 39 <GSDL3SRCHOME>/web -> <ANDROID-DEVICE>:/sdcard/jetty/webapps/greenstone3 40 41 However we need to convert all the Java code (which lurks in Jar 42 files) in the "web" folder into DEX-byte-code equivalents first. We 43 therefore break this step of the installation down into sub-steps (see 44 below). In overview, we create a "webapps" folder in the *extension* 45 folder, where we copy the static file content of "web" to (i.e., the 46 non-Java stuff). We then top that up with Dexified versions of the 47 Java code. Finally the whole "webapps/greenstone3" folder in the 48 extensions area is copied over to the Android device. 49 50 51 Step 1 52 ======= 53 54 First, install i-jetty on your Android device. You can do this through 55 the Market, or else type: 56 57 adb install i-jetty-3.1-signed-aligned.apk 58 43 adb install i-jetty-3.1-aligned.apk 44 59 45 Note: for your Android device to install applications using 'adb' you 60 46 need to have enabled it's application 'Development' mode (under … … 65 51 ************* 66 52 67 Having installed i- jetty, find the application on the Android device68 and launch it (but you don't have to go as far as starting the i- jetty69 server from within this application). Launching i- jettycompletes the70 installation of the application by creating the ' jetty' folder on the53 Having installed i-greenstone-server, find the application on the Android device 54 and launch it (but you don't have to go as far as starting the i-greenstone 55 server from within this application). Launching i-greenstone-server completes the 56 installation of the application by creating the 'greenstone' folder on the 71 57 Android's SD-card, and populating it with the default configuration 72 files for i-jetty. The 'jetty' folder is needed for your setup procedure 73 as it is where Greenstone-3 will be installed to. 74 58 files for i-greenstone-server. The 'jetty' folder is needed for your 59 setup procedure as it is where Greenstone-3 will be installed to. 75 60 76 61 Step 2 77 ====== 62 -------- 78 63 79 Next put your Android device into USB disk mode, and set up the necessary files 80 to run Greenstone3 as a web-app under i-jetty. The three sub-steps are: 81 82 83 Step 2.1 84 -------- 64 (This usually only needs to be done once.) 85 65 86 66 Transfer the bulk of the <GSDL3SRCHOME>/web structure to the preparation … … 98 78 the "webapps/greenstone3/sites/localsite/collect/" area. 99 79 100 Step 2.280 Step 3 101 81 -------- 102 82 … … 111 91 where it needs to be to work when installed on the Android device. 112 92 113 114 Step 2.3 93 Step 4 115 94 -------- 116 95 117 Copy Greenstone3's webapps folder onto the Android device's sd-card: 96 Right now we have a fresh new "webapps/greenstone3/" that we've created. 97 Now there's two things you can do - you can either create a 98 JAR file out of this webapps/greenstone3 (which is Step 4A), 118 99 119 ./IJETTY-PUSH.sh webapps/greenstone3 100 **OR** 120 101 121 This is the final step in getting Greenstone3 setup on an Andoird. 122 Switch off the USB disk mode on the Android device. Note: it can take 123 a device minute or two "preparing" the sd-card. This can be seen on 124 the notification view. Alternativey, if you try to start i-jetty 125 before the card is ready, then i-jetty points this out, and offers you 126 a 'retry' button. 102 You can directly push the webapp into the greenstone/webapps directory 103 on the SD card of your Android phone (which is Step 4B). 104 105 (Note: You'd probably only want to do Step 4A if you were also working with 106 the source code for i-greenstone-server.) 127 107 128 108 129 Step 3 130 ====== 109 Step 4A 110 -------- 131 111 132 Launch i-jetty from my apps area. Then, within i-jetty, start the 133 server. Once the "Jetty started" message appears, switch to your 134 web-browser application. We've tested the built-in web browser, and 135 Mobile Firefox 4. 136 ==== 112 Assuming you have Java's bin folder already on your classpath, cd into 113 the folder "webapps" and then run the script: 137 114 138 If the compiled Java code to Greenstone3 has changed, then you need to 139 repeat sub-steps 2.2 and 2.3. Transfering just the newly 140 dexified code can be achieved more quickly by entering: 141 142 ./IJETTY-PUSH.sh webapps/greenstone3/WEB-INF/lib 115 ./create-jar.sh 116 117 The result of this script is a newly created "webapps_greenstone.jar", which 118 you would put in the <GSDL3SRCHOME>/ext/i-greenstone-server/CUSTOMIZATION/assets 119 folder. That way, when it comes to compiling a fresh new i-greenstone-server, 120 it will come pre-bundled with the jar file. 121 122 123 **OR** 124 125 126 Step 4B 127 -------- 128 129 Copy Greenstone3's webapps folder onto the Android device's sd-card: 130 131 ./IJETTY-PUSH.sh webapps/greenstone3 132 133 This is the final step in getting Greenstone3 setup on an Andoird. 134 Switch off the USB disk mode on the Android device. Note: it can take 135 a device minute or two "preparing" the sd-card. This can be seen on 136 the notification view. Alternatively, if you try to start i-greenstone-server 137 before the card is ready, then i-greenstone-server points this out, 138 and offers you a 'retry' button. 139 140 Launch i-greenstone-server from my apps area. Then, within i-greenstone-server, 141 start the server. Once the "Jetty started" message appears, switch to your 142 web-browser application. We've tested the built-in web browser, and 143 Mobile Firefox 4. 144 145 By default, the URL you would navigate to is: 146 http://localhost:8080/ 147 148 As of this time of writing (10th January 2013), when you access the 149 Greenstone3 page (i.e. http://localhost:8080/greenstone3) you want to access 150 the "basic servlet", which is the 3rd link from the top. 151 152 ==== 153 154 If the compiled Java code to Greenstone3 has changed, then you need to 155 repeat sub-steps 2.2 and 2.3. Transfering just the newly 156 dexified code can be achieved more quickly by entering: 157 158 ./IJETTY-PUSH.sh webapps/greenstone3/WEB-INF/lib 143 159 144 160 … … 154 170 The modified version of this file is also in the 'modified-jars' 155 171 folder used in this extension. 172 173 3. This Greenstone3 web app has failed to work on some phones. Upon 174 accessing an individual article in the "basic servlet" (i.e. 175 http://localhost:8080/greenstone3/basic-library) we get a stack overflow 176 error. This has not happened on newer Android phones, leading us to 177 believe that this web app may only work on Android 4.0+ OS, or on 178 newer hardware. 156 179 157 180
Note:
See TracChangeset
for help on using the changeset viewer.