+
+ <target name="preparejnlp" depends="makedist">
+ <copy todir="${packageDir}">
+ <fileset dir="${resourceDir}/images">
+ <include name="${WebStartImage}" />
+ </fileset>
+ </copy>
+
+ <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
+
+ <!-- create a dummy jar which will eventually contain the jnlp template -->
+ <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
+ <fileset dir="${packageDir}">
+ <include name="jalview.jar" />
+ </fileset>
+ </jar>
+
+ <mkdir dir="${packageDir}/JNLP-INF" />
+ <antcall target="writejnlpf">
+ <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
+ <param name="inih" value="*" />
+ <param name="maxh" value="*" />
+ </antcall>
+
+ <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
+ <fileset dir="${packageDir}">
+ <include name="JNLP-INF/APPLICATION-TEMPLATE.JNLP" />
+ </fileset>
+ </jar>
+
+ <antcall target="writejnlpf">
+ <param name="jnlpFile" value="${packageDir}/jalview.jnlp" />
+ <param name="inih" value="10M" />
+ <param name="maxh" value="256M" />
+ </antcall>
+
+ <antcall target="writejnlpf">
+ <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp" />
+ <param name="inih" value="128M" />
+ <param name="maxh" value="512M" />
+ </antcall>
+
+ <antcall target="writejnlpf">
+ <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp" />
+ <param name="inih" value="256M" />
+ <param name="maxh" value="1024M" />
+ </antcall>
+
+ <!-- finally, need to postprocess to add in associations at end of 'information' element
+
+ <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
+
+ </xslt>
+
+
+ -->
+ <!--
+ <association mime-type="application-x/ext-file" extensions="fa"/>
+ <association mime-type="application-x/ext-file" extensions="fasta"/>
+ <association mime-type="application-x/ext-file" extensions="mfa"/>
+ <association mime-type="application-x/ext-file" extensions="fastq"/>
+ <association mime-type="application-x/ext-file" extensions="blc"/>
+ <association mime-type="application-x/ext-file" extensions="msf"/>
+ <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"/>
+ <association mime-type="application-x/ext-file" extensions="stk"/>
+ <association mime-type="application-x/ext-file" extensions="jar"/>-->
+ </target>
+
+ <target name="-jarsignwithtsa" depends="makedist,preparejnlp" if="timestamp">
+ <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="${jalview.keyalg}" digestalg="${jalview.keydig}"
+ tsaproxyhost="${proxyHost}" tsaproxyport="${proxyPort}" tsaurl="${jalview.tsaurl}">
+ <fileset dir="${packageDir}">
+ <include name="*.jar" />
+ </fileset>
+ </signjar>
+ </target>
+ <target name="-jarsignnotsa" depends="makedist,preparejnlp" unless="timestamp">
+ <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="${jalview.keyalg}" digestalg="${jalview.keydig}">
+ <fileset dir="${packageDir}">
+ <include name="*.jar" />
+ </fileset>
+ </signjar>
+ </target>
+
+ <target name="makefulldist" depends="makedist,preparejnlp,-jarsignwithtsa,-jarsignnotsa">
+ <!-- and sign the jars -->
+ <!-- the default keystore details might need to be edited here -->
+ </target>
+
+ <target name="runenv" depends="init">
+ <path id="run.classpath">
+ <pathelement location="${outputDir}" />
+ <fileset dir="${outputDir}">
+ <include name="${libDir}/*.jar" />
+ </fileset>
+ </path>
+ <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
+
+ <echo>java -classpath ${run.classpath} jalview.bin.Jalview
+ </echo>
+ </target>
+
+ <target name="-generatejnlpf">
+ <presetdef name="jnlpf">
+ <jnlp codebase="${WebStartLocation}">
+ <information>
+ <title>Jalview</title>
+ <vendor>The Barton Group</vendor>
+ <homepage href="http://www.jalview.org" />
+ <description>Jalview Multiple Alignment Editor</description>
+ <description kind="short">Jalview</description>
+ <icon href="${WebStartImage}" />
+ <offline_allowed />
+ </information>
+ <resources>
+ <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
+ <jar main="true" href="jalview.jar"/>
+ <fileset dir="${packageDir}">
+ <exclude name="jalview.jar" />
+ <include name="*.jar" />
+ <include name="*_*.jar" />
+ <exclude name="*jnilib.jar" />
+ </fileset>
+ <property name="jalview.version" value="${JALVIEW_VERSION}" />
+ </resources>
+ <resources os="Mac OS X">
+ <fileset dir="${packageDir}">
+ <include name="*quaqua*.jnilib.jar" />
+ </fileset>
+ </resources>
+
+ <application_desc main_class="jalview.bin.Jalview">
+ </application_desc>
+ <security>
+ <all_permissions />
+ </security>
+ </jnlp>
+ </presetdef>
+
+ <jnlpf toFile="${jnlpFile}" />
+
+ </target>
+
+ <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
+ <echo message="Not adding JNLP File Associations" />
+ </target>
+
+ <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
+ <replace file="${jnlpFile}">
+ <replacetoken>
+ <![CDATA[</information>]]></replacetoken>
+ <replacevalue>
+ <![CDATA[
+ <association mime-type="application-x/ext-file" extensions="fa" />
+ <association mime-type="application-x/ext-file" extensions="fasta" />
+ <association mime-type="application-x/ext-file" extensions="mfa" />
+ <association mime-type="application-x/ext-file" extensions="fastq" />
+ <association mime-type="application-x/ext-file" extensions="blc" />
+ <association mime-type="application-x/ext-file" extensions="msf" />
+ <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"/>
+ <association mime-type="application-x/ext-file" extensions="stk"/>
+ <association mime-type="application-x/ext-file" extensions="jvp"/>
+ </information>]]></replacevalue>
+ </replace>
+ <echo message="Added file associations to JNLP file" />
+</target>
+<target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
+</target>
+
+<target name="buildextclients" depends="init">
+ <input message="Building external client source from WSDLs - Do you really want to do this ? (Yy/Nn)" validargs="Y,y,n,N" defaultvalue="N" addproperty="doextbuild.response" />
+ <condition property="dontextbuild">
+ <equals arg1="n" arg2="${doextbuild.response}" />
+ </condition>
+ <condition property="dontextbuild">
+ <equals arg1="N" arg2="${doextbuild.response}" />
+ </condition>
+ <fail if="dontextbuild">
+ Build External Client Code process aborted by user. Jalview source is unchanged.
+ </fail>
+ <!-- Currently, this doesn't happen automatically.
+ 1. Run WSDL2Java as below, which generates an ext.vamsas +
+ vamsas.<datapackages> fileset.
+ 2. refactor ext.vamsas.SpecificserviceWS* to
+ ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
+ 3. Update the jalview.ws.*WServices classes to reflect the
+ interface type, and all locations of this wsdl type that Jalview
+ might be using.
+
+-->
+ <path id="axisbuild">
+ <path refid="build.classpath" />
+ </path>
+ <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
+ <move todir="./bak">
+ <fileset dir="${sourceDir}" id="client">
+ <include name="${wsdl.ClientNS}/*.*" />
+ </fileset>
+ </move>
+
+ <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
+ <mappingSet>
+ <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
+ <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
+ </mappingSet>
+ </axis-wsdl2java>
+</target>
+
+<target name="makedist" depends="build, buildPropertiesFile, buildindices">
+ <!-- make the package jar if not already existing -->
+ <mkdir dir="${packageDir}" />
+ <!-- clean dir if it already existed -->
+ <delete>
+ <fileset dir="${packageDir}">
+ <include name="*.jar" />
+ </fileset>
+ </delete>
+ <jar destfile="${packageDir}/${outputJar}" index="true">
+ <manifest>
+ <attribute name="Main-Class" value="jalview.bin.Jalview" />
+ <attribute name="Permissions" value="all-permissions" />
+ <attribute name="Application-Name" value="Jalview Desktop" />
+ <attribute name="Codebase" value="${application.codebase}" />
+ </manifest>
+ <fileset dir="${outputDir}/">
+ <exclude name="cache*/**" />
+ <exclude name="*.jar" />
+ <exclude name="*.jar.*" />
+ <exclude name="**/*.jar" />
+ <exclude name="**/*.jar.*" />
+ </fileset>
+ </jar>
+
+ <copy toDir="${packageDir}" flatten="true">
+ <fileset dir="${outputDir}">
+ <include name="*.jar" />
+ <include name="**/*.jar" />
+ </fileset>
+ </copy>
+</target>
+
+
+<!-- jalopy code reformatter -->
+<target name="sourcescrub" depends="init,build">
+ <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
+ <fileset dir="${sourceDir}">
+ <include name="*.java" />
+ <include name="**/*.java" />
+ <include name="**/**/*.java" />
+ </fileset>
+ </jalopy>
+</target>
+
+
+
+<!-- Compile, package and obfuscate Jalview Applet -->
+<target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation" />
+
+<target name="compileApplet" depends="init,clean">
+ <mkdir dir="${outputDir}" />
+ <javac source="${javac.source}" target="${javac.target}" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="jalviewlite.deps" includes="jalview/appletgui/**" excludes="ext/**,gui/**,jbgui/**,MCview/**,org/**,vamsas/**,jalview/ext/rbvi/**,jalview/ext/paradise/**,jalview/ext/ensembl/**,jalview/ext/so" />
+</target>
+
+<target name="packageApplet" depends="compileApplet, buildPropertiesFile">
+ <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
+ <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
+ <copy todir="${outputDir}/lang">
+ <fileset dir="${resourceDir}/lang">
+ <include name="**.*" />
+ </fileset>
+ </copy>
+ <jar destfile="in.jar" index="true">
+ <manifest>
+ <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
+ <attribute name="Application-Name" value="JalviewLite" />
+ <attribute name="Codebase" value="${applet.codebase}" />
+ </manifest>
+ <fileset dir="${outputDir}">
+ <include name="com/**" />
+ <include name="MCview/**" />
+ <include name="jalview/**" />
+ <include name=".build_properties" />
+ <include name="images/idwidth.gif" />
+ <include name="images/link.gif" />
+ <include name="lang/**" />
+ </fileset>
+ </jar>
+</target>
+<target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
+</target>
+<target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
+ <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
+ <delete file="in.jar" />
+</target>
+<target name="-obfuscatereally" unless="donotobfuscate">
+
+ <path id="obfuscateDeps.path">
+ <pathelement location="${applet.jre.tools}" />
+ <pathelement location="appletlib/${jmolJar}" />
+ <pathelement location="lib/${varnaJar}" />
+ <pathelement location="appletlib/${jsoup}" />
+ <pathelement location="appletlib/${jsonSimple}" />
+ <pathelement location="appletlib/${javaJson}" />
+ <fileset dir="${java.home}/lib">
+ <include name="plugin.jar" />
+ </fileset>
+ </path>
+ <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
+
+ <proguard verbose="true" >
+ <injar file="in.jar" />
+ <outjar file="${jalviewLiteJar}" />
+ <libraryjar refid="obfuscateDeps.path" />
+ <dontwarn />
+ <keep access="public" type="class" name="jalview.bin.JalviewLite">
+ <field access="public" />
+ <method access="public" />
+ <constructor access="public" />
+ </keep>
+ <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
+ <field access="public" />
+ <method access="public" />
+ <constructor access="public" />
+ </keep>
+
+ <keep name="jalview.json.binding**">
+ <constructor/>
+ <method name="*"/>
+ </keep>
+
+ <keep access="public" type="class" name="MCview.PDBfile">
+ <field access="public" />
+ <method access="public" />
+ <constructor access="public" />
+ </keep>
+
+ <keep access="public" type="class" name="jalview.ws.jws1.Annotate3D">
+ <field access="public" />
+ <method access="public" />
+ <constructor access="public" />
+ </keep>
+
+ <keep access="public" type="class" name="jalview.ext.jmol.JmolParser">
+ <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>
+ <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.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
+ <delete>
+ <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="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
+ <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
+ <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
+ <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" 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="nbbuild.xml" />
+ <include name="nbproject/genfiles.properties" />
+ <include name="nbproject/project.properties" />
+ <include name="nbproject/project.xml" />
+ <include name="${sourceDir}/*.java" />
+ <include name="${sourceDir}/**/*.java" />
+ <include name="${sourceDir}/**/*.cdr" />
+ <include name="${libDir}/**/*" />
+ <include name="${resourceDir}/**/*" />
+ <include name="${helpDir}/**/*" />
+ <include name="appletlib/${jmolJar}" />
+ <include name="appletlib/${jsonSimple}" />
+ <include name="appletlib/${javaJson}" />
+ <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}/**/*" />
+ <include name="examples/**/*" />
+ </tarfileset>
+ </tar>
+</target>
+<target name="prepubapplet_1" depends="makeApplet">
+ <copy todir="${packageDir}/examples">
+ <fileset dir="examples">
+ <include name="**/*" />
+ <include name="javascript/*" />
+ <include name="jmol/*" />
+ </fileset>
+ <fileset dir=".">
+ <include name="${jalviewLiteJar}" />
+ </fileset>
+ <fileset dir="appletlib">
+ <include name="**/*" />
+ </fileset>
+ </copy>
+ <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}" />
+ <jar update="true" index="true" jarfile="${packageDir}/examples/${javaJson}" />
+ <jar update="true" index="true" jarfile="${packageDir}/examples/${jsonSimple}" />
+ <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
+ <manifest>
+ <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)" />
+ <!-- <attribute name="Permissions" value="sandbox" /> -->
+ <!--<attribute name="Trusted-Lib" value="true" /> -->
+ <attribute name="Codebase" value="${applet.codebase}" />
+ <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
+ </manifest>
+ </jar>
+
+ <presetdef name="ap_applet.jar">
+ <!-- build a signed applet with 'all-permissions' -
+ Needs 'param name="permissions' value="all-permissions"' in applet tag
+ JalviewLite+JmolApplet linked sequence/structure fails
+ Mixed code warnings are raised
+ -->
+ <jar update="true" index="true">
+ <manifest>
+ <attribute name="Application-Name" value="JalviewLite" />
+ <attribute name="Permissions" value="all-permissions" />
+ <attribute name="Codebase" value="${applet.codebase}" />
+ <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
+ <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
+ </manifest>
+ </jar>
+ </presetdef>
+ <presetdef name="applet.jar">
+ <!-- build signed applet with sandbox permissions -
+ Needs 'param name="permissions' value="sandbox"' in applet tag
+ Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
+ -->
+
+ <jar update="true" index="true">
+ <manifest>
+ <attribute name="Application-Name" value="JalviewLite" />
+ <attribute name="Permissions" value="sandbox" />
+ <attribute name="Codebase" value="${applet.codebase}" />
+ <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
+ <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
+ </manifest>
+ </jar>
+ </presetdef>
+ <presetdef name="tl_applet.jar">
+ <!-- build signed applet with trusted library/trusted permissions -
+ Needs 'param name="permissions' value="all-permissions"' in applet tag
+ j1.7_45:
+ No mixed code warnings raised
+ Jmol/JalviewLite sequence/structure example doesn't link structures
+ Raises dialog asking user to allow page to control applet via LiveConnect javascript
+
+ -->
+
+ <jar update="true" index="true">
+ <manifest>
+ <attribute name="Application-Name" value="JalviewLite" />
+ <attribute name="Permissions" value="all-permissions" />
+ <attribute name="Codebase" value="${applet.codebase}" />
+ <attribute name="Trusted-Only" value="true" />
+ <attribute name="Trusted-Library" value="true" />
+ </manifest>
+ </jar>
+ </presetdef>
+ <presetdef name="to_applet.jar">
+ <!-- not fully test variant (yet) -->
+ <jar update="true" index="true">
+ <manifest>
+ <attribute name="Application-Name" value="JalviewLite" />
+ <attribute name="Permissions" value="all-permissions" />
+ <attribute name="Codebase" value="${applet.codebase}" />
+ <attribute name="Trusted-Only" value="true" />
+ </manifest>
+ </jar>
+ </presetdef>
+ <!-- create differently privileged artefacts -->
+ <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
+ <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
+ <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true" />
+ <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true" />
+ <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
+ <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}" />
+ <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/ap_${javaJson}" />
+ <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/ap_${jsonSimple}" />
+ <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
+ <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
+ <ap_applet.jar jarfile="${packageDir}/examples/ap_${javaJson}" />
+ <ap_applet.jar jarfile="${packageDir}/examples/ap_${jsonSimple}" />
+ <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
+ <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
+ <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/tl_${javaJson}" />
+ <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/tl_${jsonSimple}" />
+ <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
+ <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
+ <tl_applet.jar jarfile="${packageDir}/examples/tl_${javaJson}" />
+ <tl_applet.jar jarfile="${packageDir}/examples/tl_${jsonSimple}" />
+ <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
+ <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
+ <copy file="${packageDir}/examples/${javaJson}" tofile="${packageDir}/examples/to_${javaJson}" />
+ <copy file="${packageDir}/examples/${jsonSimple}" tofile="${packageDir}/examples/to_${jsonSimple}" />
+ <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
+ <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
+ <to_applet.jar jarfile="${packageDir}/examples/to_${javaJson}" />
+ <to_applet.jar jarfile="${packageDir}/examples/to_${jsonSimple}" />
+ <!-- finally, create manifest for original jars -->
+ <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
+ <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
+ <applet.jar jarfile="${packageDir}/examples/${javaJson}" />
+ <applet.jar jarfile="${packageDir}/examples/${jsonSimple}" />
+
+ <!-- todo - write examples/downloads for alternate versions of the applet
+ probably don't need to do this now since we don't have alternate versions anymore !-->
+</target>
+<target name="-signapplet" depends="prepubapplet_1">
+ <fileset id="signappletjarset" dir="${packageDir}/examples">
+ <exclude name="u_*.jar" />
+ <include name="${jalviewLiteJar}" />
+ <include name="${jmolJar}" />
+ <include name="${javaJson}" />
+ <include name="${jsonSimple}" />
+ <include name="to_${jalviewLiteJar}" />
+ <include name="to_${jmolJar}" />
+ <include name="to_${javaJson}" />
+ <include name="to_${jsonSimple}" />
+ <include name="tl_${jalviewLiteJar}" />
+ <include name="tl_${jmolJar}" />
+ <include name="tl_${javaJson}" />
+ <include name="tl_${jsonSimple}" />
+ <include name="ap_${jalviewLiteJar}" />
+ <include name="ap_${jmolJar}" />
+ <include name="ap_${javaJson}" />
+ <include name="ap_${jsonSimple}" />
+ </fileset>
+</target>
+<target name="-signappletnotsa" unless="timestamp" depends="-signapplet">
+ <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
+ <fileset refid="signappletjarset" />
+ </signjar>
+</target>
+
+<target name="-signapplettsa" if="timestamp" depends="-signapplet">
+ <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" tsaproxyhost="${proxyHost}" tsaproxyport="${proxyPort}" tsaurl="${jalview.tsaurl}">
+ <fileset refid="signappletjarset" />
+ </signjar>
+</target>
+
+<target name="signApplet" description="internal target to sign applet" depends="-signappletnotsa,-signapplettsa" />
+
+<target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet, signApplet">
+
+ <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
+ <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
+ <copy file="appletlib/${jsonSimple}" tofile="${packageDir}/examples/u_${jsonSimple}" overwrite="true" />
+ <copy file="appletlib/${javaJson}" tofile="${packageDir}/examples/u_${javaJson}" overwrite="true" />
+ <!-- finally, replace any launchApp servlet tags with a version specification -->
+ <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}"">
+ <replacetoken>
+ <![CDATA[http://www.jalview.org/services/launchApp"]]>
+ </replacetoken>
+ <fileset dir="${packageDir}/examples">
+ <include name="**/*.html" />
+ </fileset>
+ </replace>
+ <replace value="http://www.jalview.org/services/launchApp?version=${JALVIEW_VERSION}'">
+ <replacetoken>
+ <![CDATA[http://www.jalview.org/services/launchApp']]>
+ </replacetoken>
+ <fileset dir="${packageDir}/examples">
+ <include name="**/*.html" />
+ </fileset>
+ </replace>
+
+</target>
+<target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
+ <javadoc destdir="${javadocDir}">
+ <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">
+ </packageset>
+ </javadoc>
+</target>