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

Revision 29148, 2.3 KB (checked in by ak19, 5 years ago)

Part of port from lucene3.3.0 to lucene4.7.2. Related to LuceneWrapper?. 1. Updating the lucene-gs makefiles to allow compiling up Lucene4Wrapper.jar or Lucene3Wrapper.jar. Only the Linux Makefile.in has been tested so far. 2. Adding in the jar files necessary for Lucene4Wrapper into the lib folder's new lucene4 subfolder. 3. Updating the Lucene src code to use lucene4.7.2 instead of lucene3.3.0.

  • 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
16set JAVACOPTIONS=-deprecation -g -O
17
18:: Note that both jar file lists need to be modified simultaneously when the jar dependencies are changed
19set LUCENE4_JAR=.\lib\lucene-core-4.7.2.jar;.\lib\lucene-analyzers-common-4.7.2.jar;.\lib\lucene-analyzers-kuromoji-4.7.2.jar;.\lib\lucene-queryparser-4.7.2.jar
20set UNJAR_LUCENE4_JAR=%JAR% xf ..\lib\lucene-core-4.7.2.jar && %JAR% xf ..\lib\lucene-lucene-analyzers-common-4.7.2.jar && %JAR% xf ..\lib\lucene-analyzers-kuromoji-4.7.2.jar %JAR% xf ..\lib\lucene-queryparser-4.7.2.jar
21
22set LUCENE3_JAR=.\lib\lucene-core-3.3.0.jar
23set MYCLASSPATH3=%LUCENE3_JAR%;%JAVACLASSDIR3%
24
25
26set MYCLASSPATH4=%LUCENE4_JAR%;%JAVACLASSDIR4%
27
28if "%DEBUG%" == "" (
29  set MAKE_VARS=DEBUG=0
30) else (
31  set MAKE_VARS=DEBUG=%DEBUG%
32)
33
34if ""%1"" == """" goto all
35if ""%1"" == ""all"" goto all
36if ""%1"" == ""install"" goto install
37if ""%1"" == ""clean"" goto clean
38
39:unknown
40    echo Error: Unrecognized argument %1.
41    goto done
42
43:lucene3
44       if not exist %JAVACLASSDIR3% mkdir %JAVACLASSDIR3%
45       echo Compiling Greenstone Lucene version 3.x Java classes ...
46       %JAVAC% -d %JAVACLASSDIR3% -classpath %MYCLASSPATH3% %JAVACOPTIONS% -sourcepath src src\org\greenstone\LuceneWrapper3\*.java
47       cd %JAVACLASSDIR3%
48       %JAR% xf ..\%LUCENE3_JAR%
49       cd ..
50       %JAR% cf LuceneWrapper3.jar -C %JAVACLASSDIR3% .
51       goto done
52
53
54:all
55    if not exist %JAVACLASSDIR4% mkdir %JAVACLASSDIR4%
56    echo Compiling Greenstone Lucene version 4.x Java classes ...
57    %JAVAC% -d %JAVACLASSDIR4% -classpath %MYCLASSPATH4% %JAVACOPTIONS% -sourcepath src src\org\greenstone\LuceneWrapper4\*.java
58    cd %JAVACLASSDIR4%
59    %UNJAR_LUCENE4_JAR%
60    cd ..
61    %JAR% cf LuceneWrapper4.jar -C %JAVACLASSDIR4% .
62    goto done
63
64:install
65    goto done
66
67:clean
68    echo Cleaning up Greenstone Lucene ...
69    if exist %JAVACLASSDIR4% rmdir /S /Q %JAVACLASSDIR4%
70        if exist LuceneWrapper4.jar del LuceneWrapper4.jar
71    if exist %JAVACLASSDIR3% rmdir /S /Q %JAVACLASSDIR3%
72        if exist LuceneWrapper3.jar del LuceneWrapper3.jar
73    goto done
74
75:done
76
Note: See TracBrowser for help on using the browser.