source: main/tags/2.41/gli/document.bat@ 24581

Last change on this file since 24581 was 5824, checked in by mdewsnip, 20 years ago

Changed Windows batch files to have Windows line endings.

  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1@echo off
2
3
4:: -------- Generate documentation for the Greenstone Librarian Interface --------
5
6:: This script must be run from within the directory in which it lives
7if exist document.bat goto findJavadoc
8 echo This script must be run from the directory in which it resides.
9 goto exit
10
11
12:findJavadoc
13:: ---- Check Javadoc exists ----
14set JAVADOCPATH=
15
16:: Some users may set the above line manually
17if not "%JAVADOCPATH%" == "" goto testJavadoc
18
19 :: If it is set, use the JAVAHOME environment variable
20 if not "%JAVAHOME%" == "" goto javahome
21
22 :: Check if Javadoc is on the search path
23 echo %PATH%| winutil\which javadoc.exe | winutil\setvar JAVADOCPATH > setjavadoc.bat
24 call setjavadoc.bat
25 del setjavadoc.bat
26 if not "%JAVADOCPATH%" == "" goto testJavadoc
27
28 :: Still haven't found anything, so try looking in the registry (gulp!)
29 type nul > jdk.reg
30 regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
31 type jdk.reg > jdk.txt
32 del jdk.reg
33
34 winutil\findjava jdk.txt | winutil\setvar JAVADOCPATH > setjavadoc.bat
35 del jdk.txt
36 call setjavadoc.bat
37 del setjavadoc.bat
38
39 :: If nothing was found in the registry, we're stuck
40 if "%JAVADOCPATH%" == "" goto noJavadoc
41
42 set JAVADOCPATH=%JAVADOCPATH%\bin
43 goto testJavadoc
44
45:javahome
46 set JAVADOCPATH=%JAVAHOME%\bin
47
48:testJavadoc
49:: Check that a Javadoc executable has been found
50echo Checking Javadoc: %JAVADOCPATH%
51if exist "%JAVADOCPATH%\javadoc.exe" goto docGLI
52
53:noJavadoc
54 echo.
55 echo Failed to locate an appropriate version of Javadoc. You must install a
56 echo Java Development Kit (version 1.4 or greater) before generating the
57 echo documentation for the Greenstone Librarian Interface.
58 goto exit
59
60
61:docGLI
62:: ---- Document the GLI ----
63echo.
64echo Generating documentation for the Greenstone Librarian Interface...
65
66"%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
67
68echo Done!
69
70:exit
71echo.
72pause
73
74:: ---- Clean up ----
75set JAVADOCPATH=
Note: See TracBrowser for help on using the repository browser.