Changeset 20655


Ignore:
Timestamp:
2009-09-21T14:29:59+12:00 (15 years ago)
Author:
ak19
Message:

Updated in sync with the changes Katherine just made to gs2-server.sh and findjava.sh (JAVA_HOME\bin added to the PATH) before launching the webserver so that apache can pass it on to the lucene indexers.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/findjava.bat

    r20636 r20655  
    11@echo off
    22
    3 :: Environment Variables passed in: _VERSION, GLILANG and
    4 :: possibly also GSDLHOME and/or GSDL3SRCHOME.
    5 :: As a result of executing this script, the JAVA_EXECUTABLE variable
    6 :: will be set, but only if Perl was found.
     3:: Environment Variables passed in: _VERSION, GLILANG and possibly also
     4:: GSDLHOME and/or GSDL3SRCHOME.
     5:: As a result of executing this script, the JAVA_EXECUTABLE and GS_JAVA_HOME
     6:: environment variables will be set, but only if Perl was found.
    77
    88:findJava
     
    4040    echo.
    4141
    42 :: found java, JAVA_EXECUTABLE env var set, can exit this script
     42    :: we know that works, so we can set the local javahome (for Greenstone) as well
     43    "%SEARCH4J_EXECUTABLE%" -m "%MIN_VERSION%" -p "%HINT%" | winutil\setvar.exe GS_JAVA_HOME > %TMP%\set_java_home.bat
     44    call "%TMP%\set_java_home.bat"
     45    del "%TMP%\set_java_home.bat"
     46
     47:: found java, JAVA_EXECUTABLE and GS_JAVA_HOME env vars set, can exit this script
    4348    goto exit
    4449
     
    5863    :: Try to use this version
    5964    set JAVA_EXECUTABLE=%JAVA_HOME%\bin\java
     65    set GS_JAVA_HOME=%JAVA_HOME%
    6066    goto exit
    6167
  • gli/trunk/findjava.sh

    r20636 r20655  
    1515    # There is a JAVA_HOME already set, we're going to try using that
    1616    javapath="$JAVA_HOME/bin/java"
    17 
     17    javahome="$JAVA_HOME"
    1818    # Print a warning that we're going to use whatever JAVA_HOME is set (fingers crossed)
    1919    if [ "x$gslang" = "x" -o "$gslang" = "en" ]; then
     
    7575   
    7676    javapath="`"$SEARCH4J_EXECUTABLE" -e -p "$HINT" -m $MINIMUM_JAVA_VERSION`"
     77    javahome="`"$SEARCH4J_EXECUTABLE" -p "$HINT" -m $MINIMUM_JAVA_VERSION`"
    7778
    7879    if [ "$?" != "0" ]; then
  • gsdl/trunk/findjava.sh

    r20650 r20655  
    6868    # Give search4j a hint to find Java depending on the platform
    6969    if [ $GSDLOS = linux ]; then
    70     HINT=`cd $GSDLHOME;pwd`/packages/jre
     70    HINT=`cd "$GSDLHOME";pwd`/packages/jre
    7171    elif [ $GSDLOS = darwin ]; then
    7272    HINT=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
     
    132132    SEARCH4J_EXECUTABLE=search4j   
    133133elif [ -x "$GSDLHOME/bin/$GSDLOS/search4j" ]; then
    134     SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j
     134    SEARCH4J_EXECUTABLE="$GSDLHOME/bin/$GSDLOS/search4j"
    135135elif [ -x "$GSDL3SRCHOME/bin/$GSDLOS/search4j" ]; then
    136     SEARCH4J_EXECUTABLE=$GSDL3SRCHOME/bin/search4j
     136    SEARCH4J_EXECUTABLE="$GSDL3SRCHOME/bin/search4j"
    137137elif [ -x "../bin/$GSDLOS/search4j" ]; then
    138138    SEARCH4J_EXECUTABLE=../bin/$GSDLOS/search4j
  • gsdl/trunk/gs2-server.bat

    r20635 r20655  
    3232   pushd "%gsdl2path%"
    3333   call setup.bat
    34 ::   echo **** GSDLOS: %GSDLOS% and GSDLHOME: %GSDLHOME%
     34rem   echo **** GSDLOS: %GSDLOS% and GSDLHOME: %GSDLHOME%
    3535   popd
    3636)
     
    116116:: ---- Check Java ----
    117117:chkjava
    118 :: call the script with source, so that we have the variables it sets ($javapath)
     118:: call the script with source, so that we have the variables JAVA_EXECUTABLE and GS_JAVA_HOME it sets
    119119set exit_status=0
    120120:: Need to find Java. If found, JAVA_EXECUTABLE will be set
     
    122122call "%GSDLHOME%\findjava.bat"
    123123if "%JAVA_EXECUTABLE%" == "" echo **** No Java executable found& goto exit
     124set PATH=%GS_JAVA_HOME%\bin;%PATH%
    124125
    125126
Note: See TracChangeset for help on using the changeset viewer.