source: trunk/script/expeditee.bat

Last change on this file was 1018, checked in by davidb, 8 years ago

Change to running 'ApolloSystem' as Java main, as this give you Expeditee PLUG Music capability

  • Property svn:executable set to *
File size: 4.6 KB
Line 
1@echo off
2setlocal enabledelayedexpansion
3
4color 0A
5set startdir=%CD%
6rem pushd "%CD%"
7CD /D "%~dp0"
8set EXPLANG=en
9
10if "%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
15if 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 ex‚cut‚ …
19 partir du r‚pertoire dans lequel il se trouve.
20 if "%EXPLANG%" == "ru" echo â®â áªà¨¯â ¤®«¦¥­ ¡ëâì ¢§ïâ ¨§ ¤¨à¥ªâ®à¨¨, ¢ ª®â®à®© ®­ à á¯®«®¦¥­
21 goto exit
22
23:start
24if "%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
32if 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
41if "%PROGABBR%" == "" set PROGABBR=Expeditee
42if "%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
46call findexp.bat
47if "%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
77CD /D "%~dp0"
78
79:: Need to find Java. If found, JAVA_EXECUTABLE will be set
80call findjava.bat
81if "%JAVA_EXECUTABLE%" == "" goto exit
82
83
84:runExpeditee
85
86
87if not "%EXPEDITEE_HOME%" == "" (
88 echo EXPEDITEE_HOME:
89 echo !EXPEDITEE_HOME!
90 echo.
91)
92
93
94:: ---- Finally, run Expeditee ----
95if "%EXPLANG%" == "en" echo Running the %PROGNAME%...
96if "%EXPLANG%" == "es" echo Ejecutando la %PROGNAME%...
97if "%EXPLANG%" == "fr" echo Ex‚cution de %PROGNAME%
98if "%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
110set 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
124echo.
125pause
126color 07
127rem popd
128
129:done
130:: ---- Clean up ----
131set JAVA_EXECUTABLE=
132set EXPMODE=
133set PROGNAME=
134set PROGNAME_EN=
135set PROGFULLNAME=
136set PROGABBR=
137color 07
138rem popd
139cd "%startdir%"
140set startdir=
141
142endlocal
Note: See TracBrowser for help on using the repository browser.