Changeset 17501 for gli/trunk/gli.bat


Ignore:
Timestamp:
10/09/08 13:53:59 (12 years ago)
Author:
oranfry
Message:

gli.bat to use the search4j in greenstone rather than glis own search4j (which will soon be deleted)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/gli.bat

    r17474 r17501  
    253253
    254254:findJava
    255 winutil\search4j.exe -m "1.4.0_00" -p "%GSDLHOME%\packages\jre" | winutil\setvar.exe _JRE_HOME > %TMP%\set__jre_home.bat
    256 call "%TMP%\set__jre_home.bat"
    257 del "%TMP%\set__jre_home.bat"
    258 
    259 if "%_JRE_HOME%" == "" goto noJava
    260 echo %_JRE_HOME%\bin | winutil\setvar.exe JAVAPATH > %TMP%\set_javapath.bat
    261 call "%TMP%\set_javapath.bat"
    262 del "%TMP%\set_javapath.bat"
    263 echo JRE:
    264 echo %_JRE_HOME%
    265 echo.
    266 
    267 goto checkGLI
     255    if "%_VERSION%" == "2" (
     256        set SEARCH4J_EXECUTABLE=%GSDLHOME%\bin\windows\search4j.exe
     257        set HINT=%GSDLHOME%\packages\jre
     258    )
     259    if "%_VERSION%" == "3" (
     260        set SEARCH4J_EXECUTABLE=%GSDL3SRCHOME%\bin\search4j.exe
     261        HINT=%GSDL3SRCHOME%\packages\jre
     262    )
     263   
     264    "%SEARCH4J_EXECUTABLE%" -e -m "1.4.0_00" -p "%HINT%" | winutil\setvar.exe JAVA_EXECUTABLE > %TMP%\set_java_executable.bat
     265    call "%TMP%\set_java_executable.bat"
     266    del "%TMP%\set_java_executable.bat"
     267   
     268    if "%JAVA_EXECUTABLE%" == "" goto noJava
     269    echo Java:
     270    echo %JAVA_EXECUTABLE%
     271    echo.
     272
     273    goto checkGLI
     274
     275:noJava
     276    echo.
     277    if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a
     278    if "%GLILANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the
     279    if "%GLILANG%" == "en" echo Greenstone Librarian Interface.
     280
     281    if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Java. Usted deber
     282    if "%GLILANG%" == "es" echo instalar un Ambiente de Ejecuci¢n Java (versi¢n 1.4 o superior)
     283    if "%GLILANG%" == "es" echo antes de correr la Interfaz de la Biblioteca Digital Greenstone.
     284
     285    if "%GLILANG%" == "fr" echo Une version ad?quate de Java n'a pas pu ?tre localis?e. Vous devez
     286    if "%GLILANG%" == "fr" echo installer un Java Runtime Environment (version 1.4 ou sup?rieur)
     287    if "%GLILANG%" == "fr" echo avant de d?marrer Greenstone Librarian Interface.
     288
     289    if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ 宊€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àᚚ Java.
     290    if "%GLILANG%" == "ru" echo ?ë €®«Š­ë ãáâ ­®¢šâì Java Runtime Environment (¢¥àášî 1.4 š«š ¢ëè¥) ¯¥à¥€ ¢¢®€®¬
     291    if "%GLILANG%" == "ru" echo ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  Greenstone.
     292    goto exit
    268293
    269294:checkGLI
     
    326351
    327352:: Run GS3 if version = 3
    328 if "%_VERSION%" == "3" "%JAVAPATH%\java" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -gsdl3 %GSDL3HOME% -gsdl3src %GSDL3SRCHOME% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
     353if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -gsdl3 %GSDL3HOME% -gsdl3src %GSDL3SRCHOME% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
    329354if "%_VERSION%" == "3" goto finRun
    330355
     
    336361
    337362:webLib
    338     "%JAVAPATH%\java" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
     363    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
    339364    if ERRORLEVEL 2 if not "%localLibFailed%" == "true" (
    340365        echo webLib failed, going to localLib
     
    345370
    346371:localLib
    347     "%JAVAPATH%\java" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% -local_library %GSDLHOME%\server.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
     372    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl %GSDLHOME% -gsdlos %GSDLOS% -perl %PERLPATH% -local_library %GSDLHOME%\server.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
    348373    if ERRORLEVEL 2 if not "%webLibFailed%" == "true" (
    349374        echo localLib failed, going to webLib
     
    369394:: ---- Clean up ----
    370395set PERLPATH=
    371 set JAVAPATH=
     396set JAVA_EXECUTABLE=
Note: See TracChangeset for help on using the changeset viewer.