1 | @echo off
|
---|
2 | set GLILANG=en
|
---|
3 |
|
---|
4 |
|
---|
5 | :: -------- Generate documentation for the Greenstone Librarian Interface --------
|
---|
6 |
|
---|
7 | :: This script must be run from within the directory in which it lives
|
---|
8 | if exist document.bat goto findJavadoc
|
---|
9 | if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
|
---|
10 | if "%GLILANG%" == "fr" echo Ce script doit tre excut
|
---|
11 | partir du rpertoire dans lequel il se trouve.
|
---|
12 | goto exit
|
---|
13 |
|
---|
14 |
|
---|
15 | :findJavadoc
|
---|
16 | :: ---- Check Javadoc exists ----
|
---|
17 | set JAVADOCPATH=
|
---|
18 |
|
---|
19 | :: Some users may set the above line manually
|
---|
20 | if not "%JAVADOCPATH%" == "" goto testJavadoc
|
---|
21 |
|
---|
22 | :: If it is set, use the JAVA_HOME environment variable
|
---|
23 | if not "%JAVA_HOME%" == "" goto javahome
|
---|
24 |
|
---|
25 | :: Check if Javadoc is on the search path
|
---|
26 | echo %PATH%| winutil\which javadoc.exe | winutil\setvar JAVADOCPATH > setjavadoc.bat
|
---|
27 | call setjavadoc.bat
|
---|
28 | del setjavadoc.bat
|
---|
29 | if not "%JAVADOCPATH%" == "" goto testJavadoc
|
---|
30 |
|
---|
31 | :: Still haven't found anything, so try looking in the registry (gulp!)
|
---|
32 | type nul > jdk.reg
|
---|
33 | regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
|
---|
34 | type jdk.reg > jdk.txt
|
---|
35 | del jdk.reg
|
---|
36 |
|
---|
37 | winutil\findjava jdk.txt | winutil\setvar JAVADOCPATH > setjavadoc.bat
|
---|
38 | del jdk.txt
|
---|
39 | call setjavadoc.bat
|
---|
40 | del setjavadoc.bat
|
---|
41 |
|
---|
42 | :: If nothing was found in the registry, we're stuck
|
---|
43 | if "%JAVADOCPATH%" == "" goto noJavadoc
|
---|
44 |
|
---|
45 | set JAVADOCPATH=%JAVADOCPATH%\bin
|
---|
46 | goto testJavadoc
|
---|
47 |
|
---|
48 | :javahome
|
---|
49 | set JAVADOCPATH=%JAVA_HOME%\bin
|
---|
50 |
|
---|
51 | :testJavadoc
|
---|
52 | :: Check that a Javadoc executable has been found
|
---|
53 | if "%GLILANG%" == "en" echo Checking Javadoc: %JAVADOCPATH%
|
---|
54 | if "%GLILANG%" == "fr" echo Vrification de Javadoc: %JAVADOCPATH%
|
---|
55 | if exist "%JAVADOCPATH%\javadoc.exe" goto docGLI
|
---|
56 |
|
---|
57 | :noJavadoc
|
---|
58 | echo.
|
---|
59 | if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Javadoc. You must install a
|
---|
60 | if "%GLILANG%" == "en" echo Java Development Kit (version 1.4 or greater) before generating the
|
---|
61 | if "%GLILANG%" == "en" echo documentation for the Greenstone Librarian Interface.
|
---|
62 |
|
---|
63 | if "%GLILANG%" == "fr" echo Une version approprie de Javadoc n'a pas pu tre localise. Vous devez
|
---|
64 | if "%GLILANG%" == "fr" echo installer un Kit de Dveloppement Java (version 1.4 ou suprieure) avant
|
---|
65 | if "%GLILANG%" == "fr" echo de produire la documentation de Greenstone Librarian Interface.
|
---|
66 | goto exit
|
---|
67 |
|
---|
68 |
|
---|
69 | :docGLI
|
---|
70 | :: ---- Document the GLI ----
|
---|
71 | echo.
|
---|
72 | if "%GLILANG%" == "en" echo Generating documentation for the Greenstone Librarian Interface...
|
---|
73 | if "%GLILANG%" == "fr" echo Production de documentation pour la Greenstone Librarian Interface
|
---|
74 |
|
---|
75 | "%JAVADOCPATH%\javadoc.exe" -classpath classes/ -sourcepath src/ -source 1.4 -author -breakiterator -d docs/ -group "Gatherer v2.3" org.greenstone.gatherer:org.greenstone.gatherer.checklist:org.greenstone.gatherer.collection:org.greenstone.gatherer.file:org.greenstone.gatherer.gui:org.greenstone.gatherer.gui.browser:org.greenstone.gatherer.gui.combobox:org.greenstone.gatherer.gui.messages:org.greenstone.gatherer.gui.metaaudit:org.greenstone.gatherer.gui.table:org.greenstone.gatherer.gui.tree:org.greenstone.gatherer.help:org.greenstone.gatherer.sarm:org.greenstone.gatherer.shell:org.greenstone.gatherer.util -group "Collection Design Module" org.greenstone.gatherer.cdm:org.greenstone.gatherer.cdm.custom -group "Metadata Set Manager" org.greenstone.gatherer.msm:org.greenstone.gatherer.msm.parsers -group "Value Tree Controls" org.greenstone.gatherer.valuetree -private -splitindex -version org.greenstone.gatherer org.greenstone.gatherer.checklist org.greenstone.gatherer.collection org.greenstone.gatherer.file org.greenstone.gatherer.gui org.greenstone.gatherer.gui.browser org.greenstone.gatherer.gui.combobox org.greenstone.gatherer.gui.messages org.greenstone.gatherer.gui.metaaudit org.greenstone.gatherer.gui.table org.greenstone.gatherer.gui.tree org.greenstone.gatherer.help org.greenstone.gatherer.sarm org.greenstone.gatherer.shell org.greenstone.gatherer.util org.greenstone.gatherer.cdm org.greenstone.gatherer.cdm.custom org.greenstone.gatherer.msm org.greenstone.gatherer.msm.parsers org.greenstone.gatherer.valuetree
|
---|
76 |
|
---|
77 | if "%GLILANG%" == "en" echo Done!
|
---|
78 | if "%GLILANG%" == "fr" echo Termin!
|
---|
79 |
|
---|
80 | :exit
|
---|
81 | echo.
|
---|
82 | pause
|
---|
83 |
|
---|
84 | :: ---- Clean up ----
|
---|
85 | set JAVADOCPATH=
|
---|