The build system now creates Java Web Start releases for all four programs.

At present, dist/*.jnlp refer to my own personal web server, and the build
system is aware of my personal keystore because creating a JWS release
involves signing JARs.  It will be very simple to change this once we have
a real PKI certificate and once we deploy on thdl.org.

Note that Savant and QuillDriver's releases are only half-done right now;
they do not include the XML and JMF libraries yet.
This commit is contained in:
dchandler 2002-10-12 18:30:14 +00:00
parent 5cfd45cf32
commit d50b41b87f
7 changed files with 243 additions and 23 deletions

View file

@ -1,5 +1,4 @@
bin bin
dist
jskad.log jskad.log
savant.log savant.log
qd.log qd.log

151
build.xml
View file

@ -26,8 +26,18 @@ info on where to find these.
example. Read the comments of this buildfile to learn more. example. Read the comments of this buildfile to learn more.
</description> </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 --> <!-- set global properties for this build -->
<property name="my.jar.suffix" value="vanilla"/>
<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="license" location="license"/>
@ -99,8 +109,10 @@ info on where to find these.
<!-- Create the time stamp --> <!-- Create the time stamp -->
<tstamp/> <tstamp/>
<!-- Create the build directory structure used by compile --> <!-- 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}/lib"/>
<mkdir dir="${dist}/java-web-start"/>
<mkdir dir="${dist}/source"/> <mkdir dir="${dist}/source"/>
<mkdir dir="${bin}"/> <mkdir dir="${bin}"/>
<mkdir dir="${jskadbin}"/> <mkdir dir="${jskadbin}"/>
@ -116,7 +128,7 @@ info on where to find these.
<target name="test-all" <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" /> 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" <target name="jskad-dist" depends="jskad-compile"
description="generates the bare Jskad binary distribution" > description="generates the bare Jskad binary distribution" >
<!-- Put everything in ${jskadbin} into the JAR file --> <!-- 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}"> basedir="${jskadbin}">
<manifest> <manifest>
<attribute name="Main-Class" value="org.thdl.tib.input.Jskad"/> <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" <target name="tt-standalone-dist" depends="tt-standalone-compile"
description="generates the standalone translation tool's binary distribution." > description="generates the standalone translation tool's binary distribution." >
<!-- Put everything in ${ttstandalonebin} into the JAR file --> <!-- 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}"> basedir="${ttstandalonebin}">
<manifest> <manifest>
<attribute name="Main-Class" <attribute name="Main-Class"
@ -327,7 +339,7 @@ info on where to find these.
<target name="tt-handheld-dist" depends="tt-handheld-compile" <target name="tt-handheld-dist" depends="tt-handheld-compile"
description="generates the handheld translation tool's binary distribution." > description="generates the handheld translation tool's binary distribution." >
<!-- Put everything in ${tthandheldbin} into the JAR file --> <!-- 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}"> basedir="${tthandheldbin}">
<manifest> <manifest>
<attribute name="Main-Class" <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" <target name="tt-applet-plus-jws-dist" depends="tt-applet-plus-jws-compile"
description="generates the applet-plus-jws translation tool's binary distribution." > description="generates the applet-plus-jws translation tool's binary distribution." >
<!-- Put everything in ${ttappletjwsbin} into the JAR file --> <!-- 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}"> basedir="${ttappletjwsbin}">
<!-- We have two choices here, but the web page will call for <!-- We have two choices here, but the web page will call for
AppletScannerFilter, so the double-click should open the 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" <target name="tt-servlet-dist" depends="tt-servlet-compile"
description="generates the servlet translation tool's binary distribution." > description="generates the servlet translation tool's binary distribution." >
<!-- Put everything in ${ttservletbin} into the JAR file --> <!-- 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}"> basedir="${ttservletbin}">
<!-- I don't think this'll work (I don't know servlets, mind <!-- 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" <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 -->
<jar jarfile="${dist}/lib/Savant-${DSTAMP}.jar" <jar jarfile="${dist}/lib/Savant-${my.jar.suffix}.jar"
basedir="${savantbin}"> basedir="${savantbin}">
<manifest> <manifest>
<attribute name="Main-Class" value="org.thdl.savant.SavantShell"/> <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" <target name="qd-dist" depends="qd-compile"
description="generates the bare QuillDriver binary distribution" > description="generates the bare QuillDriver binary distribution" >
<!-- Put everything in ${qdbin} into the JAR file --> <!-- 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}"> basedir="${qdbin}">
<manifest> <manifest>
<attribute name="Main-Class" value="org.thdl.quilldriver.QDShell"/> <attribute name="Main-Class" value="org.thdl.quilldriver.QDShell"/>
@ -403,7 +415,7 @@ info on where to find these.
<copy todir="${jskadbin}/netscape"> <copy todir="${jskadbin}/netscape">
<fileset dir="${ext}/netscape"/> <fileset dir="${ext}/netscape"/>
</copy> </copy>
<jar jarfile="${dist}/lib/Jskad-self-contained-${DSTAMP}.jar" <jar jarfile="${dist}/lib/Jskad-self-contained-${my.jar.suffix}.jar"
basedir="${jskadbin}" basedir="${jskadbin}"
includes="org/thdl/tib/**,org/thdl/util/**,netscape/**" includes="org/thdl/tib/**,org/thdl/util/**,netscape/**"
index="true" 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.)" > 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="${dist}"/> <delete dir="${dist}/docs"/>
<delete dir="${dist}/java-web-start"/>
<delete dir="${dist}/lib"/>
<delete dir="${dist}/releases"/>
<delete dir="${dist}/source"/>
</target> </target>
@ -473,7 +489,6 @@ info on where to find these.
<target name="public-javadocs-dist" depends="public-javadocs" <target name="public-javadocs-dist" depends="public-javadocs"
description="makes zip file of Javadoc documentation for public/protected classes, methods, and fields" > description="makes zip file of Javadoc documentation for public/protected classes, methods, and fields" >
<mkdir dir="${dist}/docs"/>
<tstamp/> <tstamp/>
<zip destfile="${dist}/docs/public-javadocs-${DSTAMP}.zip" <zip destfile="${dist}/docs/public-javadocs-${DSTAMP}.zip"
basedir="${publicjavadocs}"/> basedir="${publicjavadocs}"/>
@ -482,7 +497,6 @@ info on where to find these.
<target name="private-javadocs-dist" depends="private-javadocs" <target name="private-javadocs-dist" depends="private-javadocs"
description="makes zip file of Javadoc documentation for ALL classes, methods, and fields" > description="makes zip file of Javadoc documentation for ALL classes, methods, and fields" >
<mkdir dir="${dist}/docs"/>
<tstamp/> <tstamp/>
<zip destfile="${dist}/docs/private-javadocs-${DSTAMP}.zip" <zip destfile="${dist}/docs/private-javadocs-${DSTAMP}.zip"
basedir="${privatejavadocs}"/> basedir="${privatejavadocs}"/>
@ -512,7 +526,7 @@ info on where to find these.
<target name="qd-run" depends="qd-dist" description="runs QuillDriver"> <target name="qd-run" depends="qd-dist" description="runs QuillDriver">
<java classname="org.thdl.quilldriver.QDShell" fork="yes"> <java classname="org.thdl.quilldriver.QDShell" fork="yes">
<classpath> <classpath>
<pathelement location="${dist}/lib/QuillDriver-${DSTAMP}.jar"/> <pathelement location="${dist}/lib/QuillDriver-${my.jar.suffix}.jar"/>
<path refid="entire.class.path"/> <path refid="entire.class.path"/>
</classpath> </classpath>
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/> <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"> <target name="savant-run" depends="savant-dist" description="runs Savant">
<java classname="org.thdl.savant.SavantShell" fork="yes"> <java classname="org.thdl.savant.SavantShell" fork="yes">
<classpath> <classpath>
<pathelement location="${dist}/lib/Savant-${DSTAMP}.jar"/> <pathelement location="${dist}/lib/Savant-${my.jar.suffix}.jar"/>
<path refid="entire.class.path"/> <path refid="entire.class.path"/>
</classpath> </classpath>
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/> <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"> <target name="jskad-run" depends="jskad-dist" description="runs Jskad">
<java classname="org.thdl.tib.input.Jskad" fork="yes"> <java classname="org.thdl.tib.input.Jskad" fork="yes">
<classpath> <classpath>
<pathelement location="${dist}/lib/Jskad-${DSTAMP}.jar"/> <pathelement location="${dist}/lib/Jskad-${my.jar.suffix}.jar"/>
<path refid="entire.class.path"/> <path refid="entire.class.path"/>
</classpath> </classpath>
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/> <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"> <java classname="org.thdl.tib.scanner.WindowScannerFilter" fork="yes">
<classpath> <classpath>
<pathelement <pathelement
location="${dist}/lib/DictionarySearchStandalone-${DSTAMP}.jar"/> location="${dist}/lib/DictionarySearchStandalone-${my.jar.suffix}.jar"/>
<path refid="entire.class.path"/> <path refid="entire.class.path"/>
</classpath> </classpath>
<jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/> <jvmarg value="-DTHDL_DEBUG=${thdl.debug}"/>
@ -557,13 +571,14 @@ info on where to find these.
</target> </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 <!-- See http://thdltools.sf.net/CuttingReleases.html for info on
how to use this target. Note that we must do a distclean how to use this target. Note that we must do a distclean
because Ant doesn't always recompile when it should. --> because Ant doesn't always recompile when it should. -->
<target name="releases" <target name="releases"
description="builds the releases under 'dist/releases/' after doing a distclean" description="builds the releases under 'dist/releases/' after doing a distclean"
depends="distclean"> depends="distclean,init">
<mkdir dir="${dist}/releases"/>
<antcall target="dist"> <antcall target="dist">
<param name="javacdashg" value="no"/> <param name="javacdashg" value="no"/>
<param name="dist" value="${dist}/releases"/> <param name="dist" value="${dist}/releases"/>
@ -580,10 +595,53 @@ info on where to find these.
</target> </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>
<!-- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* --> <!-- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -->
@ -699,6 +757,61 @@ info on where to find these.
</javac> </javac>
</target> </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> </project>
<!-- My TO-DO list: --> <!-- My TO-DO list: -->

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://iris.lib.virginia.edu/tibet/tools"
href="DictionarySearchAppletAndJavaWebStart.jnlp">
<information>
<title>DictionarySearchAppletAndJavaWebStart</title>
<vendor>THDL</vendor>
<homepage href="http://iris.lib.virginia.edu/tibet/reference/translation-tool.html" />
<description>
The translation tool provides a Tibetan-to-English dictionary.
You must have the Tibetan Machine Web fonts installed on your
computer to take full advantage of this dictionary.
</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.2+"/>
<jar href="DictionarySearchAppletAndJavaWebStart-JWS.jar" />
</resources>
<application-desc />
</jnlp>

27
dist/Jskad.jnlp vendored Normal file
View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://iris.lib.virginia.edu/tibet/tools"
href="Jskad.jnlp">
<information>
<title>Jskad</title>
<vendor>THDL</vendor>
<homepage href="http://iris.lib.virginia.edu/tibet/tools/jskad.html" />
<description>
Jskad is a simple text editor for the Tibetan language, using the
Wylie transliteration and supporting several virtual keyboards.
You must install the Tibetan Machine Web fonts before using
Jskad.
</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.2+"/>
<jar href="Jskad-JWS.jar" />
</resources>
<application-desc />
</jnlp>

24
dist/QuillDriver.jnlp vendored Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://iris.lib.virginia.edu/tibet/tools"
href="QuillDriver.jnlp">
<information>
<title>QuillDriver</title>
<vendor>THDL</vendor>
<homepage href="http://iris.lib.virginia.edu/tibet/tools/quilldriver/" />
<description>
QuillDriver helps you develop content for Savant, another THDL tool.
</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.2+"/>
<jar href="QuillDriver-JWS.jar" />
</resources>
<application-desc />
</jnlp>

6
dist/README.TXT vendored Normal file
View file

@ -0,0 +1,6 @@
This directory contains the JNLP files that we use to distribute our
Java programs via Java Web Start. Ant creates subdirectories here
also and populates them with various JARs, WARs, Zip files, etc.
DC

25
dist/Savant.jnlp vendored Normal file
View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://iris.lib.virginia.edu/tibet/tools"
href="Savant.jnlp">
<information>
<title>Savant</title>
<vendor>THDL</vendor>
<homepage href="http://iris.lib.virginia.edu/tibet/tools/savant/" />
<description>
Savant displays foreign-language text, audio, and video
side-by-side to help you learn foreign languages or just study.
</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.2+"/>
<jar href="Savant-JWS.jar" />
</resources>
<application-desc />
</jnlp>