source: trunk/indexers/mg/java/org/greenstone/mg/winMake.bat@ 10071

Last change on this file since 10071 was 10071, checked in by kjdon, 19 years ago

the jar file is now made in mghome directory, and nothing is done with it on install

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1@echo off
2
3set MGHOME=..\..\..\..
4
5rem ---- Where to put class files ----
6set JAVACLASSDIR=classes
7
8rem ---- Name and location of java programs ----
9set JAVAC="%JAVA_HOME%\bin\javac"
10set JAVAH="%JAVA_HOME%\bin\javah"
11set JAVA="%JAVA_HOME%\bin\java"
12set JAVADOC="%JAVA_HOME%\bin\javadoc"
13set JAR="%JAVA_HOME%\bin\jar"
14
15set JAVACOPTIONS= -deprecation -g -O
16
17
18if ""%1"" == """" goto compile
19if ""%1"" == ""compile"" goto compile
20if ""%1"" == ""install"" goto install
21if ""%1"" == ""clean"" goto clean
22
23:unknown
24 echo Error: Unrecognized argument %1.
25 goto done
26
27:compile
28 if not exist %JAVACLASSDIR% mkdir %JAVACLASSDIR%
29 echo Compiling...
30 %JAVAC% -d %JAVACLASSDIR% %JAVACOPTIONS% *.java
31 %JAVAH% -classpath %JAVACLASSDIR% -d %MGHOME%\jni org.greenstone.mg.MGWrapper
32 %JAVAH% -classpath %JAVACLASSDIR% -d %MGHOME%\jni org.greenstone.mg.MGPassesWrapper
33 %JAR% cf %MGHOME%\mg.jar -C %JAVACLASSDIR% org
34 goto done
35
36:install
37 goto done
38
39:clean
40 echo Cleaning up...
41 if exist %JAVACLASSDIR% rmdir /S /Q %JAVACLASSDIR%
42 if exist %MGHOME%\mg.jar del %MGHOME%\mg.jar
43 if exist %MGHOME%\jni\org_greenstone_mg_MGWrapper.h del %MGHOME%\jni\org_greenstone_mg_MGWrapper.h
44 if exist %MGHOME%\jni\org_greenstone_mg_MGPassesWrapper.h del %MGHOME%\jni\org_greenstone_mg_MGPassesWrapper.h
45 goto done
46
47:done
Note: See TracBrowser for help on using the repository browser.