Ignore:
Timestamp:
2009-05-11T17:40:54+12:00 (15 years ago)
Author:
ak19
Message:

3 changes. 1. Moved GLI.bat's the finding and setting of GSDLHOME (and GSDL3SRCHOME and GSDL3HOME) into a separate batfile: findgsdl.bat. 2. This bat file is now called by both gli.bat and client-gli.bat, since client-bat can from now on use the same logice to locate a local GS installation. The only difference is that if GSDLHOME is not found, then client-gli runs as before: no Download panel. 3. Client-gli.bat will not look for a gs2build directory located inside a client-gli checkout, but instead search for a local GSDLHOME (including in the directory directly above, in case client-gli.bat is run from a normal GS checkout. IF a GSDLHOME is found (and perl too), then client-gli will enable the Download panel - using the local GSDLHOME to do the downloading.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/client-gli.bat

    r19381 r19388  
    33CD /D "%~dp0"
    44set GLILANG=en
     5set GLIMODE=client
    56
    6 if "%PROGNAME" == "" set PROGNAME=Greenstone
     7if "%PROGNAME%" == "" set PROGNAME=Greenstone
    78
    8 if not "%PROGFULLNAME" == "" goto setvars
     9if not "%PROGFULLNAME%" == "" goto setvars
    910if "%GLILANG%" == "es" set PROGFULLNAME="Biblioteca Digital Greenstone" 
    1011if "%GLILANG%" == "fr" set PROGFULLNAME="Bibliothécaire Greenstone"
     
    3738
    3839:findGSDL
    39 echo.
    40 if "%GLILANG%" == "en" echo %PROGNAME_EN% (%PROGABBR%)
    41 if "%GLILANG%" == "en" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
    42 if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
    43 if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
    44 
    45 if "%GLILANG%" == "es" echo Interfaz de la %PROGFULLNAME% (%PROGNAME_EN% - %PROGABBR%)
    46 if "%GLILANG%" == "es" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
    47 if "%GLILANG%" == "es" echo La Interfaz de la %PROGFULLNAME% NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
    48 if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt
    49 if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
    50 
    51 if "%GLILANG%" == "fr" echo Interface du %PROGFULLNAME% (%PROGNAME_EN% - %PROGABBR%)
    52 if "%GLILANG%" == "fr" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
    53 if "%GLILANG%" == "fr" echo %PROGABBR% est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt
    54 if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚
    55  le redistribuer
    56 
    57 if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á %PROGNAME% (%PROGNAME_EN% - %PROGABBR%)
    58 if "%GLILANG%" == "ru" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
    59 if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
    60 if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£®
    61 
    62 
    63 :: If there's a gs2build directory nested inside client-gli, then we can
    64 :: download and build locally, but ONLY if we have perl. Else building
    65 :: will have to be done remotely. If Perl is found, PERLPATH will be set.
    66 if not exist gs2build\nul goto findJava
     40:: Try to detect a local GSDLHOME installation (gs2build). If none can be
     41:: found, then client-gli won't have a download panel. We're calling
     42:: findgsdl.bat purely for knowing if there's a GSDLHOME around and to set and
     43:: use that for downloading. If there IS a local GSDLHOME, then we can download
     44:: (and build) locally, but ONLY if we have perl. Else downloading and building
     45:: will have to be done remotely anyway. If Perl is found, PERLPATH will be set.
     46call findgsdl.bat
     47if "%GSDLHOME%" == "" goto findJava
    6748    call findperl.bat
    6849
     
    10990
    11091
    111 :: If there was a gs2build directory inside the client-gli folder, we'd have looked for Perl.
    112 :: If we had found Perl, PERLPATH would have been set. If no perl, can't download or build locally
    113 :: on the client side. If we have Perl, pass the gs2build dir with the -gsdl flag and the PERLPATH.
    114 if "%PERLPATH%" == "" goto :nogsdl
    115     "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl %~dp0gs2build -perl %PERLPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
     92:: If there a local GS2 installation (GSDLHOME set), we'd have looked for Perl. If we had
     93:: found Perl, PERLPATH would have been set. If no perl, can't download or build locally on
     94:: the client side. If we have Perl, pass the gs2build dir with the -gsdl flag and the PERLPATH.
     95if "%PERLPATH%" == "" goto nogsdl
     96    echo Perl and GSDLHOME (%GSDLHOME%) detected. Downloading is enabled.
     97    echo.
     98    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl "%GSDLHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
    11699    goto finish
    117100
    118101:nogsdl
     102echo Since there's no GSDLHOME, client-GLI's download panel will be deactivated.
    119103"%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone %1 %2 %3 %4 %5 %6 %7 %8 %9
    120104
     
    133117:: ---- Clean up ----
    134118set PERLPATH=
    135 set JAVAPATH=
    136119set JAVA_EXECUTABLE=
     120set GLIMODE=
     121set PROGNAME=
     122set PROGNAME_EN=
     123set PROGFULLNAME=
     124set PROGABBR=
    137125popd
Note: See TracChangeset for help on using the changeset viewer.