source: trunk/script/expeditee@ 524

Last change on this file since 524 was 524, checked in by davidb, 11 years ago

Initial cut at scripts for running Expeditee for Unix and Windows

  • Property svn:executable set to *
File size: 4.8 KB
Line 
1#!/bin/bash
2
3if [ ! -z $explang ] ; then
4 explang=en
5fi
6
7if [ "x$PROGNAME" = "x" ] ; then
8 if [ "$explang" = "es" ]; then
9 PROGNAME="Navegador Expeditee"
10 elif [ "$explang" = "fr" ]; then
11 PROGNAME="Navigateur Expeditee"
12 elif [ "$explang" = "ru" ]; then
13 PROGNAME="ÉÎÔÅÒÆÅÊÓ Expeditee"
14 else
15 PROGNAME="Expeditee Browser"
16 fi
17fi
18
19if [ "x$PROGABBR" = "x" ] ; then
20 PROGABBR="Expeditee"
21fi
22
23if [ "x$PROGNAME_EN" = "x" ] ; then
24 PROGNAME_EN="Expeditee Browser"
25fi
26
27if [ "x$EXPMODE" = "x" ] ; then
28 EXPMODE="local"
29fi
30
31echo
32if [ "$explang" = "es" ]; then
33 echo "Interfaz de la $PROGNAME ($PROGNAME_EN - $PROGABBR)"
34 echo "Copyright (C) 2013, New Zealand Digital Library Project, University Of Waikato"
35 echo "La Interfaz de la $PROGNAME NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA."
36 echo "Para mayor información vea los términos de la licencia en LICENSE.txt"
37 echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita"
38elif [ "$explang" = "fr" ]; then
39 echo "Interface du $PROGNAME ($PROGNAME_EN - $PROGABBR)"
40 echo "Copyright (C) 2013, New Zealand Digital Library Project, University Of Waikato"
41 echo "$PROGABBR est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"
42 echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer"
43elif [ "$explang" = "ru" ]; then
44 echo "âÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME ($PROGNAME_EN - $PROGABBR)"
45 echo "Copyright (C) 2013, New Zealand Digital Library Project, University Of Waikato"
46 echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT"
47 echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ"
48else
49 echo "$PROGNAME ($PROGABBR)"
50 echo "Copyright (C) 2013, New Zealand Digital Library Project, University Of Waikato"
51 echo "$PROGABBR comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
52 echo "This is free software, and you are welcome to redistribute it"
53fi
54echo
55
56## -------- Run the Expeditee Browser --------
57# This script is designed to be run from its own directory (instead of whichever directory it may be called from)
58# => Work out where that is, and 'cd' there
59thisdir="`dirname \"$0\"`"
60thisdir="`cd \"$thisdir\" && pwd`"
61cd "$thisdir"
62
63
64## ---- Determine EXPEDITEE_HOME ----
65# need to source a script in order to inherit the env vars it has set
66# Exit on error code (non-zero)
67exit_status=0
68#source ./findexpeditee.sh
69#exit_status=$?
70#if [ "$exit_status" -eq 1 ]; then
71# exit 1;
72#fi
73
74## ---- Check Java ----
75# call the script with source, so that we have the variables it sets ($javapath)
76#exit_status=0
77#source ./findjava.sh "$explang" "$PROGNAME"
78#exit_status=$?
79#if [ "$exit_status" -eq 1 ]; then
80# exit 1;
81#fi
82
83## ---- Finally, run Expeditee ----
84if [ "$explang" = "es" ]; then
85 echo "Ejecutando la Interfaz de la $PROGNAME..."
86elif [ "$explang" = "fr" ]; then
87 echo "Exécution de $PROGNAME..."
88elif [ "$explang" = "ru" ]; then
89 echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME..."
90else
91 echo "Running the $PROGNAME..."
92fi
93
94# basic_command is the cmd string to execution is
95# basic_command="$javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg"
96
97
98# Other arguments you can provide to GLI to work around memory limitations, or debug
99# -Xms<number>M To set minimum memory (by default 32MB)
100# -Xmx<number>M To set maximum memory (by default the nearest 2^n to the total remaining physical memory)
101# -verbose:gc To set garbage collection messages
102# -Xincgc For incremental garbage collection (significantly slows performance)
103# -Xprof Function call profiling
104# -Xloggc:<file> Write garbage collection log
105
106# -Xdock:name To set the name of the app in the MacOS Dock bar
107# -Xdock:icon Path to the MacOS Doc icon (not necessary for GS)
108
109
110custom_vm_args=""
111if [ "$EXPOS" = "darwin" ]; then
112 custom_vm_args="-Xdock:name=$PROGABBR"
113fi
114
115#"$javapath" -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $custom_vm_args org.greenstone.gatherer.GathererProg -gsdl "$GSDLHOME" -gsdlos $GSDLOS -gsdl3 "$GSDL3HOME" -gsdl3src "$GSDL3SRCHOME" $*
116
117
118
119jars='jars/JEP.jar:jars/JFreeCharts.jar:jars/activation.jar:jars/cobra.jar:jars/ext:jars/iText-2.1.3.jar:jars/jazzy-core.jar:jars/jcommon-1.0.13.jar:jars/js.jar:jars/lobo-pub.jar:jars/lobo.jar:jars/mail.jar:jars/xercesImpl.jar'
120
121jars="$jars:releases/Expeditee.jar"
122
123cygpath 2>/dev/null
124if [ $? != 0 ] ; then
125 jars=`cygpath -wp "$jars"`
126fi
127
128#java -classpath "$jars" org.expeditee.gui.Browser $*
129
130cd "$EXPEDITEE_HOME"
131java -classpath releases\\Expeditee.jar org.expeditee.gui.Browser $*
132
133
134
135if [ "$explang" = "es" ]; then
136 echo "Hecho."
137elif [ "$explang" = "fr" ]; then
138 echo "Terminé."
139elif [ "$explang" = "ru" ]; then
140 echo "÷ÙÐÏÌÎÅÎÏ."
141else
142 echo "Done."
143fi
Note: See TracBrowser for help on using the repository browser.