<?xml version="1.0"?>
+<!--
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+-->
<project name="jalviewX" default="usage" basedir=".">
<!-- we use jalopy to format our sources -->
<taskdef name="jalopy"
<echo message="makeApplet - compiles, then packages and obfuscates the Applet"/>
<echo message="See docs/building.html and the comments in build file for other targets."/>
<echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk."/>
+ <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation"/>
</target>
</fileset> -->
</path>
<!-- Jalview Version String displayed by application on startup and used to check for updates -->
- <property name="JALVIEW_VERSION" value="DEVELOPMENT"/>
+ <property name="JALVIEW_VERSION" value="DEVELOPMENT"/> <!-- 2.4 (VAMSAS)" -->
+ <!-- Include debugging information in javac true or false -->
+ <property name="javac.debug" value="true"/>
+
+ <!-- JarSigner Key Store for Webstart Distribution -->
+ <property name="jalview.keystore" value="./keys/.keystore"/>
+ <!-- Keystore Password -->
+ <property name="jalview.keystore.pass" value="alignmentisfun"/>
+ <!-- Key Name -->
+ <property name="jalview.key" value="jalview"/>
+ <!-- Key Password -->
+ <property name="jalview.key.pass" value="alignmentisfun"/>
+
<!-- Don't change anything below here unless you know what you are doing! -->
<!-- Url path for WebStart in JNLP file -->
<property name="WebStartLocation" value="http://www.jalview.org/webstart"/>
<property name="outputDir" value="classes" />
<property name="packageDir" value="dist" />
<property name="outputJar" value="jalview.jar" />
+ <!-- Jalview Applet JMol Jar Dependency -->
+ <property name="jmolJar" value="Jmol-11.0.2.jar" />
+ <property name="jalviewLiteJar" value="jalviewApplet.jar"/>
+ <!-- switch to indicate if we should obfuscate jalviewLite -->
+ <!--<property name="donotobfuscate" value="true"/> -->
+
<!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
<property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
<property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
<include name="*.jar"/>
<include name="**/*.jar"/>
</fileset>
+
</path>
+ <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz"/>
<!-- The Location of the java 1.1.8 jdk -->
<property name="java118.home" value="C:\Sun\jdk1.1.8" />
+ <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip"/>
+ <!-- jre for 1.4 version
+ <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
+ -->
<!-- the classpath for building the 1.1 applet -->
<path id="jalviewlite.deps">
<fileset dir="${java118.home}">
<include name="lib/classes.zip"/>
</fileset>
- <pathelement location="lib/jmol.jar"/>
+ <pathelement location="lib/${jmolJar}"/>
</path>
</target>
<javac source="1.4" target="1.4"
srcdir ="${sourceDir}"
destdir="${outputDir}"
+ debug="${javac.debug}"
classpathref="build.classpath">
<exclude name="jalview/*applet*"/>
<exclude name="com/stevesoft/**"/>
<target name="makefulldist" depends="makedist">
<!-- the default keystore details might need to be edited here -->
<signjar
- storepass="alignmentisfun"
- keypass="alignmentisfun"
- keystore="keys/.keystore"
- alias="jalview"
+ storepass="${jalview.keystore.pass}"
+ keypass="${jalview.key.pass}"
+ keystore="${jalview.keystore}"
+ alias="${jalview.key}"
lazy="false"
verbose="false"
>
<taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties"/>
<!-- codebase="http://www.jalview.org/jalview/webstart" -->
- <jnlp toFile="${packageDir}/jalview.jnlp" href="jalview.jnlp"
+ <!-- href="jalview.jnlp" prevent hard-wired pickup of jnlp in certain javaws versions -->
+ <jnlp toFile="${packageDir}/jalview.jnlp"
codebase="${WebStartLocation}">
<information>
<title>Jalview</title>
<association mime-type="application-x/ext-file" extensions="pfam"/>
<association mime-type="application-x/ext-file" extensions="aln"/>
<association mime-type="application-x/ext-file" extensions="pir"/>
+ <association mime-type="application-x/ext-file" extensions="amsa"/>
-->
</information>
<resources>
</fileset>
<fileset dir="${packageDir}">
<include name="*.jar"/>
+ <include name="*_*.jar"/>
<exclude name="jalview.jar"/>
</fileset>
<property name="jalview.version" value="${JALVIEW_VERSION}"/>
target="1.1"
srcdir="${sourceDir}"
destdir="${outputDir}"
- classpath="lib/JmolApplet.jar"
+ debug="${javac.debug}"
+ classpath="lib/${jmolJar}"
includes="jalview/appletgui/**"
excludes="ext/**,MCview/**,org/**,vamsas/**"
/>
</fileset>
</jar>
</target>
-
- <target name="obfuscate" depends="packageApplet">
+ <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally" description="construct the final jalviewLite applet jar with or without obfuscation">
+ </target>
+ <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
+ <copy file="in.jar" tofile="${jalviewLiteJar}" />
+ <delete file="in.jar"/>
+ </target>
+ <target name="-obfuscatereally" unless="donotobfuscate">
+
+ <path id="obfuscateDeps.path">
+ <pathelement location="${applet.jre.tools}"/>
+ <pathelement location="lib/${jmolJar}"/>
+ </path>
<taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
+
<proguard>
- -libraryjars "${java.home}/lib/rt.jar";lib/JmolApplet.jar
+ <injar file="in.jar"/>
+ <outjar file="${jalviewLiteJar}"/>
+ <libraryjar refid="obfuscateDeps.path"/>
+ <keep access="public" type="class"
+ name="jalview.bin.JalviewLite">
+ <field access="public"/>
+ <method access="public"/>
+ <constructor access="public"/>
+ </keep>
+<!-- -libraryjars "${obfuscateDeps}"
-injars in.jar
-outjars jalviewApplet.jar
-keep public class jalview.bin.JalviewLite
- { public * ; }
- </proguard>
+ { public * ; } -->
+ </proguard>
<delete file="in.jar"/>
</target>
<target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
<taskdef name="castor-srcgen"
- classname="org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask"
- classpathref="build.classpath" />
+ classname="org.castor.anttask.CastorCodeGenTask"
+ classpathref="build.classpath" />
<delete>
- <fileset dir="${sourceDir}/jalview/schemabinding/version2/">
- <filename name="*"/>
+ <fileset dir="${sourceDir}/jalview/schemabinding/version2">
+ <include name="*.java"/>
+ <include name="descriptors/*.java"/>
</fileset>
</delete>
<castor-srcgen file="${schemaDir}/vamsas.xsd"
todir="${sourceDir}"
package="jalview.schemabinding.version2"
- warnings="true"
+ warnings="false"
nodesc="false"
+ verbose="true"
properties="${schemaDir}/jalview.properties"
/>
<castor-srcgen file="${schemaDir}/JalviewUserColours.xsd"
todir="${sourceDir}"
package="jalview.schemabinding.version2"
- warnings="true"
+ warnings="false"
nodesc="false"
+ verbose="true"
properties="${schemaDir}/jalview.properties"
/>
<castor-srcgen file="${schemaDir}/jalview.xsd"
todir="${sourceDir}"
package="jalview.schemabinding.version2"
- warnings="true"
+ warnings="false"
nodesc="false"
+ verbose="true"
properties="${schemaDir}/jalview.properties"
+ />
+ <!--
+ now build the jalview.binding package with the old schema set
+ -->
+ <delete>
+ <fileset dir="${sourceDir}/jalview/binding/">
+ <include name="**"/>
+ </fileset>
+ </delete>
+ <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd"
+ todir="${sourceDir}"
+ package="jalview.binding"
+ warnings="false"
+ nodesc="true"
+ verbose="true"
+ properties="${schemaDir}/jalview.nodesc.properties"
+ />
+ <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd"
+ todir="${sourceDir}"
+ package="jalview.binding"
+ warnings="false"
+ nodesc="true"
+ verbose="true"
+ properties="${schemaDir}/jalview.nodesc.properties"
+ />
+ <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd"
+ todir="${sourceDir}"
+ package="jalview.binding"
+ warnings="false"
+ nodesc="true"
+ verbose="true"
+ properties="${schemaDir}/jalview.nodesc.properties"
/>
</target>
+ <target name="sourcedist" description="create jalview source distribution" depends="init">
+ <delete file="${source.dist.name}"/>
+ <tar destfile="${source.dist.name}" compression="gzip">
+ <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
+ <include name="LICENSE"/>
+ <include name="README"/>
+ <include name="build.xml"/>
+ <include name="jalview-jalopy.xml"/>
+ <include name="JalviewApplet.jpx"/>
+ <include name="JalviewX.jpx"/>
+ <include name="${sourceDir}/*.java"/>
+ <include name="${sourceDir}/**/*.java"/>
+ <include name="${sourceDir}/**/*.cdr"/>
+ <include name="${libDir}/**/*"/>
+ <include name="${resourceDir}/**/*"/>
+ <include name="${helpDir}/**/*"/>
+ <exclude name="**/*locales"/>
+ <exclude name="*locales/**"/>
+ <exclude name="utils/InstallAnywhere/**Build.iap_xml"/>
+ <exclude name="utils/InstallAnywhere/**Build*/**"/>
+ <exclude name="utils/InstallAnywhere/**Build*/**"/>
+ <exclude name="utils/InstallAnywhere/**locale*"/>
+ <exclude name="utils/InstallAnywhere/**locale*/**"/>
+ <include name="${schemaDir}/**/*"/>
+ <include name="utils/**/*"/>
+ <include name="${docDir}/**/*"/>
+ </tarfileset>
+ </tar>
+ </target>
</project>