source: trunk/gli/makegli.bat@ 6262

Last change on this file since 6262 was 6262, checked in by jmt12, 20 years ago

Corrected the launching scripts/batch files to say copyright 2003 - at least for 19 more days

  • Property svn:keywords set to Author Date Id Revision
File size: 6.9 KB
Line 
1@echo off
2
3echo
4echo Greenstone Librarian Interface (GLI)
5echo Copyright (C) 2003 Greenstone Digital Libraries, University Of Waikato
6echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
7echo This is free software, and you are welcome to redistribute it
8echo
9
10:: -------- Compile the Greenstone Librarian Interface --------
11
12:: This script must be run from within the directory in which it lives
13if exist makegli.bat goto findJavac
14 echo This script must be run from the directory in which it resides.
15 goto exit
16
17
18:findJavac
19:: ---- Check Javac exists ----
20set JAVACPATH=
21
22:: Some users may set the above line manually
23if not "%JAVACPATH%" == "" goto testJavac
24
25 :: If it is set, use the JAVAHOME environment variable
26 if not "%JAVAHOME%" == "" goto javahome
27
28 :: Check if Javac is on the search path
29 echo %PATH%| winutil\which.exe javac.exe | winutil\setvar.exe JAVACPATH > setjavac.bat
30 call setjavac.bat
31 del setjavac.bat
32 if not "%JAVACPATH%" == "" goto testJavac
33
34 :: Still haven't found anything, so try looking in the registry (gulp!)
35 type nul > jdk.reg
36 regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
37 type jdk.reg > jdk.txt
38 del jdk.reg
39
40 winutil\findjava.exe jdk.txt | winutil\setvar.exe JAVACPATH > setjavac.bat
41 del jdk.txt
42 call setjavac.bat
43 del setjavac.bat
44
45 :: If nothing was found in the registry, we're stuck
46 if "%JAVACPATH%" == "" goto noJavac
47
48 set JAVACPATH=%JAVACPATH%\bin
49 goto testJavac
50
51:javahome
52 set JAVACPATH=%JAVAHOME%\bin
53
54:testJavac
55:: Check that a Javac executable has been found
56echo Checking Javac: %JAVACPATH%
57if exist "%JAVACPATH%\javac.exe" goto checkVer
58
59:noJavac
60 echo.
61 echo Failed to locate an appropriate version of Javac. You must install a
62 echo Java Development Kit (version 1.4 or greater) before compiling the
63 echo Greenstone Librarian Interface.
64 goto exit
65
66:checkVer
67:: Check that the version of Javac is new enough (1.4.0 or higher) to compile the GLI
68"%JAVACPATH%\javac.exe" -Xstdout javacchk.tmp -target 1.4
69if not errorlevel 1 goto makeGLI
70 :: Nasty special code for javac 1.4.2, since it complains about "no source files"
71 find "javac: no source files" javacchk.tmp >nul
72 if not errorlevel 1 goto makeGLI
73 del javacchk.tmp
74 echo.
75 echo The version of the Java Development Kit you have installed is too old
76 echo to compile the Greenstone Librarian Interface. Please install a new
77 echo version of the Java SDK (version 1.4 or newer) and rerun this script.
78 goto exit
79
80
81:makeGLI
82:: ---- Compile the GLI ----
83del javacchk.tmp
84echo.
85
86if "%1" == "" goto makeAll
87 :: If a file has been specified as a command-line argument, just compile that file
88 echo Compiling %1 and dependant classes...
89
90 "%JAVACPATH%\javac.exe" -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
91
92 echo Done!
93 goto done
94
95:makeAll
96:: Otherwise compile the lot...
97echo Compiling the Greenstone Librarian Interface...
98
99"%JAVACPATH%\javac.exe" -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
100"%JAVACPATH%\javac.exe" -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
101"%JAVACPATH%\javac.exe" -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/checklist/*.java
102"%JAVACPATH%\javac.exe" -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/collection/*.java
103"%JAVACPATH%\javac.exe" -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/file/*.java
104"%JAVACPATH%\javac.exe" -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/gui/*.java
105"%JAVACPATH%\javac.exe" -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/gui/border/*.java
106"%JAVACPATH%\javac.exe" -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/gui/metaaudit/*.java
107"%JAVACPATH%\javac.exe" -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/gui/tree/*.java
108"%JAVACPATH%\javac.exe" -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/help/*.java
109"%JAVACPATH%\javac.exe" -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/mem/*.java
110"%JAVACPATH%\javac.exe" -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/msm/*.java
111"%JAVACPATH%\javac.exe" -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/msm/parsers/*.java
112"%JAVACPATH%\javac.exe" -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/shell/*.java
113"%JAVACPATH%\javac.exe" -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/undo/*.java
114"%JAVACPATH%\javac.exe" -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
115"%JAVACPATH%\javac.exe" -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
116
117echo Done!
118goto done
119
120:exit
121echo.
122pause
123
124:done
125:: ---- Clean up ----
126set JAVACPATH=
Note: See TracBrowser for help on using the repository browser.