Changeset 31649

2017-05-05T17:23:04+12:00 (7 years ago)

Updated GLI's batch and bash scripts to refer to the new JNA jar files and added a description of these jar files, there purpose, their version and where to get them into the lib/README.txt file.

9 edited


  • main/trunk/gli/client-gli.bat

    r31648 r31649  
    9898    echo Perl and GSDLHOME (!GSDLHOME!) detected. Downloading is enabled.
    9999    echo.
    100     "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl "%GSDLHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
     100    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl "%GSDLHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
    101101    goto finish
    104104echo Since there's no GSDLHOME, client-GLI's download panel will be deactivated.
    105 "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone %1 %2 %3 %4 %5 %6 %7 %8 %9
     105"%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone %1 %2 %3 %4 %5 %6 %7 %8 %9
  • main/trunk/gli/

    r31648 r31649  
    148 # GS2 only requires -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar. GS3 requires more but it doesn't conflict with GS2:
     148# GS2 only requires -classpath classes/:GLI.jar:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar. GS3 requires more but it doesn't conflict with GS2:
    149149if [ "$local_gs" = "false" ]; then
    150150    echo "Since there's no GSDLHOME, client-GLI's download panel will be deactivated."
    151151    echo
    152     $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar:lib/commons-codec-1.3.jar:lib/commons-httpclient-3.1-rc1.jar:lib/commons-logging-1.1.jar $custom_vm_args org.greenstone.gatherer.GathererProg -use_remote_greenstone $*
     152    $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar:lib/commons-codec-1.3.jar:lib/commons-httpclient-3.1-rc1.jar:lib/commons-logging-1.1.jar $custom_vm_args org.greenstone.gatherer.GathererProg -use_remote_greenstone $*
    154154    gsdlos=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    160160    echo "Downloading is enabled."
    161161    echo
    162     $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar:lib/commons-codec-1.3.jar:lib/commons-httpclient-3.1-rc1.jar:lib/commons-logging-1.1.jar $custom_vm_args org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl "$GSDLHOME" -gsdlos $gsdlos $*
     162    $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar:lib/commons-codec-1.3.jar:lib/commons-httpclient-3.1-rc1.jar:lib/commons-logging-1.1.jar $custom_vm_args org.greenstone.gatherer.GathererProg -use_remote_greenstone -gsdl "$GSDLHOME" -gsdlos $gsdlos $*
  • main/trunk/gli/gli.bat

    r31647 r31649  
    182182    )
    184     if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -gsdl3 "%GSDL3HOME%" -gsdl3src "%GSDL3SRCHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
     184    if "%_VERSION%" == "3" "%JAVA_EXECUTABLE%" -cp classes/;GLI.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -gsdl3 "%GSDL3HOME%" -gsdl3src "%GSDL3SRCHOME%" -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
    185185    if ERRORLEVEL 2 (
    186186        goto rungs3
    201201    )
    203     "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" -local_library "%locallib%" %1 %2 %3 %4 %5 %6 %7 %8 %9
     203    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" -local_library "%locallib%" %1 %2 %3 %4 %5 %6 %7 %8 %9
    204204    if ERRORLEVEL 2 (
    205205        goto localLib
    210     "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/qfslib.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
     210    "%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg -gsdl "%GSDLHOME%" -gsdlos %GSDLOS% -perl "%PERLPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9
    211211    if ERRORLEVEL 2 (
    212212        goto webLib
  • main/trunk/gli/

    r30119 r31649  
    133133# basic_command is the cmd string common to both Greenstone 3 and Greenstone 2 execution
    134 #basic_command="$javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg"
     134#basic_command="$javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar org.greenstone.gatherer.GathererProg"
    136136while [ "$stop_gli" = "0" ] ; do
    158158# GS2 webLib
    159159    if [ "$PROGABBR" = "FLI" -o ! -f "$GSDLHOME/" ]; then
    160         "$javapath" -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $custom_vm_args org.greenstone.gatherer.GathererProg -gsdl "$GSDLHOME" -gsdlos $GSDLOS $*
     160        "$javapath" -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $custom_vm_args org.greenstone.gatherer.GathererProg -gsdl "$GSDLHOME" -gsdlos $GSDLOS $*
    161161        exit_status=$?
    162162# GS2 localLib
    163163    else
    164         "$javapath" -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $custom_vm_args org.greenstone.gatherer.GathererProg -gsdl "$GSDLHOME" -gsdlos $GSDLOS -local_library "$GSDLHOME/" $*
     164        "$javapath" -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $custom_vm_args org.greenstone.gatherer.GathererProg -gsdl "$GSDLHOME" -gsdlos $GSDLOS -local_library "$GSDLHOME/" $*
    165165        exit_status=$?
    166166    fi
    167167# GS3
    168168    elif [ "$_version" -eq 3 ]; then   
    169         "$javapath" -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $custom_vm_args org.greenstone.gatherer.GathererProg -gsdl "$GSDLHOME" -gsdlos $GSDLOS -gsdl3 "$GSDL3HOME" -gsdl3src "$GSDL3SRCHOME" $*
     169        "$javapath" -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $custom_vm_args org.greenstone.gatherer.GathererProg -gsdl "$GSDLHOME" -gsdlos $GSDLOS -gsdl3 "$GSDL3HOME" -gsdl3src "$GSDL3SRCHOME" $*
    170170        exit_status=$?
    171171    fi
  • main/trunk/gli/lib/README.txt

    r29730 r31649  
    2 THE apache.jar FILE
     2A. THE apache.jar FILE
    10 Commit r29729 adds the contents of xml-apis.jar (sax) and xercesImpl.jar (both found in GS3/web/WEB-INF/lib else packages/tomcat/lib) into apache.jar, replacing the older xerces and xml-apis contained of apache.jar.
     10Commit r29729 adds the contents of xml-apis.jar (sax) and xercesImpl.jar (both found in GS3/web/WEB-INF/lib else packages/tomcat/lib) into apache.jar, replacing the older xerces and xml-apis contained in apache.jar.
    1111This update was necessary to handle commit r29687 where web.xml was split into web.xml and servlets.xml, with the former including the latter as an entity. GLI needs to use an EntityResolver to work with this, but the older xerces and xml-apis in apache.jar would still result in GLI failing to start, unable to parse web.xml because of the way in which servlets.xml was included. The xercesImpl and xml-apis jars in GS3/web/WEB-INF/lib (copied into packages/tomcat/lib) contain versions of these jars that do make the EntityResolver in GLI work.
     62B. THE jna.jar and jna-platform.jar FILES
     65JNA = Java Native Access. These jar files are used by (in GLI and GS3 src code) to obtain the process ID of external processes launched by Java, so that on Windows, we can use the process ID to get the process IDs of subprocesses that were launched by our external process, and terminate them successfully.
     67Generally, on Windows, process.destroy() only destroys the external process launched by Java. Not subprocesses.
     69SafeProcess now can terminate an external process and any subprocesses it launched, whereas formerly, on Windows, it would leave subprocesses running as orphans. This was noticed when GLI would run on a build, this would launch When the build was cancelled through GLI, the script would be successfully terminated in Windows, but would still run to termination. A windows specific fix has been added for this, so that cancelling a build through GLI on Windows now does what Linux did by default on Java Process.destroy(): terminate any subprocesses launched by the process.
     72The official JNA source code project had been moved to Github when we discovered we needed it. However, the github JNA project hasn't yet made the jar files available, despite its GettingStarted documentation starting with an instruction to download the jna.jar. See
     73 currently uses JNA version 4.1.0, which is from 2013. The jna-4.1.0.jar and jna-platform-4.1.0.jar were made available by the Maven MVN repository and were downloaded from and See also
     76The 2 JNA jar files were renamed to jna.jar and jna-platform.jar and were placed into gli/lib, for GLI's This required an update to the gli/fli and makegli/makejar bash and batch scripts.
     77For the GS3 source code copy of, these files will be placed in web/WEB-INF/lib and may require an update to build.xml for compiling and running.
  • main/trunk/gli/makegli.bat

    r31647 r31649  
    119119    if "%GLILANG%" == "ru" echo Š®¬¯š«šà®¢ ­š¥ %1 š § ¢šáš¬ë¥ ª« ááë...
    121     "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar %1
     121    "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar %1
    123123    if "%GLILANG%" == "en" echo Done!
    140140:: Compile the GLI
    141141:: Sun compiler (tested with 1.5 and 1.6) didn't compile or automatically, so we need to put them in explicitly
    142 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/ src/org/greenstone/gatherer/util/ src/org/greenstone/gatherer/metadata/
    143 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
    144 :: "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
     142"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/ src/org/greenstone/gatherer/util/ src/org/greenstone/gatherer/metadata/
     143"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
     144:: "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
    146146:: Compile the GEMS
    147 "%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/qfslib.jar;;lib/jna.jar;lib/jna-platform.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/gems/
     147"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/jna.jar;lib/jna-platform.jar;lib/qfslib.jar;lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/gems/
    149149:: Compile the standalone programs needed on the server for remote building
  • main/trunk/gli/

    r25683 r31649  
    9999    fi
    101     $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $*
     101    $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar $*
    103103    if [ "$glilang" = "es" ]; then
    130130# Compile the GLI
    131 $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
    132 $javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
    133 #$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
     131$javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
     132$javacpath $JAVACFLAGS -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
     133#$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/
    134134# Compile the GEMS
    135 $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/gems/
     135$javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/jna.jar:lib/jna-platform.jar:lib/qfslib.jar:lib/rsyntaxtextarea.jar src/org/greenstone/gatherer/gems/
    137137# Compile the standalone programs needed on the server for remote building
  • main/trunk/gli/makejar.bat

    r29729 r31649  
    118118  cd jar
    119119  "!JARPATH!\jar" xf ..\lib\apache.jar com org javax
     120  "!JARPATH!\jar" xf ..\lib\jna.jar com
     121  "!JARPATH!\jar" xf ..\lib\jna-platform.jar com
    120122  "!JARPATH!\jar" xf ..\lib\qfslib.jar de
    121123  "!JARPATH!\jar" xf ..\lib\rsyntaxtextarea.jar org
  • main/trunk/gli/

    r29729 r31649  
    4747cd jar
    4848jar xf ../lib/apache.jar com org javax
     49jar xf ../lib/jna.jar com
     50jar xf ../lib/jna-platform.jar com
    4951jar xf ../lib/qfslib.jar de
    5052jar xf ../lib/rsyntaxtextarea.jar org theme.dtd
Note: See TracChangeset for help on using the changeset viewer.