root/main/trunk/gli/makejar.sh @ 29729

Revision 29729, 2.9 KB (checked in by ak19, 5 years ago)

First part of commit fixing up GLI to work with commit of reviosion 29687. In revision 29687 web.xml got split into web.xml and servlets.xml, which the first included as an entity. GLI parses web.xml and other XML files on startup, and now requires an EntityResolver? to parse the inclusion of servlets.xml in web.xml. The use of an EntityResolver? when parsing web.xml was also required in the GS3 server application code (in GS3/src/java), and worked there. The same change however didn't work in GLI, because the xerces and xml-apis (sax) classes used by GLI were not the same as what the GS3 server code used. The contents of xercesImpl.jar and xml-apis.jar used by GS3 have now replaced what was there in the older apache.jar, the rest of the contents are the same as before because they don't seem to be tightly coupled with the xerces and xml-apis parts of the apache.jar contents, whereas these two are.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/bin/sh
2glilang=en
3
4
5# This script must be run from within the directory in which it lives
6thisdir=`pwd`
7if [ ! -f "${thisdir}/makejar.sh" ]; then
8    if [ "$glilang" = "es" ]; then
9        echo "Este guión deberá ejecutarse desde el directorio en el que reside."
10    elif [ "$glilang" = "fr" ]; then
11    echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
12    elif [ "$glilang" = "ru" ]; then
13    echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
14    else
15    echo "This script must be run from the directory in which it resides."
16    fi
17    exit 1
18fi
19
20echo "Generating the JAR files for Remote Greenstone"
21
22## ---- Check that the GLI has been compiled ----
23if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ]; then
24    echo
25    if [ "$glilang" = "es" ]; then
26    echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
27    echo "(por medio de makegli.sh) antes de ejecutar este guión."
28    elif [ "$glilang" = "fr" ]; then
29    echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)"
30    echo "avant d'exécuter ce script."
31    elif [ "$glilang" = "ru" ]; then
32    echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
33    echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
34    else
35    echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)"
36    echo "before running this script."
37    fi
38    exit 1
39fi
40
41echo "Assuming that Java code is freshly compiled..."
42
43rm -rf jar
44mkdir jar
45
46# GLI class files and supporting libraries
47cd jar
48jar xf ../lib/apache.jar com org javax
49jar xf ../lib/qfslib.jar de
50jar xf ../lib/rsyntaxtextarea.jar org theme.dtd
51cd ..
52
53# Copy the latest version of the GLI classes into the jar directory
54rm -rf jar/org/greenstone
55cp -r classes/org/greenstone jar/org
56
57# Some of the things to go into the JAR file are optional, and may not exist
58if [ -f collect.zip ]; then
59  cp collect.zip jar
60fi
61
62# Recreate the metadata.zip file (contains the GLI metadata directory)
63rm -f metadata.zip
64zip -r jar/metadata.zip metadata >/dev/null
65
66# Dictionary files
67cd classes
68for dict_file in dictionary*.properties; do
69    cp $dict_file ../jar
70done
71cd ..
72
73# Other required directories and files
74cp -r 'help' jar
75cp -r 'classes/images' jar
76cp -r 'classes/xml' jar
77cp 'classes/feedback.properties' jar
78cp '.java.policy' jar
79
80# Clean .svn dirs
81find jar -name '.svn' -type d -exec rm -rf {} \; 2> /dev/null
82
83# Jar everything up
84cd jar
85jar cf ../GLI.jar *
86cd ..
87
88# Generate the GLIServer.jar file for remote building
89jar cf GLIServer.jar -C jar org/greenstone/gatherer/remote
90
91# ---- Make signed JAR file for the applet, if desired ----
92if [ "$1" = "-sign" ]; then
93    rm -f SignedGatherer.jar
94    echo "greenstone" | jarsigner -keystore .greenstonestore -signedjar SignedGatherer.jar GLI.jar privateKey 2> /dev/null
95    echo
96    echo "Installing SignedGatherer in ../bin/java"
97    mv SignedGatherer.jar ../bin/java/.
98fi
Note: See TracBrowser for help on using the browser.