I factored out some subtasks that were repeated throughout.
The binary JARs now contain license docs. There are now four builds for the four faces of the translation tool. By default, class files will now be compiled for the 1.1 JVM, even if you use J2SDK 1.4 to compile them. 'ant -Dtarget.jvm=1.2' gives you 1.4's default. I'm not sure what 1.2 buys us, but it means we don't work on a large number of JVMs in the field.
This commit is contained in:
parent
77e29329ca
commit
4e10517b71
1 changed files with 319 additions and 174 deletions
491
build.xml
491
build.xml
|
@ -1,3 +1,21 @@
|
||||||
|
<!-- @author David Chandler -->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Quick start: This buildfile looks for the following, which are not in
|
||||||
|
the CVS repository:
|
||||||
|
|
||||||
|
extensions/jdom.jar
|
||||||
|
extensions/xalan.jar
|
||||||
|
extensions/xercesImpl.jar
|
||||||
|
extensions/xml-apis.jar
|
||||||
|
extensions/jmf.jar
|
||||||
|
|
||||||
|
See the developers site, linked to from http://thdltools.sf.net/, for
|
||||||
|
info on where to find these.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
<project name="THDLTools" default="dist" basedir=".">
|
<project name="THDLTools" default="dist" basedir=".">
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,10 +30,14 @@
|
||||||
<!-- set global properties for this build -->
|
<!-- set global properties for this build -->
|
||||||
<property name="javacdashg" value="yes"/>
|
<property name="javacdashg" value="yes"/>
|
||||||
<property name="source" location="source"/>
|
<property name="source" location="source"/>
|
||||||
|
<property name="license" location="license"/>
|
||||||
<property name="bin" location="bin"/>
|
<property name="bin" location="bin"/>
|
||||||
<property name="jskadbin" location="bin/jskad"/>
|
<property name="jskadbin" location="bin/jskad"/>
|
||||||
<property name="qdbin" location="bin/qd"/>
|
<property name="qdbin" location="bin/qd"/>
|
||||||
<property name="ttbin" location="bin/tt"/>
|
<property name="ttstandalonebin" location="bin/tt-standalone"/>
|
||||||
|
<property name="ttappletjwsbin" location="bin/tt-applet-and-java-web-start"/>
|
||||||
|
<property name="tthandheldbin" location="bin/tt-handheld"/>
|
||||||
|
<property name="ttservletbin" location="bin/tt-servlet"/>
|
||||||
<property name="savantbin" location="bin/savant"/>
|
<property name="savantbin" location="bin/savant"/>
|
||||||
<property name="docs" location="docs"/>
|
<property name="docs" location="docs"/>
|
||||||
<property name="dist" location="dist"/>
|
<property name="dist" location="dist"/>
|
||||||
|
@ -34,6 +56,12 @@
|
||||||
<!-- Set to the name of the dictionary used by the Translation Tool: -->
|
<!-- Set to the name of the dictionary used by the Translation Tool: -->
|
||||||
<property name="arch.dict" value="architecture_dictionary"/>
|
<property name="arch.dict" value="architecture_dictionary"/>
|
||||||
|
|
||||||
|
<!-- Set this to 1.2 if you want J2SDK 1.4's default. 1.1 gives us
|
||||||
|
more compatibility, but maybe there will be a performance hit
|
||||||
|
or something. -->
|
||||||
|
<property name="target.jvm" value="1.1"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- To easily add a jar to the CLASSPATH, just drop it into
|
<!-- To easily add a jar to the CLASSPATH, just drop it into
|
||||||
'extensions/drop-ins/'. -->
|
'extensions/drop-ins/'. -->
|
||||||
|
@ -77,7 +105,10 @@
|
||||||
<mkdir dir="${bin}"/>
|
<mkdir dir="${bin}"/>
|
||||||
<mkdir dir="${jskadbin}"/>
|
<mkdir dir="${jskadbin}"/>
|
||||||
<mkdir dir="${qdbin}"/>
|
<mkdir dir="${qdbin}"/>
|
||||||
<mkdir dir="${ttbin}"/>
|
<mkdir dir="${ttstandalonebin}"/>
|
||||||
|
<mkdir dir="${tthandheldbin}"/>
|
||||||
|
<mkdir dir="${ttservletbin}"/>
|
||||||
|
<mkdir dir="${ttappletjwsbin}"/>
|
||||||
<mkdir dir="${savantbin}"/>
|
<mkdir dir="${savantbin}"/>
|
||||||
<mkdir dir="${publicjavadocs}"/>
|
<mkdir dir="${publicjavadocs}"/>
|
||||||
<mkdir dir="${privatejavadocs}"/>
|
<mkdir dir="${privatejavadocs}"/>
|
||||||
|
@ -96,122 +127,126 @@
|
||||||
description="JARs up everything into self-contained JARs for double-click, classpath-worry-free joy" />
|
description="JARs up everything into self-contained JARs for double-click, classpath-worry-free joy" />
|
||||||
|
|
||||||
<target name="dist"
|
<target name="dist"
|
||||||
depends="jskad-dist,savant-dist,qd-dist,tt-dist"
|
depends="jskad-dist,savant-dist,qd-dist,tt-handheld-dist,tt-standalone-dist,tt-applet-plus-jws-dist"
|
||||||
description="JARs up everything" />
|
description="JARs up everything" />
|
||||||
|
|
||||||
|
<!-- Don't compile tt-servlet by default, since not everyone has the
|
||||||
|
J2EE SDK installed: -->
|
||||||
<target name="compile"
|
<target name="compile"
|
||||||
depends="jskad-compile,savant-compile,qd-compile,tt-compile"
|
depends="jskad-compile,savant-compile,qd-compile,tt-standalone-compile,tt-handheld-compile,tt-applet-plus-jws-compile"
|
||||||
description="compiles all source" />
|
description="compiles all programs except for those that are for J2EE (rather than J2SE)" />
|
||||||
|
|
||||||
|
|
||||||
<target name="jskad-compile" depends="init"
|
<target name="jskad-compile" depends="init"
|
||||||
description="compiles Jskad" >
|
description="compiles Jskad" >
|
||||||
<!-- Compile the java code from ${source} into ${jskadbin} -->
|
<antcall target="our-internal-javac-task">
|
||||||
<javac destdir="${jskadbin}" debug="${javacdashg}">
|
<param name="mybin" value="${jskadbin}"/>
|
||||||
<classpath refid="entire.class.path"/>
|
<param name="my.included.source.file" value="org/thdl/tib/input/Jskad.java"/>
|
||||||
<src path="${source}"/>
|
</antcall>
|
||||||
<include name="org/thdl/tib/input/Jskad.java" />
|
<antcall target="copy-ini-files-to-bin-dir-for-jarring">
|
||||||
<exclude name="**/*.ini" />
|
<param name="mybin" value="${jskadbin}"/>
|
||||||
<exclude name="**/*.html" />
|
</antcall>
|
||||||
<!-- Exclude JUnit tests: -->
|
<antcall target="copy-license-to-bin-dir-for-jarring">
|
||||||
<exclude name="**/*Test.java" />
|
<param name="mybin" value="${jskadbin}"/>
|
||||||
<exclude name="**/*AllTests.java" />
|
</antcall>
|
||||||
</javac>
|
|
||||||
<copy todir="${jskadbin}">
|
|
||||||
<fileset dir="${source}">
|
|
||||||
<include name="org/thdl/tib/**/*.ini"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="savant-compile" depends="init"
|
<target name="savant-compile" depends="init"
|
||||||
description="compiles Savant" >
|
description="compiles Savant" >
|
||||||
<!-- Compile the java code from ${source} into ${savantbin} -->
|
<antcall target="our-internal-javac-task">
|
||||||
<javac destdir="${savantbin}" debug="${javacdashg}">
|
<param name="mybin" value="${savantbin}"/>
|
||||||
<classpath refid="entire.class.path"/>
|
<param name="my.included.source.file" value="org/thdl/savant/SavantShell.java"/>
|
||||||
<src path="${source}"/>
|
</antcall>
|
||||||
<include name="org/thdl/savant/SavantShell.java" />
|
|
||||||
<exclude name="**/*.ini" />
|
<!-- Copy the .rtf files; they're needed resources: -->
|
||||||
<exclude name="**/*.html" />
|
|
||||||
<!-- Exclude JUnit tests: -->
|
|
||||||
<exclude name="**/*Test.java" />
|
|
||||||
<exclude name="**/*AllTests.java" />
|
|
||||||
</javac>
|
|
||||||
<copy todir="${savantbin}/org/thdl/savant">
|
<copy todir="${savantbin}/org/thdl/savant">
|
||||||
<fileset dir="${source}">
|
<fileset dir="${source}">
|
||||||
<include name="*savant*"/>
|
<include name="*savant*"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${savantbin}">
|
|
||||||
<fileset dir="${source}">
|
<antcall target="copy-ini-files-to-bin-dir-for-jarring">
|
||||||
<include name="org/thdl/tib/**/*.ini"/>
|
<param name="mybin" value="${savantbin}"/>
|
||||||
</fileset>
|
</antcall>
|
||||||
</copy>
|
<antcall target="copy-license-to-bin-dir-for-jarring">
|
||||||
|
<param name="mybin" value="${savantbin}"/>
|
||||||
|
</antcall>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="tt-compile" depends="init"
|
<!-- Builds the standalone translation tool: -->
|
||||||
description="compiles the Translation Tool" >
|
<target name="tt-standalone-compile" depends="init"
|
||||||
<!-- Compile the java code from ${source} into ${ttbin} -->
|
description="compiles the standalone Translation Tool" >
|
||||||
<javac destdir="${ttbin}" debug="${javacdashg}">
|
<antcall target="our-internal-javac-task">
|
||||||
<classpath refid="entire.class.path"/>
|
<param name="mybin" value="${ttstandalonebin}"/>
|
||||||
<src path="${source}"/>
|
<param name="my.included.source.file" value="org/thdl/tib/scanner/WindowScannerFilter.java"/>
|
||||||
<include name="org/thdl/tib/scanner/WindowScannerFilter.java" />
|
</antcall>
|
||||||
<exclude name="**/*.ini" />
|
<antcall target="copy-ini-files-to-bin-dir-for-jarring">
|
||||||
<exclude name="**/*.html" />
|
<param name="mybin" value="${ttstandalonebin}"/>
|
||||||
<!-- Exclude JUnit tests: -->
|
</antcall>
|
||||||
<exclude name="**/*Test.java" />
|
<antcall target="copy-license-to-bin-dir-for-jarring">
|
||||||
<exclude name="**/*AllTests.java" />
|
<param name="mybin" value="${ttstandalonebin}"/>
|
||||||
</javac>
|
</antcall>
|
||||||
<copy todir="${ttbin}">
|
|
||||||
<fileset dir="${source}">
|
|
||||||
<include name="org/thdl/tib/**/*.ini"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="tt-serv-compile" depends="init"
|
<!-- Builds the translation tool for handhelds. This tells J2SDK
|
||||||
description="compiles the full Translation Tool, including servlets. You'd better set the j2ee.sdk.home property first or have j2ee.jar on your CLASSPATH." >
|
1.4 to compile for handhelds (-target 1.1 does the trick).
|
||||||
<!-- Compile the java code from ${source} into ${ttbin} -->
|
Compiling with J2SDK 1.3 does so by default, by the way. -->
|
||||||
<javac destdir="${ttbin}" debug="${javacdashg}">
|
<target name="tt-handheld-compile" depends="init"
|
||||||
<classpath refid="entire.class.path"/>
|
description="compiles the handheld Translation Tool" >
|
||||||
<src path="${source}"/>
|
<antcall target="our-internal-javac-task">
|
||||||
<include name="org/thdl/tib/scanner/**.java" />
|
<param name="target.jvm" value="1.1"/>
|
||||||
<exclude name="**/*.ini" />
|
<param name="mybin" value="${tthandheldbin}"/>
|
||||||
<exclude name="**/*.html" />
|
<param name="my.included.source.file" value="org/thdl/tib/scanner/WindowScannerFilter.java"/>
|
||||||
<!-- Exclude JUnit tests: -->
|
</antcall>
|
||||||
<exclude name="**/*Test.java" />
|
<antcall target="copy-license-to-bin-dir-for-jarring">
|
||||||
<exclude name="**/*AllTests.java" />
|
<param name="mybin" value="${tthandheldbin}"/>
|
||||||
</javac>
|
</antcall>
|
||||||
<copy todir="${ttbin}">
|
</target>
|
||||||
<fileset dir="${source}">
|
|
||||||
<include name="org/thdl/tib/**/*.ini"/>
|
|
||||||
</fileset>
|
<!-- Builds the applet + the Java Web Start translation tool: -->
|
||||||
</copy>
|
<target name="tt-applet-plus-jws-compile" depends="init"
|
||||||
|
description="compiles the applet + Java Web Start forms of the Translation Tool" >
|
||||||
|
<antcall target="our-internal-javac-task">
|
||||||
|
<param name="mybin" value="${ttappletjwsbin}"/>
|
||||||
|
<param name="my.included.source.file" value="org/thdl/tib/scanner/AppletScannerFilter.java"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="our-internal-javac-task">
|
||||||
|
<param name="mybin" value="${ttappletjwsbin}"/>
|
||||||
|
<param name="my.included.source.file" value="org/thdl/tib/scanner/WindowScannerFilter.java"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="copy-ini-files-to-bin-dir-for-jarring">
|
||||||
|
<param name="mybin" value="${ttappletjwsbin}"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="copy-license-to-bin-dir-for-jarring">
|
||||||
|
<param name="mybin" value="${ttappletjwsbin}"/>
|
||||||
|
</antcall>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="tt-servlet-compile" depends="init"
|
||||||
|
description="compiles the servlet form of the Translation Tool. You'd better set the j2ee.sdk.home property first or have j2ee.jar on your CLASSPATH, because this is a J2EE program." >
|
||||||
|
<antcall target="our-internal-javac-task">
|
||||||
|
<param name="mybin" value="${ttservletbin}"/>
|
||||||
|
<param name="my.included.source.file" value="org/thdl/tib/scanner/ConsoleScannerFilter.java"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="copy-license-to-bin-dir-for-jarring">
|
||||||
|
<param name="mybin" value="${ttbin}"/>
|
||||||
|
</antcall>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="qd-compile" depends="init"
|
<target name="qd-compile" depends="init"
|
||||||
description="compiles QuillDriver" >
|
description="compiles QuillDriver" >
|
||||||
<!-- Compile the java code from ${source} into ${qdbin} -->
|
<!-- Compile the java code from ${source} into ${qdbin} -->
|
||||||
<javac destdir="${qdbin}" debug="${javacdashg}">
|
<antcall target="our-internal-javac-task">
|
||||||
<classpath refid="entire.class.path"/>
|
<param name="mybin" value="${qdbin}"/>
|
||||||
<src path="${source}"/>
|
<param name="my.included.source.file" value="org/thdl/quilldriver/QDShell.java"/>
|
||||||
<include name="org/thdl/quilldriver/QDShell.java" />
|
</antcall>
|
||||||
<exclude name="**/*.ini" />
|
|
||||||
<exclude name="**/*.html" />
|
<!-- Copy over QuillDriver-specific resources: -->
|
||||||
<exclude name="**/*.gif" />
|
|
||||||
<exclude name="**/*.jpg" />
|
|
||||||
<!-- Exclude JUnit tests: -->
|
|
||||||
<exclude name="**/*Test.java" />
|
|
||||||
<exclude name="**/*AllTests.java" />
|
|
||||||
</javac>
|
|
||||||
<copy todir="${qdbin}">
|
|
||||||
<fileset dir="${source}">
|
|
||||||
<include name="org/thdl/tib/**/*.ini"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${qdbin}">
|
<copy todir="${qdbin}">
|
||||||
<fileset dir="${source}">
|
<fileset dir="${source}">
|
||||||
<include name="MessageBundle*"/>
|
<include name="MessageBundle*"/>
|
||||||
|
@ -219,6 +254,13 @@
|
||||||
<include name="**/*.jpg"/>
|
<include name="**/*.jpg"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
|
<antcall target="copy-ini-files-to-bin-dir-for-jarring">
|
||||||
|
<param name="mybin" value="${qdbin}"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="copy-license-to-bin-dir-for-jarring">
|
||||||
|
<param name="mybin" value="${qdbin}"/>
|
||||||
|
</antcall>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
@ -229,8 +271,8 @@
|
||||||
<zipfileset dir="${source}"
|
<zipfileset dir="${source}"
|
||||||
includes="**"
|
includes="**"
|
||||||
prefix="source"/>
|
prefix="source"/>
|
||||||
<zipfileset dir="license"
|
<zipfileset dir="${license}"
|
||||||
includes="*.txt,*.html"
|
includes="*"
|
||||||
prefix="."/>
|
prefix="."/>
|
||||||
<zipfileset dir="."
|
<zipfileset dir="."
|
||||||
includes="build.xml"
|
includes="build.xml"
|
||||||
|
@ -254,11 +296,13 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="tt-dist" depends="tt-compile"
|
<!-- FIXME: generate translation tool servlet distribution -->
|
||||||
description="generates the TranslationDesktop binary distribution. Call tt-serv-compile first if you want servlets in this dist." >
|
|
||||||
<!-- Put everything in ${ttbin} into the JAR file -->
|
<target name="tt-standalone-dist" depends="tt-standalone-compile"
|
||||||
<jar jarfile="${dist}/lib/TranslationDesktop-${DSTAMP}.jar"
|
description="generates the standalone translation tool's binary distribution." >
|
||||||
basedir="${ttbin}">
|
<!-- Put everything in ${ttstandalonebin} into the JAR file -->
|
||||||
|
<jar jarfile="${dist}/lib/DictionarySearchStandalone-${DSTAMP}.jar"
|
||||||
|
basedir="${ttstandalonebin}">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Main-Class" value="org.thdl.tib.scanner.WindowScannerFilter"/>
|
<attribute name="Main-Class" value="org.thdl.tib.scanner.WindowScannerFilter"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -266,6 +310,46 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="tt-handheld-dist" depends="tt-handheld-compile"
|
||||||
|
description="generates the handheld translation tool's binary distribution." >
|
||||||
|
<!-- Put everything in ${tthandheldbin} into the JAR file -->
|
||||||
|
<jar jarfile="${dist}/lib/DictionarySearchHandheld-${DSTAMP}.jar"
|
||||||
|
basedir="${tthandheldbin}">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="org.thdl.tib.scanner.WindowScannerFilter"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="tt-applet-plus-jws-dist" depends="tt-applet-plus-jws-compile"
|
||||||
|
description="generates the applet-plus-jws translation tool's binary distribution." >
|
||||||
|
<!-- Put everything in ${ttappletjwsbin} into the JAR file -->
|
||||||
|
<jar jarfile="${dist}/lib/DictionarySearchAppletAndJavaWebStart-${DSTAMP}.jar"
|
||||||
|
basedir="${ttappletjwsbin}">
|
||||||
|
<!-- We have two choices here, but the web page will call for
|
||||||
|
AppletScannerFilter, so the double-click should open the
|
||||||
|
standalone version, WindowScannerFilter: -->
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="org.thdl.tib.scanner.WindowScannerFilter"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="tt-servlet-dist" depends="tt-servlet-compile"
|
||||||
|
description="generates the servlet translation tool's binary distribution." >
|
||||||
|
<!-- Put everything in ${ttservletbin} into the JAR file -->
|
||||||
|
<jar jarfile="${dist}/lib/DictionarySearchServlet-${DSTAMP}.jar"
|
||||||
|
basedir="${ttservletbin}">
|
||||||
|
<!-- I don't think this'll work, but the main class is the following, so why not: -->
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="org.thdl.tib.scanner.ConsoleScannerFilter"/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="savant-dist" depends="savant-compile"
|
<target name="savant-dist" depends="savant-compile"
|
||||||
description="generates the bare Savant binary distribution" >
|
description="generates the bare Savant binary distribution" >
|
||||||
<!-- Put everything in ${savantbin} into the JAR file -->
|
<!-- Put everything in ${savantbin} into the JAR file -->
|
||||||
|
@ -291,16 +375,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- DLC FIXME: This used to inlude Jskad2Javascript.class, etc. But it no longer does. Compile those extra files! -->
|
||||||
<target name="jskad-all-in-one-dist" depends="jskad-compile"
|
<target name="jskad-all-in-one-dist" depends="jskad-compile"
|
||||||
description="generates the self-contained binary distribution for Jskad" >
|
description="generates the self-contained binary distribution for Jskad" >
|
||||||
<!-- Now put everything in ${bin} and ${ext}/netscape, plus
|
<!-- Now put everything in ${bin} and ${ext}/netscape, plus
|
||||||
the .ini files, into the JAR file
|
the .ini files, into the JAR file
|
||||||
-->
|
-->
|
||||||
<copy todir="${jskadbin}">
|
|
||||||
<fileset dir="${source}">
|
|
||||||
<include name="org/thdl/tib/**/*.ini"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${jskadbin}/netscape">
|
<copy todir="${jskadbin}/netscape">
|
||||||
<fileset dir="${ext}/netscape"/>
|
<fileset dir="${ext}/netscape"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
@ -317,17 +397,15 @@
|
||||||
|
|
||||||
|
|
||||||
<target name="clean"
|
<target name="clean"
|
||||||
description="cleans up a few things, but not all" >
|
description="cleans up a few things, but not all (not the Javadocs, e.g.)" >
|
||||||
<!-- Delete the ${bin} and ${dist} directory trees -->
|
<!-- Delete the ${bin} and ${dist} directory trees -->
|
||||||
<delete dir="${bin}"/>
|
<delete dir="${bin}"/>
|
||||||
<delete dir="${jskadbin}"/>
|
|
||||||
<delete dir="${qdbin}"/>
|
|
||||||
<delete dir="${ttbin}"/>
|
|
||||||
<delete dir="${savantbin}"/>
|
|
||||||
<delete dir="${dist}"/>
|
<delete dir="${dist}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Automake build systems use a 'make distclean' target, hence the
|
||||||
|
admittedly rather confusing name. Trust the description. -->
|
||||||
<target name="distclean"
|
<target name="distclean"
|
||||||
description="cleans up so your directory once again looks like the source distribution"
|
description="cleans up so your directory once again looks like the source distribution"
|
||||||
depends="clean" >
|
depends="clean" >
|
||||||
|
@ -410,6 +488,82 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="qd-run" depends="qd-dist" description="runs QuillDriver">
|
||||||
|
<java classname="org.thdl.quilldriver.QDShell" fork="yes">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}/lib/QuillDriver-${DSTAMP}.jar"/>
|
||||||
|
<path refid="entire.class.path"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
||||||
|
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="savant-run" depends="savant-dist" description="runs Savant">
|
||||||
|
<java classname="org.thdl.savant.SavantShell" fork="yes">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}/lib/Savant-${DSTAMP}.jar"/>
|
||||||
|
<path refid="entire.class.path"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
||||||
|
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jskad-run" depends="jskad-dist" description="runs Jskad">
|
||||||
|
<java classname="org.thdl.tib.input.Jskad" fork="yes">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}/lib/Jskad-${DSTAMP}.jar"/>
|
||||||
|
<path refid="entire.class.path"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
||||||
|
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="tt-run" depends="tt-standalone-dist" description="runs the standalone translation tool">
|
||||||
|
<java classname="org.thdl.tib.scanner.WindowScannerFilter" fork="yes">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}/lib/DictionarySearchStandalone-${DSTAMP}.jar"/>
|
||||||
|
<path refid="entire.class.path"/>
|
||||||
|
</classpath>
|
||||||
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
||||||
|
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
||||||
|
<!-- For non-swing version: <arg value="-simple"/> -->
|
||||||
|
<arg value="${arch.dict}"/>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- See http://thdltools.sf.net/CuttingReleases.html for info on
|
||||||
|
how to use this target. Note that we must do a distclean
|
||||||
|
because Ant doesn't always recompile when it should. -->
|
||||||
|
<target name="releases"
|
||||||
|
description="builds the releases under 'dist/releases/' after doing a distclean"
|
||||||
|
depends="distclean">
|
||||||
|
<mkdir dir="${dist}/releases"/>
|
||||||
|
<antcall target="dist">
|
||||||
|
<param name="javacdashg" value="no"/>
|
||||||
|
<param name="dist" value="${dist}/releases"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="src-dist">
|
||||||
|
<param name="dist" value="${dist}/releases"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="public-javadocs-dist">
|
||||||
|
<param name="dist" value="${dist}/releases"/>
|
||||||
|
</antcall>
|
||||||
|
<antcall target="private-javadocs-dist">
|
||||||
|
<param name="dist" value="${dist}/releases"/>
|
||||||
|
</antcall>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -->
|
<!-- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -->
|
||||||
<!-- UTILITY TARGETS - targets of antcalls, targets not usually
|
<!-- UTILITY TARGETS - targets of antcalls, targets not usually
|
||||||
directly called. -->
|
directly called. -->
|
||||||
|
@ -417,7 +571,7 @@
|
||||||
|
|
||||||
<!-- Utility target called by private-javadocs and public-javadocs -->
|
<!-- Utility target called by private-javadocs and public-javadocs -->
|
||||||
<target name="our-javadocs" depends="init"
|
<target name="our-javadocs" depends="init"
|
||||||
description="makes Javadoc documentation; NOT A USER TARGET" >
|
description="INTERNAL TASK: makes Javadoc documentation; usually not called directly" >
|
||||||
|
|
||||||
<!-- See http://jakarta.apache.org/ant/manual/CoreTasks/javadoc.html
|
<!-- See http://jakarta.apache.org/ant/manual/CoreTasks/javadoc.html
|
||||||
to learn more about the Javadoc task.
|
to learn more about the Javadoc task.
|
||||||
|
@ -467,75 +621,66 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="qd-run" depends="qd-dist" description="runs QuillDriver">
|
<target name="copy-license-to-bin-dir-for-jarring"
|
||||||
<java classname="org.thdl.quilldriver.QDShell" fork="yes">
|
depends="init"
|
||||||
<classpath>
|
description="INTERNAL TASK: Copies the license documents to the bin directory. Usually not called directly.">
|
||||||
<pathelement location="${dist}/lib/QuillDriver-${DSTAMP}.jar"/>
|
<copy todir="${mybin}">
|
||||||
<path refid="entire.class.path"/>
|
<fileset dir="${license}"/>
|
||||||
</classpath>
|
</copy>
|
||||||
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
||||||
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
|
||||||
</java>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="savant-run" depends="savant-dist" description="runs Savant">
|
|
||||||
<java classname="org.thdl.savant.SavantShell" fork="yes">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="${dist}/lib/Savant-${DSTAMP}.jar"/>
|
|
||||||
<path refid="entire.class.path"/>
|
|
||||||
</classpath>
|
|
||||||
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
||||||
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
|
||||||
</java>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="jskad-run" depends="jskad-dist" description="runs Jskad">
|
|
||||||
<java classname="org.thdl.tib.input.Jskad" fork="yes">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="${dist}/lib/Jskad-${DSTAMP}.jar"/>
|
|
||||||
<path refid="entire.class.path"/>
|
|
||||||
</classpath>
|
|
||||||
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
||||||
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
|
||||||
</java>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="tt-run" depends="tt-dist" description="runs TranslationDesktop">
|
|
||||||
<java classname="org.thdl.tib.scanner.WindowScannerFilter" fork="yes">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="${dist}/lib/TranslationDesktop-${DSTAMP}.jar"/>
|
|
||||||
<path refid="entire.class.path"/>
|
|
||||||
</classpath>
|
|
||||||
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
||||||
<jvmarg value="-DTHDL_DIE_ON_IFFY_CODE=${thdl.die.on.iffy}"/>
|
|
||||||
<!-- For non-swing version: <arg value="-simple"/> -->
|
|
||||||
<arg value="${arch.dict}"/>
|
|
||||||
</java>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!-- See http://thdltools.sf.net/CuttingReleases.html for info on
|
<target name="copy-ini-files-to-bin-dir-for-jarring"
|
||||||
how to use this target. Note that we must do a distclean
|
depends="init"
|
||||||
because Ant doesn't always recompile when it should. -->
|
description="INTERNAL TASK: Copies the *.ini files to the bin directory. Usually not called directly.">
|
||||||
<target name="releases"
|
<copy todir="${mybin}">
|
||||||
description="builds the releases under 'dist/releases/' after doing a distclean"
|
<fileset dir="${source}">
|
||||||
depends="distclean">
|
<include name="org/thdl/tib/**/*.ini"/>
|
||||||
<mkdir dir="${dist}/releases"/>
|
</fileset>
|
||||||
<antcall target="dist">
|
</copy>
|
||||||
<param name="javacdashg" value="no"/>
|
|
||||||
<param name="dist" value="${dist}/releases"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="src-dist">
|
|
||||||
<param name="dist" value="${dist}/releases"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="public-javadocs-dist">
|
|
||||||
<param name="dist" value="${dist}/releases"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="private-javadocs-dist">
|
|
||||||
<param name="dist" value="${dist}/releases"/>
|
|
||||||
</antcall>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- DLC FIXME: we need a compile-all that uses if="" and <available> . -->
|
|
||||||
|
<!-- To avoid duplicating very similar compilation tasks, we antcall
|
||||||
|
this task. We do this once per class we want, and javac is
|
||||||
|
smart enough to find dependent classes and compile them. -->
|
||||||
|
<target name="our-internal-javac-task"
|
||||||
|
depends="init"
|
||||||
|
description="INTERNAL TASK: Compiles according to Ant properties. Usually not called directly.">
|
||||||
|
|
||||||
|
<!-- Be sure we're going to be able to compile something: -->
|
||||||
|
<available file="${source}/${my.included.source.file}" property="found.file.to.compile"/>
|
||||||
|
<fail message="Can't find the file '${source}/${my.included.source.file}' to compile it! Don't worry about forward vs. backward slashes, by the way--Ant is smart about those."
|
||||||
|
unless="found.file.to.compile"/>
|
||||||
|
|
||||||
|
|
||||||
|
<javac destdir="${mybin}" debug="${javacdashg}" target="${target.jvm}">
|
||||||
|
<classpath refid="entire.class.path"/>
|
||||||
|
<src path="${source}"/>
|
||||||
|
<include name="${my.included.source.file}" />
|
||||||
|
|
||||||
|
<!-- Exclude JUnit tests: -->
|
||||||
|
<exclude name="**/*Test.java" />
|
||||||
|
<exclude name="**/*AllTests.java" />
|
||||||
|
|
||||||
|
<!-- Don't compile these resources (we could leave this out, but
|
||||||
|
Ant's debugging output would confuse us, and having this
|
||||||
|
explicit is a Good Thing: -->
|
||||||
|
<exclude name="**/*.properties" />
|
||||||
|
<exclude name="**/*.rtf" />
|
||||||
|
<exclude name="**/*.txt" />
|
||||||
|
<exclude name="**/*.ini" />
|
||||||
|
<exclude name="**/*.html" />
|
||||||
|
<exclude name="**/*.gif" />
|
||||||
|
<exclude name="**/*.jpg" />
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
<!-- My TO-DO list: -->
|
||||||
|
|
||||||
|
<!-- DLC FIXME: we need a compile-all that uses if="" and <available>. -->
|
||||||
|
|
||||||
|
<!-- DLC FIXME: Now that we use javac -target 1.1, do we need a
|
||||||
|
separate tt-handheld and tt-standalone? -->
|
||||||
|
|
Loading…
Reference in a new issue