root/main/trunk/greenstone2/common-src/indexers/lucene-gs/winMake.bat @ 29154

Revision 29154, 2.6 KB (checked in by ak19, 5 years ago)

Changes to get winMake.bat to compile lucene_gs, before further improgvements to this windows makefile

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1@echo off
2
3set LUCENEHOME=.
4
5rem ---- Where to put class files ----
6set JAVACLASSDIR4=classes4
7set JAVACLASSDIR3=classes3
8
9rem ---- Name and location of java programs ----
10set JAVAC="%JAVA_HOME%\bin\javac"
11set JAVAH="%JAVA_HOME%\bin\javah"
12set JAVA="%JAVA_HOME%\bin\java"
13set JAVADOC="%JAVA_HOME%\bin\javadoc"
14set JAR="%JAVA_HOME%\bin\jar"
15
16::set JAVACOPTIONS=-deprecation -g -O
17set JAVACOPTIONS=
18
19:: Note that both jar file lists need to be modified simultaneously when the jar dependencies are changed
20set LUCENE4_JAR=.\lib\lucene4\lucene-core-4.7.2.jar;.\lib\lucene4\lucene-analyzers-common-4.7.2.jar;.\lib\lucene4\lucene-analyzers-kuromoji-4.7.2.jar;.\lib\lucene4\lucene-queryparser-4.7.2.jar
21rem set UNJAR_LUCENE4_JAR=%JAR% xf ..\lib\lucene4\lucene-core-4.7.2.jar && %JAR% xf ..\lib\lucene4\lucene-analyzers-common-4.7.2.jar && %JAR% xf ..\lib\lucene4\lucene-analyzers-kuromoji-4.7.2.jar %JAR% xf ..\lib\lucene4\lucene-queryparser-4.7.2.jar
22
23set LUCENE3_JAR=.\lib\lucene-core-3.3.0.jar
24set MYCLASSPATH3=%LUCENE3_JAR%;%JAVACLASSDIR3%
25
26
27set MYCLASSPATH4=%LUCENE4_JAR%;%JAVACLASSDIR4%
28
29if "%DEBUG%" == "" (
30  set MAKE_VARS=DEBUG=0
31) else (
32  set MAKE_VARS=DEBUG=%DEBUG%
33)
34
35if ""%1"" == """" goto all
36if ""%1"" == ""all"" goto all
37if ""%1"" == ""install"" goto install
38if ""%1"" == ""clean"" goto clean
39
40:unknown
41    echo Error: Unrecognized argument %1.
42    goto done
43
44:lucene3
45       if not exist %JAVACLASSDIR3% mkdir %JAVACLASSDIR3%
46       echo Compiling Greenstone Lucene version 3.x Java classes ...
47       %JAVAC% -d %JAVACLASSDIR3% -classpath %MYCLASSPATH3% %JAVACOPTIONS% -sourcepath src src\org\greenstone\LuceneWrapper3\*.java
48       cd %JAVACLASSDIR3%
49       %JAR% xf ..\%LUCENE3_JAR%
50       cd ..
51       %JAR% cf LuceneWrapper3.jar -C %JAVACLASSDIR3% .
52       goto done
53
54rem %UNJAR_LUCENE4_JAR%
55:all
56    if not exist %JAVACLASSDIR4% mkdir %JAVACLASSDIR4%
57    echo Compiling Greenstone Lucene version 4.x Java classes ...
58    %JAVAC% -d %JAVACLASSDIR4% -classpath %MYCLASSPATH4% %JAVACOPTIONS% -sourcepath src src\org\greenstone\LuceneWrapper4\*.java
59    cd %JAVACLASSDIR4% && %JAR% xf ..\lib\lucene4\lucene-core-4.7.2.jar && %JAR% xf ..\lib\lucene4\lucene-analyzers-common-4.7.2.jar && %JAR% xf ..\lib\lucene4\lucene-analyzers-kuromoji-4.7.2.jar %JAR% xf ..\lib\lucene4\lucene-queryparser-4.7.2.jar && cd ..
60    %JAR% cf LuceneWrapper4.jar -C %JAVACLASSDIR4% .
61    goto done
62
63:install
64    goto done
65
66:clean
67    echo Cleaning up Greenstone Lucene ...
68    if exist %JAVACLASSDIR4% rmdir /S /Q %JAVACLASSDIR4%
69        if exist LuceneWrapper4.jar del LuceneWrapper4.jar
70    if exist %JAVACLASSDIR3% rmdir /S /Q %JAVACLASSDIR3%
71        if exist LuceneWrapper3.jar del LuceneWrapper3.jar
72    goto done
73
74:done
75
Note: See TracBrowser for help on using the browser.