source: gli/trunk/findjava.bat@ 19338

Last change on this file since 19338 was 19336, checked in by ak19, 15 years ago

client-gli.bat and gli.bat both go through the findjava part of the script, so moved this into a separate scriptfile that can be called by both.

File size: 1.9 KB
Line 
1@echo off
2
3:: Environment Variables passed in: _VERSION and GLILANG
4:: As a result of executing this script, the JAVA_EXECUTABLE variable
5:: will be set, but only if Perl was found.
6
7
8:findJava
9 if "%_VERSION%" == "2" (
10 set SEARCH4J_EXECUTABLE=%GSDLHOME%\bin\windows\search4j.exe
11 set HINT=%GSDLHOME%\packages\jre
12 )
13 if "%_VERSION%" == "3" (
14 set SEARCH4J_EXECUTABLE=%GSDL3SRCHOME%\bin\search4j.exe
15 set HINT=%GSDL3SRCHOME%\packages\jre
16 )
17
18 "%SEARCH4J_EXECUTABLE%" -e -m "1.4.0_00" -p "%HINT%" | winutil\setvar.exe JAVA_EXECUTABLE > %TMP%\set_java_executable.bat
19 call "%TMP%\set_java_executable.bat"
20 del "%TMP%\set_java_executable.bat"
21
22 if "%JAVA_EXECUTABLE%" == "" goto noJava
23 echo Java:
24 echo %JAVA_EXECUTABLE%
25 echo.
26
27:: found java, JAVA_EXECUTABLE env var set, can exit this script
28 goto exit
29
30:noJava
31 echo.
32 if "%GLILANG%" == "en" (
33 echo Failed to locate an appropriate version of Java. You must install a
34 echo Java Runtime Environment ^(version 1.4 or greater^) before running the
35 echo Greenstone Librarian Interface.
36 )
37
38 if "%GLILANG%" == "es" (
39 echo No se pudo localizar una versi¢n apropiada de Java. Usted deber
40 echo instalar un Ambiente de Ejecuci¢n Java ^(versi¢n 1.4 o superior^)
41 echo antes de correr la Interfaz de la Biblioteca Digital Greenstone.
42 )
43
44 if "%GLILANG%" == "fr" (
45 echo Une version ad?quate de Java n'a pas pu ?tre localis?e. Vous devez
46 echo installer un Java Runtime Environment ^(version 1.4 ou sup?rieur^)
47 echo avant de d?marrer Greenstone Librarian Interface.
48 )
49
50 if "%GLILANG%" == "ru" (
51 echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ 宊€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àᚚ Java.
52 echo ?ë €®«Š­ë ãáâ ­®¢šâì Java Runtime Environment ^(¢¥àášî 1.4 š«š ¢ëè¥^) ¯¥à¥€ ¢¢®€®¬
53 echo ¡š¡«š®â¥ç­®£® š­â¥à䥩á Greenstone.
54 )
55 goto exit
56
57:exit
58set SEARCH4J_EXECUTABLE=
Note: See TracBrowser for help on using the repository browser.