|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<!-- @author David Chandler -->
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
|
|
Quick start: This buildfile looks for the following, which are not in
|
|
|
|
|
the CVS repository:
|
|
|
|
@ -26,8 +26,18 @@ info on where to find these.
|
|
|
|
|
example. Read the comments of this buildfile to learn more.
|
|
|
|
|
</description>
|
|
|
|
|
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- Ant extensions we use: -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- See http://www.vamphq.com/ant.html for vamp*: -->
|
|
|
|
|
<taskdef name="vampwar" classname="venus.ant.taskdefs.VampWar" />
|
|
|
|
|
<taskdef name="vampinstaller" classname="venus.ant.taskdefs.VampInstaller" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- set global properties for this build -->
|
|
|
|
|
<property name="my.jar.suffix" value="vanilla"/>
|
|
|
|
|
<property name="javacdashg" value="yes"/>
|
|
|
|
|
<property name="source" location="source"/>
|
|
|
|
|
<property name="license" location="license"/>
|
|
|
|
@ -99,8 +109,10 @@ info on where to find these.
|
|
|
|
|
<!-- Create the time stamp -->
|
|
|
|
|
<tstamp/>
|
|
|
|
|
<!-- Create the build directory structure used by compile -->
|
|
|
|
|
<mkdir dir="${dist}"/>
|
|
|
|
|
<mkdir dir="${dist}/releases"/>
|
|
|
|
|
<mkdir dir="${dist}/docs"/>
|
|
|
|
|
<mkdir dir="${dist}/lib"/>
|
|
|
|
|
<mkdir dir="${dist}/java-web-start"/>
|
|
|
|
|
<mkdir dir="${dist}/source"/>
|
|
|
|
|
<mkdir dir="${bin}"/>
|
|
|
|
|
<mkdir dir="${jskadbin}"/>
|
|
|
|
@ -116,7 +128,7 @@ info on where to find these.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="test-all"
|
|
|
|
|
depends="clean,distclean,compile,dist,src-dist,self-contained-dist,public-javadocs-dist,private-javadocs-dist,releases"
|
|
|
|
|
depends="clean,distclean,compile,dist,src-dist,self-contained-dist,public-javadocs-dist,private-javadocs-dist,releases,web-start-releases"
|
|
|
|
|
description="runs every target in this buildfile in a smart order; useful for testing the buildfile and your build environment" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -300,7 +312,7 @@ info on where to find these.
|
|
|
|
|
<target name="jskad-dist" depends="jskad-compile"
|
|
|
|
|
description="generates the bare Jskad binary distribution" >
|
|
|
|
|
<!-- Put everything in ${jskadbin} into the JAR file -->
|
|
|
|
|
<jar jarfile="${dist}/lib/Jskad-${DSTAMP}.jar"
|
|
|
|
|
<jar jarfile="${dist}/lib/Jskad-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${jskadbin}">
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class" value="org.thdl.tib.input.Jskad"/>
|
|
|
|
@ -314,7 +326,7 @@ info on where to find these.
|
|
|
|
|
<target name="tt-standalone-dist" depends="tt-standalone-compile"
|
|
|
|
|
description="generates the standalone translation tool's binary distribution." >
|
|
|
|
|
<!-- Put everything in ${ttstandalonebin} into the JAR file -->
|
|
|
|
|
<jar jarfile="${dist}/lib/DictionarySearchStandalone-${DSTAMP}.jar"
|
|
|
|
|
<jar jarfile="${dist}/lib/DictionarySearchStandalone-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${ttstandalonebin}">
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class"
|
|
|
|
@ -327,7 +339,7 @@ info on where to find these.
|
|
|
|
|
<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"
|
|
|
|
|
<jar jarfile="${dist}/lib/DictionarySearchHandheld-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${tthandheldbin}">
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class"
|
|
|
|
@ -340,7 +352,7 @@ info on where to find these.
|
|
|
|
|
<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"
|
|
|
|
|
<jar jarfile="${dist}/lib/DictionarySearchAppletAndJavaWebStart-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${ttappletjwsbin}">
|
|
|
|
|
<!-- We have two choices here, but the web page will call for
|
|
|
|
|
AppletScannerFilter, so the double-click should open the
|
|
|
|
@ -356,7 +368,7 @@ info on where to find these.
|
|
|
|
|
<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"
|
|
|
|
|
<jar jarfile="${dist}/lib/DictionarySearchServlet-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${ttservletbin}">
|
|
|
|
|
|
|
|
|
|
<!-- I don't think this'll work (I don't know servlets, mind
|
|
|
|
@ -372,7 +384,7 @@ info on where to find these.
|
|
|
|
|
<target name="savant-dist" depends="savant-compile"
|
|
|
|
|
description="generates the bare Savant binary distribution" >
|
|
|
|
|
<!-- Put everything in ${savantbin} into the JAR file -->
|
|
|
|
|
<jar jarfile="${dist}/lib/Savant-${DSTAMP}.jar"
|
|
|
|
|
<jar jarfile="${dist}/lib/Savant-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${savantbin}">
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class" value="org.thdl.savant.SavantShell"/>
|
|
|
|
@ -384,7 +396,7 @@ info on where to find these.
|
|
|
|
|
<target name="qd-dist" depends="qd-compile"
|
|
|
|
|
description="generates the bare QuillDriver binary distribution" >
|
|
|
|
|
<!-- Put everything in ${qdbin} into the JAR file -->
|
|
|
|
|
<jar jarfile="${dist}/lib/QuillDriver-${DSTAMP}.jar"
|
|
|
|
|
<jar jarfile="${dist}/lib/QuillDriver-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${qdbin}">
|
|
|
|
|
<manifest>
|
|
|
|
|
<attribute name="Main-Class" value="org.thdl.quilldriver.QDShell"/>
|
|
|
|
@ -403,7 +415,7 @@ info on where to find these.
|
|
|
|
|
<copy todir="${jskadbin}/netscape">
|
|
|
|
|
<fileset dir="${ext}/netscape"/>
|
|
|
|
|
</copy>
|
|
|
|
|
<jar jarfile="${dist}/lib/Jskad-self-contained-${DSTAMP}.jar"
|
|
|
|
|
<jar jarfile="${dist}/lib/Jskad-self-contained-${my.jar.suffix}.jar"
|
|
|
|
|
basedir="${jskadbin}"
|
|
|
|
|
includes="org/thdl/tib/**,org/thdl/util/**,netscape/**"
|
|
|
|
|
index="true"
|
|
|
|
@ -419,7 +431,11 @@ info on where to find these.
|
|
|
|
|
description="cleans up a few things, but not all (not the Javadocs, e.g.)" >
|
|
|
|
|
<!-- Delete the ${bin} and ${dist} directory trees -->
|
|
|
|
|
<delete dir="${bin}"/>
|
|
|
|
|
<delete dir="${dist}"/>
|
|
|
|
|
<delete dir="${dist}/docs"/>
|
|
|
|
|
<delete dir="${dist}/java-web-start"/>
|
|
|
|
|
<delete dir="${dist}/lib"/>
|
|
|
|
|
<delete dir="${dist}/releases"/>
|
|
|
|
|
<delete dir="${dist}/source"/>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -473,7 +489,6 @@ info on where to find these.
|
|
|
|
|
|
|
|
|
|
<target name="public-javadocs-dist" depends="public-javadocs"
|
|
|
|
|
description="makes zip file of Javadoc documentation for public/protected classes, methods, and fields" >
|
|
|
|
|
<mkdir dir="${dist}/docs"/>
|
|
|
|
|
<tstamp/>
|
|
|
|
|
<zip destfile="${dist}/docs/public-javadocs-${DSTAMP}.zip"
|
|
|
|
|
basedir="${publicjavadocs}"/>
|
|
|
|
@ -482,7 +497,6 @@ info on where to find these.
|
|
|
|
|
|
|
|
|
|
<target name="private-javadocs-dist" depends="private-javadocs"
|
|
|
|
|
description="makes zip file of Javadoc documentation for ALL classes, methods, and fields" >
|
|
|
|
|
<mkdir dir="${dist}/docs"/>
|
|
|
|
|
<tstamp/>
|
|
|
|
|
<zip destfile="${dist}/docs/private-javadocs-${DSTAMP}.zip"
|
|
|
|
|
basedir="${privatejavadocs}"/>
|
|
|
|
@ -512,7 +526,7 @@ info on where to find these.
|
|
|
|
|
<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"/>
|
|
|
|
|
<pathelement location="${dist}/lib/QuillDriver-${my.jar.suffix}.jar"/>
|
|
|
|
|
<path refid="entire.class.path"/>
|
|
|
|
|
</classpath>
|
|
|
|
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
|
|
@ -523,7 +537,7 @@ info on where to find these.
|
|
|
|
|
<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"/>
|
|
|
|
|
<pathelement location="${dist}/lib/Savant-${my.jar.suffix}.jar"/>
|
|
|
|
|
<path refid="entire.class.path"/>
|
|
|
|
|
</classpath>
|
|
|
|
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
|
|
@ -534,7 +548,7 @@ info on where to find these.
|
|
|
|
|
<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"/>
|
|
|
|
|
<pathelement location="${dist}/lib/Jskad-${my.jar.suffix}.jar"/>
|
|
|
|
|
<path refid="entire.class.path"/>
|
|
|
|
|
</classpath>
|
|
|
|
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
|
|
@ -546,7 +560,7 @@ info on where to find these.
|
|
|
|
|
<java classname="org.thdl.tib.scanner.WindowScannerFilter" fork="yes">
|
|
|
|
|
<classpath>
|
|
|
|
|
<pathelement
|
|
|
|
|
location="${dist}/lib/DictionarySearchStandalone-${DSTAMP}.jar"/>
|
|
|
|
|
location="${dist}/lib/DictionarySearchStandalone-${my.jar.suffix}.jar"/>
|
|
|
|
|
<path refid="entire.class.path"/>
|
|
|
|
|
</classpath>
|
|
|
|
|
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
|
|
|
|
@ -557,13 +571,14 @@ info on where to find these.
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- DLC FIXME: build the tt-servlet release if the J2EE SDK is present. -->
|
|
|
|
|
<!-- DLC FIXME build web start WARs -->
|
|
|
|
|
<!-- 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"/>
|
|
|
|
|
depends="distclean,init">
|
|
|
|
|
<antcall target="dist">
|
|
|
|
|
<param name="javacdashg" value="no"/>
|
|
|
|
|
<param name="dist" value="${dist}/releases"/>
|
|
|
|
@ -580,10 +595,53 @@ info on where to find these.
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="web-start-releases"
|
|
|
|
|
depends="jskad-jws,savant-jws,qd-jws,tt-jws"
|
|
|
|
|
description="Builds the Java Web Start versions of all applications"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="jskad-jws"
|
|
|
|
|
depends="init"
|
|
|
|
|
description="Builds the Java Web Start version of Jskad">
|
|
|
|
|
<antcall target="package-for-java-web-start">
|
|
|
|
|
<param name="my.app" value="Jskad"/>
|
|
|
|
|
<param name="my.prereq" value="jskad-dist"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- DLC FIXME: package up all the XML jars and the JMF jars and libraries that Savant uses.
|
|
|
|
|
-->
|
|
|
|
|
<target name="savant-jws"
|
|
|
|
|
depends="init"
|
|
|
|
|
description="Builds the Java Web Start version of Savant">
|
|
|
|
|
<antcall target="package-for-java-web-start">
|
|
|
|
|
<param name="my.app" value="Savant"/>
|
|
|
|
|
<param name="my.prereq" value="savant-dist"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- DLC FIXME: package up all the XML jars and the JMF jars and libraries that QuillDriver uses.
|
|
|
|
|
-->
|
|
|
|
|
<target name="qd-jws"
|
|
|
|
|
depends="init"
|
|
|
|
|
description="Builds the Java Web Start version of QuillDriver">
|
|
|
|
|
<antcall target="package-for-java-web-start">
|
|
|
|
|
<param name="my.app" value="QuillDriver"/>
|
|
|
|
|
<param name="my.prereq" value="qd-dist"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="tt-jws"
|
|
|
|
|
depends="init"
|
|
|
|
|
description="Builds the Java Web Start version of the translation tool">
|
|
|
|
|
<antcall target="package-for-java-web-start">
|
|
|
|
|
<param name="my.app" value="DictionarySearchAppletAndJavaWebStart"/>
|
|
|
|
|
<param name="my.prereq" value="tt-applet-plus-jws-dist"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -->
|
|
|
|
@ -601,13 +659,13 @@ info on where to find these.
|
|
|
|
|
|
|
|
|
|
<tstamp>
|
|
|
|
|
<format property="javadoc.creation.time" pattern="MM/dd/yyyy hh:mm aa"/>
|
|
|
|
|
</tstamp>
|
|
|
|
|
</tstamp>
|
|
|
|
|
|
|
|
|
|
<!-- We don't really use @version correctly, do we? So version="false". -->
|
|
|
|
|
<javadoc destdir="${our-javadocs-destdir}"
|
|
|
|
|
author="true"
|
|
|
|
|
access="${access}"
|
|
|
|
|
version="false"
|
|
|
|
|
version="false"
|
|
|
|
|
use="true"
|
|
|
|
|
classpathref="entire.class.path"
|
|
|
|
|
windowtitle="THDL Tools APIs"
|
|
|
|
@ -699,6 +757,61 @@ info on where to find these.
|
|
|
|
|
</javac>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="package-for-java-web-start"
|
|
|
|
|
depends="clean"
|
|
|
|
|
description="Builds the Java Web Start version of ${my.app}">
|
|
|
|
|
|
|
|
|
|
<!-- First, you must give the passwords so that we can sign the JARs. -->
|
|
|
|
|
<fail message="Use 'ant -Dkeystore.password=psst' to sign a Java Web Start WAR file."
|
|
|
|
|
unless="keystore.password"/>
|
|
|
|
|
<fail message="Use 'ant -Ddgkey.password=psst' to sign a Java Web Start WAR file."
|
|
|
|
|
unless="dgkey.password"/>
|
|
|
|
|
<!-- Now, having cleaned, we create ${my.app}-JWS.jar: -->
|
|
|
|
|
<antcall target="${my.prereq}">
|
|
|
|
|
<param name="my.jar.suffix" value="JWS"/>
|
|
|
|
|
<param name="javacdashg" value="no"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
|
|
<!-- Now use the Venus Application Publisher's (Vamp's) Ant task
|
|
|
|
|
to create a .war file. We don't use Tomcat or the like to
|
|
|
|
|
distribute our apps at this point, so once we don't need the
|
|
|
|
|
WAR file. Thus, we'll run 'jar xf ${my.app}-web-start.war
|
|
|
|
|
${my.app}-JWS.jar ${my.app}.jnlp' and copy the .jar and the .jnlp
|
|
|
|
|
file to the web server. (Be sure that the web server has its
|
|
|
|
|
MIME types configured correctly so that the .jnlp file is
|
|
|
|
|
served as an application/jnlp or the like, not text/xml.)
|
|
|
|
|
|
|
|
|
|
If you change web servers or the location on the web server
|
|
|
|
|
where the JAR and jnlp file are located, you have to edit
|
|
|
|
|
${my.app}.jnlp. Note that doing so will mean that users who've
|
|
|
|
|
installed ${my.app} from the old location will NOT be able to
|
|
|
|
|
seamlessly upgrade, so don't do this often.
|
|
|
|
|
|
|
|
|
|
To install the Vamp Ant task, visit
|
|
|
|
|
'http://www.vamphq.com/ant.html' and follow the instructions.
|
|
|
|
|
Note that you *CAN* just vamp.jar into Ant's 'lib' directory
|
|
|
|
|
with Ant 1.5.1.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<vampwar dest="${dist}/java-web-start/${my.app}-web-start.war">
|
|
|
|
|
<jnlp src="${dist}/${my.app}.jnlp">
|
|
|
|
|
<resources>
|
|
|
|
|
<fileset dir="${dist}/lib">
|
|
|
|
|
<include name="${my.app}-JWS.jar" />
|
|
|
|
|
</fileset>
|
|
|
|
|
</resources>
|
|
|
|
|
</jnlp>
|
|
|
|
|
|
|
|
|
|
<!-- David Chandler signs our JARs for now, and he uses this info: -->
|
|
|
|
|
<jarsigner
|
|
|
|
|
keystore = "file:///f:/thdl/Jskad/thawte/keystore"
|
|
|
|
|
storepass = "${keystore.password}"
|
|
|
|
|
keypass = "${dgkey.password}"
|
|
|
|
|
alias = "David Germano"/>
|
|
|
|
|
</vampwar>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
</project>
|
|
|
|
|
|
|
|
|
|
<!-- My TO-DO list: -->
|
|
|
|
|