1 | @echo off
|
---|
2 | setlocal enabledelayedexpansion
|
---|
3 |
|
---|
4 | color 0A
|
---|
5 | set startdir=%CD%
|
---|
6 | rem pushd "%CD%"
|
---|
7 | CD /D "%~dp0"
|
---|
8 | set EXPLANG=en
|
---|
9 |
|
---|
10 | if "%EXPMODE%" == "" set EXPMODE=local
|
---|
11 |
|
---|
12 | :: -------- Run the Expeditee Browser --------
|
---|
13 |
|
---|
14 | :: This script must be run from within the directory in which it lives
|
---|
15 | if exist gli.bat goto start
|
---|
16 | if "%EXPLANG%" == "en" echo This script must be run from the directory in which it resides.
|
---|
17 | if "%EXPLANG%" == "es" echo Este gui¢n deber ejecutarse desde el directorio en el que reside.
|
---|
18 | if "%EXPLANG%" == "fr" echo Ce script doit tre excut
|
---|
19 | partir du rpertoire dans lequel il se trouve.
|
---|
20 | if "%EXPLANG%" == "ru" echo â®â áªà¨¯â ¤®«¦¥ ¡ëâì ¢§ïâ ¨§ ¤¨à¥ªâ®à¨¨, ¢ ª®â®à®© ® à ᯮ«®¦¥
|
---|
21 | goto exit
|
---|
22 |
|
---|
23 | :start
|
---|
24 | if "%OS%" == "Windows_NT" goto progName
|
---|
25 | :: Invoke a new command processor to ensure there's enough environment space
|
---|
26 | if "%1" == "Second" goto progName
|
---|
27 | command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
28 | shift
|
---|
29 | goto done
|
---|
30 |
|
---|
31 | :progName
|
---|
32 | if not "%PROGNAME%" == "" goto findExpeditee
|
---|
33 | :: otherwise PROGNAME was not set, so default to the Expeditee Browser program
|
---|
34 | if "%EXPLANG%" == "es" set PROGNAME=Navegador Expeditee
|
---|
35 | if "%EXPLANG%" == "fr" set PROGNAME=Navigateur Expeditee
|
---|
36 | if "%EXPLANG%" == "ru" set PROGNAME=âÒÁÕÚÅÒ Expeditee
|
---|
37 | :: if the PROGNAME is still not set, then set the language to English
|
---|
38 | if "%PROGNAME%" == "" set PROGNAME=Expeditee Browser
|
---|
39 |
|
---|
40 |
|
---|
41 | if "%PROGABBR%" == "" set PROGABBR=Expeditee
|
---|
42 | if "%PROGNAME_EN%" == "" set PROGNAME_EN=Expeditee Browser
|
---|
43 |
|
---|
44 | :: Now need to work out the _VERSION, EXPEDITEE_HOME (and if GS3, then GSDL3SRCHOME and GSDL3HOME)
|
---|
45 | :findExpeditee
|
---|
46 | call findexp.bat
|
---|
47 | if "%EXPEDITEE_HOME%" == "" goto exit
|
---|
48 |
|
---|
49 | :checkUserPermissions
|
---|
50 | echo.
|
---|
51 | echo Checking if the Expeditee frameset directory is writable ...
|
---|
52 | (echo This is a temporary file. It is safe to delete it. > "!EXPEDITEE_HOME!\collect\testing.tmp" ) 2>nul
|
---|
53 | if exist "%EXPEDITEE_HOME%\collect\testing.tmp" goto deleteTempFile
|
---|
54 | if "%1" == "Elevated" goto printWarning
|
---|
55 | echo ... FAILED
|
---|
56 | echo The %PROGNAME% cannot write to the collection directory (!EXPEDITEE_HOME!\collect)
|
---|
57 | echo Requesting elevated status to become admin user to continue.
|
---|
58 | "%EXPEDITEE_HOME%\bin\windows\gstart.exe" %0 Elevated %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
59 | goto done
|
---|
60 |
|
---|
61 | :printWarning
|
---|
62 | echo ... FAILED
|
---|
63 | echo The %PROGNAME% cannot write to the log directory (!EXPEDITEE_HOME!\collect).
|
---|
64 | echo Attempting to continue without permissions.
|
---|
65 | goto shiftElevated
|
---|
66 |
|
---|
67 | :deleteTempFile
|
---|
68 | echo ... OK
|
---|
69 | del "%EXPEDITEE_HOME%\collect\testing.tmp"
|
---|
70 |
|
---|
71 | :shiftElevated
|
---|
72 | :: Shift "Elevated" (one of our own internal command words) out of the way if present
|
---|
73 | :: so the command-line is as it was when the user initiated the command
|
---|
74 | if "%1" == "Elevated" shift
|
---|
75 |
|
---|
76 | :: Make sure we're in the GLI folder, even if located outside a GS installation
|
---|
77 | CD /D "%~dp0"
|
---|
78 |
|
---|
79 | :: Need to find Java. If found, JAVA_EXECUTABLE will be set
|
---|
80 | call findjava.bat
|
---|
81 | if "%JAVA_EXECUTABLE%" == "" goto exit
|
---|
82 |
|
---|
83 |
|
---|
84 | :runExpeditee
|
---|
85 |
|
---|
86 |
|
---|
87 | if not "%EXPEDITEE_HOME%" == "" (
|
---|
88 | echo EXPEDITEE_HOME:
|
---|
89 | echo !EXPEDITEE_HOME!
|
---|
90 | echo.
|
---|
91 | )
|
---|
92 |
|
---|
93 |
|
---|
94 | :: ---- Finally, run Expeditee ----
|
---|
95 | if "%EXPLANG%" == "en" echo Running the %PROGNAME%...
|
---|
96 | if "%EXPLANG%" == "es" echo Ejecutando la %PROGNAME%...
|
---|
97 | if "%EXPLANG%" == "fr" echo Excution de %PROGNAME%
|
---|
98 | if "%EXPLANG%" == "ru" echo ¥ªã騩 ¡¨¡«¨ %PROGNAME%...
|
---|
99 |
|
---|
100 | :: -Xms32M To set minimum memory
|
---|
101 | :: -Xmx32M To set maximum memory
|
---|
102 | :: -verbose:gc To set garbage collection messages
|
---|
103 | :: -Xincgc For incremental garbage collection
|
---|
104 | :: -Xprof Function call profiling
|
---|
105 | :: -Xloggc:<file> Write garbage collection log
|
---|
106 |
|
---|
107 |
|
---|
108 | :: "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%EXPEDITEE_HOME%" -gsdlos %GSDLOS% -gsdl3 "%GSDL3HOME%" -gsdl3src "%GSDL3SRCHOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
109 |
|
---|
110 | set jars=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
|
---|
111 |
|
---|
112 | "%JAVA_EXECUTABLE%" -classpath %jars%;releases\Expeditee.jar org.apollo.ApolloSystem %1 %2 %3 %4 %5 %6 %7 %8 %9
|
---|
113 |
|
---|
114 |
|
---|
115 | :finRun
|
---|
116 | if "%EXPLANG%" == "en" echo Done.
|
---|
117 | if "%EXPLANG%" == "es" echo Hecho.
|
---|
118 | if "%EXPLANG%" == "fr" echo Termin.
|
---|
119 | if "%EXPLANG%" == "ru" echo 믮«¥®.
|
---|
120 | goto done
|
---|
121 |
|
---|
122 |
|
---|
123 | :exit
|
---|
124 | echo.
|
---|
125 | pause
|
---|
126 | color 07
|
---|
127 | rem popd
|
---|
128 |
|
---|
129 | :done
|
---|
130 | :: ---- Clean up ----
|
---|
131 | set JAVA_EXECUTABLE=
|
---|
132 | set EXPMODE=
|
---|
133 | set PROGNAME=
|
---|
134 | set PROGNAME_EN=
|
---|
135 | set PROGFULLNAME=
|
---|
136 | set PROGABBR=
|
---|
137 | color 07
|
---|
138 | rem popd
|
---|
139 | cd "%startdir%"
|
---|
140 | set startdir=
|
---|
141 |
|
---|
142 | endlocal
|
---|