Changeset 13553


Ignore:
Timestamp:
2007-01-10T16:55:20+13:00 (15 years ago)
Author:
shaoqun
Message:

a workable version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/gs3-server.bat

    r13235 r13553  
    22set SERVERLANG=en
    33
     4:: -------- Run the Greenstone 3 Server --------
     5
    46:: This script must be run from within the directory in which it lives
    57if exist gs3-server.bat goto start
    6     if "%SERVERLANG%" == "en" echo This script must be run from the directory in wh
    7 ich it resides.
    8     if "%SERVERLANG%" == "es" echo Este gui<A2>n deber<A0> ejecutarse desde el dire
    9 ctorio en el que reside.
    10     if "%SERVERLANG%" == "fr" echo Ce script doit <88>tre ex<82>cut<82> <85> partir
    11  du r<82>pertoire dans lequel il se trouve.
    12     if "%SERVERLANG%" == "ru" echo <9D><E2><AE><E2> <E1><AA><E0><A8><AF><E2> <A4>
    13 <AE><AB><A6><A5><AD> <A1><EB><E2><EC> <A2><A7><EF><E2> <A8><A7> <A4><A8><E0><A5>
    14 <AA><E2><AE><E0><A8><A8>, <A2> <AA><AE><E2><AE><E0><AE><A9> <AE><AD> <E0><A0>
    15 <E1><AF><AE><AB><AE><A6><A5><AD>
     8    if "%SERVERLANG%" == "en" echo This script must be run from the directory in which it resides.
     9    if "%SERVERLANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
     10    if "%SERVERLANG%" == "fr" echo Ce script doit ˆtre ex‚cut‚ 
 partir du r‚pertoire dans lequel il se trouve.
     11    if "%SERVERLANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
    1612    goto exit
    1713
     14:start
     15if "%OS%" == "Windows_NT" goto findGSDL
     16    :: Invoke a new command processor to ensure there's enough environment space
     17    if "%1" == "Second" goto findGSDL
     18        command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9
     19        goto done
     20
     21:findGSDL
    1822echo.
    19 echo "Greenstone 3 Server"
    20 echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
    21 echo "This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
    22 echo "This is free software, and you are welcome to redistribute it"
    23 echo.
     23if "%SERVERLANG%" == "en" echo Greenstone3 Server
     24if "%SERVERLANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato
     25if "%SERVERLANG%" == "en" echo This program comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
     26if "%SERVERLANG%" == "en" echo This is free software, and you are welcome to redistribute it
    2427
    2528echo.
    26 ::  ---- Determine GSDLHOME ----
     29::  ---- Determine GSDL3HOME ----
    2730set GSDL3PATH=
    2831
    2932:: Some users may set the above line manually
    30 if not "%GSDL3PATH%" == "" goto prepGSDL
     33 if not "%GSDL3PATH%" == "" goto prepGSDL
    3134
    32     :: The default location is the current directory
    33     set GSDL3PATH=.
     35 :: The default location is the current directory
     36 set GSDL3PATH=.
    3437
    35     :: If it is set, use the GSDLHOME environment variable
    36     if "%GSDL3HOME%" == "" goto prepGSDL
    37         set GSDL3PATH=%GSDL3SRCHOME%
     38 :: If it is set, use the GSDLHOME environment variable
     39  if "%GSDL3SRCHOME%" == "" goto prepGSDL
     40  set GSDL3PATH=%GSDL3SRCHOME%
    3841
    3942:prepGSDL
     
    4649set GSDL3PATH=
    4750
    48 findJava
     51:findJava
    4952:: ---- Check Java exists ----
    50 set JAVAPATH=
     53set JAVAPATH=c:\j2sdk1.4.2_12\bin
    5154
    5255:: Some users may set the above line manually
    5356if not "%JAVAPATH%" == "" goto testJava
    5457
    55     :: If it is set, use the JAVA_HOME environment variable
    56     if not "%JAVA_HOME%" == "" goto javahome
     58:: If it is set, use the JAVA_HOME environment variable
     59 if not "%JAVA_HOME%" == "" goto javahome
    5760
    58     :: Check if Java is on the search path
    59     echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat
    60     call setjava.bat
    61     del setjava.bat
    62     if not "%JAVAPATH%" == "" goto testJava
     61:: Check if Java is on the search path
     62 echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat
     63 call setjava.bat
     64 del setjava.bat
     65 if not "%JAVAPATH%" == "" goto testJava
    6366
    6467    :: Still haven't found anything, so try looking in the registry (gulp!)
     
    8992:testJava
    9093:: Check that a Java executable has been found
    91 if "%GLILANG%" == "en" echo Checking Java: %JAVAPATH%
    92 if "%GLILANG%" == "es" echo Revisando Java: %JAVAPATH%
    93 if "%GLILANG%" == "fr" echo V<82>rification de Java: %JAVAPATH%
    94 if "%GLILANG%" == "ru" echo <8F><E0><AE><A2><A5><E0><AA><A0> Java: %JAVAPATH%
    95 if exist "%JAVAPATH%\java.exe" goto checkGLI
     94  if "%SERVERLANG%" == "en" echo Checking Java: %JAVAPATH%
     95  if "%SERVERLANG%" == "es" echo Revisando Java: %JAVAPATH%
     96  if "%SERVERLANG%" == "fr" echo V‚rification de Java: %JAVAPATH%
     97  if "%SERVERLANG%" == "ru" echo à®¢¥àª  Java: %JAVAPATH%
     98  if exist "%JAVAPATH%\java.exe" goto checkServer
    9699
    97100:noJava
    98 echo.
    99 echo Failed to locate an appropriate version of Java. You must install a
    100 echo Java Runtime Environment (version 1.4 or greater) before running the
    101 echo Greenstone Server.
    102 
    103 goto exit
     101 echo.
     102    if "%SERVERLANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a
     103    if "%SERVERLANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the
     104    if "%SERVERLANG%" == "en" echo Greenstone3 Server.
     105    goto exit
    104106
    105107:checkServer
    106 ---- Check that the server program has been compiled ----
     108::---- Check that the server program has been compiled ----
    107109if exist "server.jar" goto runServer
    108 
    109 echo "You need to compile the code before running the server"
     110if "%SERVERLANG%" == "en" echo "You need to compile the code before running the server"
    110111goto exit
    111112
    112113:runServer
    113 
    114114echo Running the Greenstone Server
    115 
    116115:: -Xms32M          To set minimum memory
    117116:: -Xmx32M          To set maximum memory
     
    123122"%JAVAPATH%\java" -cp %CLASSPATH% org.greenstone.server.Server "%GSDL3SRCHOME%"
    124123
     124:exit
     125
     126:done
     127:: ---- Clean up ----
     128set JAVAPATH=
     129
     130
    125131
    126132 
Note: See TracChangeset for help on using the changeset viewer.