Changeset 4947


Ignore:
Timestamp:
2003-07-16T13:58:56+12:00 (21 years ago)
Author:
mdewsnip
Message:

Added check for correct version of javac before attempting to compile.

Location:
trunk/gli
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/makegli.bat

    r4918 r4947  
    11@echo off
     2
     3REM Check that javac exists
     4javac 2> nul
     5if not errorlevel 3 goto javacExists
     6
     7echo Failed to locate Javac. You must install a Java Software Development Kit
     8echo (version 1.4 or greater) before compiling the Greenstone Librarian Interface.
     9goto End
     10
     11:javacExists
     12
     13REM Check that the version of javac is new enough (1.4.0 or higher) to compile the GLI
     14javac -target 1.4 2> nul
     15if not errorlevel 1 goto javacOK
     16
     17echo The version of the Java Software Development Kit you have installed is too
     18echo old to compile the Greenstone Librarian Interface. Please install a new version
     19echo of the Java SDK (version 1.4 or newer) and rerun this script.
     20goto End
     21
     22:javacOK
    223
    324if "%1" == "" goto CompileAll
     
    526:CompileDependant
    627
     28REM If a file has been specified at the command-line, just compile that file
    729echo Compiling %1 and dependant classes
    8 
    930javac -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar %1
    10 
    1131goto End
    1232
    1333:CompileAll
    1434
    15 echo Compiling GLI...
     35REM Otherwise compile the lot...
     36echo Compiling the Greenstone Librarian Interface...
    1637javac -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar src/org/greenstone/gatherer/*.java
    1738javac -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar src/org/greenstone/gatherer/cdm/*.java
     
    3354javac -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar src/org/greenstone/gatherer/util/*.java
    3455javac -d classes/ -sourcepath src/ -classpath classes/;lib/apache.jar;lib/calpa.jar;lib/jp.jar;lib/polloxml.jar;lib/qfslib.jar;lib/skinlf.jar;lib/nanoxml.jar src/org/greenstone/gatherer/valuetree/*.java
     56echo Done!
    3557
    3658:End
    37 echo Done.
    38 
  • trunk/gli/makegli.sh

    r4935 r4947  
    1818fi
    1919
    20 # If a command-line argument has been specified, just compile that file
     20# If a file has been specified at the command-line, just compile that file
    2121if [ ! "x$*" = "x" ] ; then
    2222    echo "Compiling $*"
     
    2626
    2727# Otherwise compile the lot...
    28 echo "Compiling The Greenstone Librarian Interface..."
     28echo "Compiling the Greenstone Librarian Interface..."
    2929javac -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/*.java
    3030javac -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/cdm/*.java
Note: See TracChangeset for help on using the changeset viewer.