source: main/trunk/gli/makegli.bat@ 32915

Last change on this file since 32915 was 32915, checked in by ak19, 5 years ago

Forgot to escape brackets

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 8.4 KB
RevLine 
[5824]1@echo off
[17945]2pushd "%CD%"
3CD /D "%~dp0"
[6747]4set GLILANG=en
[5824]5
[6747]6
[32913]7:: Don't bother compiling GLI if there's no source code (e.g. if this is a binary only)
8if not exist src (
[32915]9 echo WARNING: There is no gli source code ^(src directory^) to compile. Terminating makegli.
[32913]10 goto exit
11)
12
[6747]13:: -------- Compile the Greenstone Librarian Interface --------
14
[6570]15echo.
[6747]16if "%GLILANG%" == "en" echo Greenstone Librarian Interface (GLI)
[17945]17if "%GLILANG%" == "en" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
[6747]18if "%GLILANG%" == "en" echo GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
19if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
20
[6959]21if "%GLILANG%" == "es" echo Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)
[17945]22if "%GLILANG%" == "es" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
[6959]23if "%GLILANG%" == "es" echo La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÖA.
24if "%GLILANG%" == "es" echo Para mayor informaci¢n vea los t‚rminos de la licencia en LICENSE.txt
25if "%GLILANG%" == "es" echo Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita
[6753]26
[6955]27if "%GLILANG%" == "fr" echo Interface du Biblioth‚caire Greenstone (Greenstone Librarian Interface - GLI)
[17945]28if "%GLILANG%" == "fr" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
[6955]29if "%GLILANG%" == "fr" echo GLI est fourni sans AUCUNE GARANTIE; pour des d‚tails, voir LICENSE.txt
30if "%GLILANG%" == "fr" echo Ceci est un logiciel libre, et vous ˆtes invit‚ …
[6754]31 le redistribuer
[7041]32
[17945]33if "%GLILANG%" == "ru" echo š¡«š®â¥ç­ë© š­â¥à䥩á Greenstone (Greenstone Librarian Interface - GLI)
[7041]34if "%GLILANG%" == "ru" echo Copyright (C) 2008, New Zealand Digital Library Project, University Of Waikato
35if "%GLILANG%" == "ru" echo ˆƒ ­¥ € ¥â €‘Ž‹ž’Ž ˆŠ€Šˆ• ƒ€€’ˆ‰; €¥â «š á¬. ¢ ⥪á⥠LICENSE.TXT
36if "%GLILANG%" == "ru" echo â® - ᢮¡®€­® à á¯à®áâ࠭塞®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­š¥ š ‚ë ¬®Š¥â¥ à á¯à®áâà ­ïâì ¥£®
[6570]37
[5824]38echo.
39
40:: This script must be run from within the directory in which it lives
[6747]41if exist makegli.bat goto findJavac
[6753]42 if "%GLILANG%" == "en" echo This script must be run from the directory in which it resides.
[6747]43 if "%GLILANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
[6754]44 if "%GLILANG%" == "fr" echo Ce script doit ˆtre ex‚cut‚ …
[5824]45 partir du r‚pertoire dans lequel il se trouve.
46 if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
47 goto exit
48
49
50:findJavac
51:: ---- Check Javac exists ----
52set JAVACPATH=
53
54:: Some users may set the above line manually
[6467]55if not "%JAVACPATH%" == "" goto testJavac
56
[5824]57 :: If it is set, use the JAVA_HOME environment variable
58 if not "%JAVA_HOME%" == "" goto javahome
59
60 :: Check if Javac is on the search path
61 echo %PATH%| winutil\which.exe javac.exe | winutil\setvar.exe JAVACPATH > setjavac.bat
62 call setjavac.bat
63 del setjavac.bat
64 if not "%JAVACPATH%" == "" goto testJavac
65
66 :: Still haven't found anything, so try looking in the registry (gulp!)
67 type nul > jdk.reg
68 regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
69 type jdk.reg > jdk.txt
70 del jdk.reg
71
72 winutil\findjava.exe jdk.txt | winutil\setvar.exe JAVACPATH > setjavac.bat
73 del jdk.txt
74 call setjavac.bat
75 del setjavac.bat
76
77 :: If nothing was found in the registry, we're stuck
78 if "%JAVACPATH%" == "" goto noJavac
79
80 set JAVACPATH=%JAVACPATH%\bin
81 goto testJavac
[6467]82
[5824]83:javahome
84 set JAVACPATH=%JAVA_HOME%\bin
85
[6747]86:testJavac
[6753]87:: Check that a Javac executable has been found
[6747]88if "%GLILANG%" == "en" echo Checking Javac: %JAVACPATH%
[6754]89if "%GLILANG%" == "es" echo Revisando Javac: %JAVACPATH%
[9862]90if "%GLILANG%" == "fr" echo V‚rification de Javac: %JAVACPATH%
[5824]91if "%GLILANG%" == "ru" echo à®¢¥àª  Javac: %JAVACPATH%
92if exist "%JAVACPATH%\javac.exe" goto makeGLI
93
[6747]94:noJavac
95 echo.
96 if "%GLILANG%" == "en" echo Failed to locate an appropriate version of Javac. You must install a
97 if "%GLILANG%" == "en" echo Java Development Kit (version 1.4 or greater) before compiling the
[6753]98 if "%GLILANG%" == "en" echo Greenstone Librarian Interface.
99
100 if "%GLILANG%" == "es" echo No se pudo localizar una versi¢n apropiada de Javac. Usted deber 
101 if "%GLILANG%" == "es" echo instalar un Kit de Desarrollo de Software Java (versi¢n 1.4 o superior)
102 if "%GLILANG%" == "es" echo antes de generar la documentaci¢n para la Interfaz de la Biblioteca
[6747]103 if "%GLILANG%" == "es" echo Digital Greenstone.
104
105 if "%GLILANG%" == "fr" echo Une version appropri‚e de Javac n'a pas pu ˆtre localis‚e. Vous devez
[6754]106 if "%GLILANG%" == "fr" echo installer un Kit de D‚veloppement Java (version 1.4 ou sup‚rieure)
107 if "%GLILANG%" == "fr" echo avant de produire la documentation de Greenstone Librarian Interface.
108
109 if "%GLILANG%" == "ru" echo ¥ 〠«®áì ®¯à¥€¥«šâì ¬¥áâ®­ å®Š€¥­š¥ ᮮ⢥âáâ¢ãî饩 ¢¥àášš Javac.
110 if "%GLILANG%" == "ru" echo ‚ë €®«Š­ë š­áâ ««šà®¢ âì Java Development Kit (¢¥àášï 1.4 š«š ¢ëè¥)
[5824]111 if "%GLILANG%" == "ru" echo ¯à¥Š€¥, 祬 £¥­¥àšà®¢ âì €®ªã¬¥­â æšî €«ï ¡š¡«š®â¥ç­®£®
112 if "%GLILANG%" == "ru" echo š­â¥àä¥©á  Greenstone.
[6747]113 goto exit
[5824]114
115
116:makeGLI
117:: ---- Compile the GLI ----
118
[10422]119if "%1" == "" goto makeAll
[8978]120 :: If a file has been specified as a command-line argument, just compile that file
[6753]121 echo.
[6747]122 if "%GLILANG%" == "en" echo Compiling %1 and dependent classes...
[6754]123 if "%GLILANG%" == "es" echo Compilando %1 y clases dependientes...
[5824]124 if "%GLILANG%" == "fr" echo Compilation de %1 et des classes d‚pendantes,,,
[31649]125 if "%GLILANG%" == "ru" echo Š®¬¯š«šà®¢ ­š¥ %1 š § ¢šáš¬ë¥ ª« ááë...
[5824]126
[6747]127 "%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
[6753]128
[6747]129 if "%GLILANG%" == "en" echo Done!
[6754]130 if "%GLILANG%" == "es" echo ­Hecho!
[5927]131 if "%GLILANG%" == "fr" echo Termin‚!
[5824]132 if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
133 goto done
134
[10422]135:makeAll
136:: Otherwise compile the lot...
137
138:: Remove any existing class files first
[6747]139call clean.bat
[6753]140
[6747]141if "%GLILANG%" == "en" echo Compiling the Greenstone Librarian Interface...
[6754]142if "%GLILANG%" == "es" echo Compilando la Interfaz de la Biblioteca Digital Greenstone...
[5824]143if "%GLILANG%" == "fr" echo Compilation de Greenstone Librarian Interface,,,
[9336]144if "%GLILANG%" == "ru" echo Š®¬¯š«šà®¢ ­š¥ ¡š¡«š®â¥ç­®£® š­â¥àä¥©á  Greenstone...
[17845]145
[31649]146:: Compile the GLI
[32138]147:: Sun compiler (tested with 1.5 and 1.6) didn't compile DragTreeSelectionModel.java or MetadataAuditTableModel.java automatically, so we need to put them in explicitly
[31649]148"%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/GathererProg.java src/org/greenstone/gatherer/util/DragTreeSelectionModel.java src/org/greenstone/gatherer/metadata/MetadataAuditTableModel.java
149"%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/WebGatherer.java
[5824]150"%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/GathererApplet.java
[9336]151:: "%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/GathererApplet4gs3.java
[31649]152
[9315]153:: Compile the GEMS
[13386]154"%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/GEMS.java
155
156:: Compile the standalone programs needed on the server for remote building
157"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Zip*.java
[6747]158"%JAVACPATH%\javac.exe" -d classes/ -sourcepath src/ -classpath classes/ src/org/greenstone/gatherer/remote/Unzip.java
[6753]159
[6747]160if "%GLILANG%" == "en" echo Done!
[6754]161if "%GLILANG%" == "es" echo ­Hecho!
[5927]162if "%GLILANG%" == "fr" echo Termin‚!
[5824]163if "%GLILANG%" == "ru" echo ‚믮«­¥­®!
164goto done
165
[17945]166:exit
[5824]167echo.
168popd
[5927]169pause
[5824]170
[17945]171:done
[5824]172:: ---- Clean up ----
173popd
174set JAVACPATH=
Note: See TracBrowser for help on using the repository browser.