Jskad/jwsbuild.xml
dchandler d200b03d66 Updated the build system so that you must do a cvs checkout of the
'Fonts' module inside the 'Jskad' module.  I.e., you must now have the
tree like so:

Jskad/
   source/
   dist/
   Fonts/
       TibetanMachineWeb/
   .
   .
   .

This is because the THDL tools now optionally (and by default) load
the TibetanMachineWeb fonts automatically.

Updated the build system so that the 'web-start-releases' and
'self-contained-dist' targets JAR up optional JARs to create
double-clickable, self-contained joy.  Even the TMW fonts are in the
JARs now.

Changed the strings describing two Jskad keyboards so that "keyboard"
is no longer in the description.  It's in the label next to the combo
box.

Jskad now saves preferences on exit or when the user selects a menu
item (that is there for debugging mainly) to ~/my_thdl_preferences.txt
on *nix or C:\my_thdl_preferences.txt on Win32.  I don't know the
correct Mac location.

There's a new paradigm for telling org.thdl.util.ThdlOptions that a
user preference has been changed.  If, for example, a combo box is
manipulated so that the ACIP keyboard is selected, then you must call
a certain method in ThdlOptions.
2002-11-18 16:12:25 +00:00

114 lines
4.5 KiB
XML

<!-- @author David Chandler, dchandler@users.sourceforge.net
We have a document,
http://thdltools.sourceforge.net/BuildSystems.html, that you
probably should read. FIXME: update this document to describe
the two-buildfile system.
-->
<project name="THDLTools" default="fail-nicely" basedir=".">
<description>
This Jakarta Ant buildfile is used to build the Java Web Start
releases of Jskad, Savant, QuillDriver, and the Translation Tool.
This is separate from build.xml because to use this build file,
you must have installed the Venus Application Publisher's (Vamp's)
Ant tasks. Read the comments of this buildfile to learn more, or
see http://thdltools.sourceforge.net/BuildSystems.html.
</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" />
<target name="fail-nicely" description="Tells the user to use build.xml, not this subbuildfile.">
<fail message="Do not use this file directly; use build.xml file instead, which then uses this file."/>
</target>
<target name="this-init">
<!-- Create the time stamp -->
<tstamp/>
<mkdir dir="${dist}/java-web-start"/>
</target>
<target name="package-for-java-web-start"
depends="this-init"
description="Builds the Java Web Start version of ${my.app} given that you have compiled it to a JAR with the suffix ${jwsjarsuffix} (and from scratch, since our compilation procedure doesn't konw about dependencies)">
<!-- 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"/>
<!-- Use the Venus Application Publisher's (Vamp's) Ant task to
create a .war file. If you use Tomcat or the like to
distribute, then the WAR is all you need. If not, you don't
need the full WAR file. You in fact need only the JAR file
inside it. There is a ${my.app}.jnlp file inside it, too,
but that file uses macros like $$name and $$codebase, which
are only appropriate to Tomcat-type environments.
Thus, you non-Tomcat-users should run 'jar xf
${my.app}-web-start.war ${my.app}.jar' to extract the
signed JAR file and copy the .jar and the
${dist}/${my.app}.jnlp file (NOT the one in the WAR) 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.)
Yes, it means that we're requiring anyone who wishes to cut a
JWS release to install vamp.jar, when we could use the
built-in SignJar task instead for non-Tomcat-users. BUT,
this method means that we're ready for a J2EE application
server framework like the one at Virginia.
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 drop 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="${lib}">
<include name="${my.app}${jwsjarsuffix}.jar" />
</fileset>
</resources>
</jnlp>
<jarsigner
keystore = "${keystore}"
storepass = "${keystore.password}"
keypass = "${dgkey.password}"
alias = "${key.alias}"/>
</vampwar>
<!-- Extract the JAR file: -->
<unwar src="${dist}/java-web-start/${my.app}-web-start.war"
dest="${dist}/java-web-start/">
<patternset>
<include name="${my.app}.jar"/>
<exclude name="**/*"/>
</patternset>
</unwar>
</target>
</project>