3 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
4 * Copyright (C) 2014 The Jalview Authors
6 * This file is part of Jalview.
8 * Jalview is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 <project name="jalviewX" default="usage" basedir=".">
21 <!-- we use jalopy to format our sources -->
22 <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
24 <fileset dir="utils/jalopy/lib">
25 <include name="*.jar" />
30 <target name="help" depends="usage" />
32 <echo message="~~~Jalview Ant build.xml Usage~~~~" />
33 <echo message="Targets include:" />
34 <echo message="usage - default target, displays this message" />
35 <echo message="buildindices - generates JavaHelpSearch from the help files" />
36 <echo message="build - compiles all necessary files for Application" />
37 <echo message="makedist - compiles and places all necessary jar files into directory dist" />
38 <echo message="makefulldist - signs all jar files and builds jnlp file for full distribution" />
39 <echo message=" this needs a keystore and key. See docs/building.html for more information." />
40 <echo message="compileApplet - compiles all necessary files for Applet" />
41 <echo message="makeApplet - compiles, then packages and obfuscates the Applet" />
42 <echo message="See docs/building.html and the comments in build file for other targets." />
43 <echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk." />
44 <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
48 <!-- utils is a class path to additional utilities needed for
49 building docs, jars and webstart stuff -->
51 Userdefined build property defaults
53 wsdl.server list (plus namespace mapping info ???) - also want
54 ... to make this a dynamically generatable property
56 Build location - provide a temporary root for speed
57 jarsigner keystore and info
58 Jakarta and axis classpath ?
59 Default argument for starting Jalview (if it exists).
64 <path id="axis.classpath">
66 <fileset dir="/usr/local/axis/lib">
67 <include name="**/*.jar" />
69 <fileset dir="/usr/local/jakarta-tomcat-5/webapps/axis/WEB-INF/lib">
70 <include name="**/*.jar"/>
71 <include name="*.jar"/>
74 <!-- Jalview Version String displayed by application on startup and used to check for updates -->
75 <property name="JALVIEW_VERSION" value="DEVELOPMENT" />
76 <!-- 2.4 (VAMSAS)" -->
77 <!-- Include debugging information in javac true or false -->
78 <property name="javac.debug" value="true" />
80 <!-- JarSigner Key Store for Webstart Distribution -->
81 <property name="jalview.keystore" value="./keys/.keystore" />
82 <!-- Keystore Password -->
83 <property name="jalview.keystore.pass" value="alignmentisfun" />
85 <property name="jalview.key" value="jalview" />
87 <property name="jalview.key.pass" value="alignmentisfun" />
91 <!-- Don't change anything below here unless you know what you are doing! -->
92 <!-- Url path for WebStart in JNLP file -->
93 <property name="WebStartLocation" value="http://www.jalview.org/webstart" />
94 <!-- Webstart Image - looked for in resources/images -->
95 <property name="WebStartImage" value="JalviewLogo_big.png"/>
96 <!-- J2SE version needed for webstart launch -->
97 <property name="j2sev" value="1.6+"/>
99 <!-- Permissions for running Java applets and applications. -->
100 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
101 <property name="application.codebase" value="*.jalview.org" />
102 <!-- and allowing the applet to be deployed from any URL -->
103 <!-- note - if you want to make sure LiveConnect works without any warnings, please rebuild and sign your applet jar with your own domain included in the codebase/allowable-codebase properties -->
104 <property name="applet.codebase" value="*.jalview.org *.dundee.ac.uk *" />
105 <property name="applet.caller-codebase" value="${applet.codebase}" />
107 <!-- build directory configuration -->
108 <property name="libDir" value="lib" />
109 <property name="resourceDir" value="resources" />
110 <property name="helpDir" value="help" />
111 <property name="docDir" value="doc" />
112 <property name="sourceDir" value="src" />
113 <property name="schemaDir" value="schemas" />
114 <property name="outputDir" value="classes" />
115 <property name="packageDir" value="dist" />
116 <property name="outputJar" value="jalview.jar" />
117 <!-- Jalview Applet JMol Jar Dependency -->
118 <property name="jmolJar" value="JmolApplet-12.2.4.jar" />
119 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
120 <!-- switch to indicate if we should obfuscate jalviewLite -->
121 <!-- <property name="donotobfuscate" value="true"/> -->
122 <!-- switch to exclude associations from generated jnlp files -->
123 <!-- <property name="nojnlpfileassocs" value="true"/> -->
125 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
126 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
127 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
128 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
129 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
130 <property name="WSInterf" value="MsaWS" />
131 <property name="wsdl.Namespace" value="vamsas" />
132 <property name="wsdl.ClientNS" value="ext.vamsas" />
133 <!-- the class path for building the application -->
134 <path id="build.classpath">
135 <fileset dir="utils">
136 <include name="*.jar" />
137 <include name="**/*.jar" />
139 <fileset dir="${libDir}">
140 <include name="*.jar" />
141 <include name="**/*.jar" />
143 <fileset dir="${java.home}/lib">
144 <include name="plugin.jar"/>
146 <fileset dir="appletlib">
147 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
149 <include name="${jmolJar}" />
153 <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
154 <!-- The Location of the java 1.1.8 jdk -->
155 <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" />
157 <property name="java118.home" value="${java.home}" />
158 <!--<property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
160 <!-- jre for 1.4 version -->
161 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
163 <!-- the classpath for building the 1.1 applet -->
164 <path id="jalviewlite.deps">
165 <fileset dir="${java118.home}">
166 <include name="lib/classes.zip" />
168 <fileset dir="${java.home}/lib">
169 <include name="plugin.jar"/>
171 <pathelement location="appletlib/${jmolJar}" />
173 <!-- default location for outputting javadoc -->
174 <property name="javadocDir" value="${packageDir}/javadoc"/>
178 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
179 <target name="buildPropertiesFile" depends="init">
180 <tstamp prefix="build">
181 <format property="date" pattern="dd MMMM yyyy" />
183 <properties file="${outputDir}/.build_properties">
185 ---Jalview Build Details---
187 <property name="VERSION" value="${JALVIEW_VERSION}" />
188 <property name="BUILD_DATE" value="${build.date}" />
193 <target name="clean" depends="init">
194 <!-- not efficient yet. -->
195 <delete dir="${outputDir}" includes="*,**/*"/>
198 <target name="distclean" depends="init, clean">
200 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
203 <include name="${outputJar}" />
204 <include name="#*#" />
205 <include name="#*.*#" />
206 <include name="**/#*#" />
207 <include name="**/#*.*#" />
208 <include name="*~" />
209 <include name="*.*~" />
210 <include name="**/*~" />
211 <include name="**/*.*~" />
216 <target name="prepare" depends="init">
217 <mkdir dir="${outputDir}" />
218 <copy todir="${outputDir}">
220 <include name="${docDir}/**/*.*" />
221 <include name="${helpDir}/**/*.*" />
222 <include name="${libDir}/*.jar" />
224 <fileset dir="${resourceDir}">
225 <include name="**/*.*" />
230 <target name="build" depends="prepare">
231 <!-- not efficient yet. -->
232 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
233 <exclude name="jalview/*applet*" />
234 <exclude name="jalview/appletgui/**" />
235 <exclude name="com/stevesoft/**" />
238 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
239 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
244 <target name="makefulldist" depends="makedist">
245 <copy todir="${packageDir}">
246 <fileset dir="${resourceDir}/images">
247 <include name="${WebStartImage}"/>
251 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
253 <!-- create a dummy jar which will eventually contain the jnlp template -->
254 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
255 <fileset dir="${packageDir}">
256 <include name="jalview.jar" />
260 <mkdir dir="${packageDir}/JNLP-INF"/>
261 <antcall target="writejnlpf">
262 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
263 <param name="inih" value="*" />
264 <param name="maxh" value="*"/>
267 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
268 <fileset dir="${packageDir}">
269 <include name="JNLP-INF"/>
273 <antcall target="writejnlpf">
274 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
275 <param name="inih" value="10M" />
276 <param name="maxh" value="256M"/>
279 <antcall target="writejnlpf">
280 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
281 <param name="inih" value="128M" />
282 <param name="maxh" value="512M"/>
285 <antcall target="writejnlpf">
286 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
287 <param name="inih" value="256M" />
288 <param name="maxh" value="1024M"/>
291 <!-- finally, need to postprocess to add in associations at end of 'information' element
293 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
300 <association mime-type="application-x/ext-file" extensions="fa"/>
301 <association mime-type="application-x/ext-file" extensions="fasta"/>
302 <association mime-type="application-x/ext-file" extensions="mfa"/>
303 <association mime-type="application-x/ext-file" extensions="fastq"/>
304 <association mime-type="application-x/ext-file" extensions="blc"/>
305 <association mime-type="application-x/ext-file" extensions="msf"/>
306 <association mime-type="application-x/ext-file" extensions="pfam"/>
307 <association mime-type="application-x/ext-file" extensions="aln"/>
308 <association mime-type="application-x/ext-file" extensions="pir"/>
309 <association mime-type="application-x/ext-file" extensions="amsa"/>
310 <association mime-type="application-x/ext-file" extensions="stk"/>
311 <association mime-type="application-x/ext-file" extensions="jar"/>-->
312 <!-- and sign the jars -->
313 <!-- the default keystore details might need to be edited here -->
314 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
315 <fileset dir="${packageDir}">
316 <include name="*.jar" />
321 <target name="runenv" depends="init">
322 <path id="run.classpath">
323 <pathelement location="${outputDir}" />
324 <fileset dir="${outputDir}">
325 <include name="${libDir}/*.jar" />
328 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
330 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
334 <target name="-generatejnlpf">
335 <presetdef name="jnlpf">
336 <jnlp codebase="${WebStartLocation}">
338 <title>Jalview</title>
339 <vendor>The Barton Group</vendor>
340 <homepage href="http://www.jalview.org" />
341 <description>Jalview Multiple Alignment Editor</description>
342 <description kind="short">Jalview</description>
343 <icon href="${WebStartImage}" />
347 <j2se version="${j2sev}" initial_heap_size="${inih}" max_heap_size="${maxh}" />
348 <fileset dir="${packageDir}">
349 <include name="jalview.jar" />
351 <fileset dir="${packageDir}">
352 <include name="*.jar" />
353 <include name="*_*.jar" />
354 <exclude name="jalview.jar" />
356 <property name="jalview.version" value="${JALVIEW_VERSION}" />
358 <application_desc main_class="jalview.bin.Jalview">
366 <jnlpf toFile="${jnlpFile}"/>
370 <target name="-dofakejnlpfileassoc" depends="-generatejnlpf" if="nojnlpfileassocs">
371 <echo message="Not adding JNLP File Associations"/>
374 <target name="-dojnlpfileassoc" depends="-generatejnlpf" unless="nojnlpfileassocs">
375 <replace file="${jnlpFile}">
377 <![CDATA[</information>]]></replacetoken>
380 <association mime-type="application-x/ext-file" extensions="fa" />
381 <association mime-type="application-x/ext-file" extensions="fasta" />
382 <association mime-type="application-x/ext-file" extensions="mfa" />
383 <association mime-type="application-x/ext-file" extensions="fastq" />
384 <association mime-type="application-x/ext-file" extensions="blc" />
385 <association mime-type="application-x/ext-file" extensions="msf" />
386 <association mime-type="application-x/ext-file" extensions="pfam" />
387 <association mime-type="application-x/ext-file" extensions="aln"/>
388 <association mime-type="application-x/ext-file" extensions="pir"/>
389 <association mime-type="application-x/ext-file" extensions="amsa"/>
390 <association mime-type="application-x/ext-file" extensions="stk"/>
391 <association mime-type="application-x/ext-file" extensions="jvp"/>
392 </information>]]></replacevalue>
394 <echo message="Added file associations to JNLP file"/>
396 <target name="writejnlpf" depends="-dojnlpfileassoc,-dofakejnlpfileassoc">
399 <target name="buildextclients" depends="init">
400 <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" />
401 <condition property="dontextbuild">
402 <equals arg1="n" arg2="${doextbuild.response}" />
404 <condition property="dontextbuild">
405 <equals arg1="N" arg2="${doextbuild.response}" />
407 <fail if="dontextbuild">
408 Build External Client Code process aborted by user. Jalview source is unchanged.
410 <!-- Currently, this doesn't happen automatically.
411 1. Run WSDL2Java as below, which generates an ext.vamsas +
412 vamsas.<datapackages> fileset.
413 2. refactor ext.vamsas.SpecificserviceWS* to
414 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
415 3. Update the jalview.ws.*WServices classes to reflect the
416 interface type, and all locations of this wsdl type that Jalview
420 <path id="axisbuild">
421 <path refid="build.classpath" />
423 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
425 <fileset dir="${sourceDir}" id="client">
426 <include name="${wsdl.ClientNS}/*.*" />
430 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
432 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
433 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
438 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
439 <!-- make the package jar if not already existing -->
440 <mkdir dir="${packageDir}" />
441 <!-- clean dir if it already existed -->
443 <fileset dir="${packageDir}">
444 <include name="*.jar"/>
447 <jar destfile="${packageDir}/${outputJar}" index="true">
449 <attribute name="Main-Class" value="jalview.bin.Jalview" />
450 <attribute name="Permissions" value="all-permissions" />
451 <attribute name="Application-Name" value="Jalview Desktop" />
452 <attribute name="Codebase" value="${application.codebase}" />
454 <fileset dir="${outputDir}/">
455 <exclude name="cache*/**" />
456 <exclude name="*.jar" />
457 <exclude name="*.jar.*" />
458 <exclude name="**/*.jar" />
459 <exclude name="**/*.jar.*" />
463 <copy toDir="${packageDir}" flatten="true">
464 <fileset dir="${outputDir}">
465 <include name="*.jar" />
466 <include name="**/*.jar" />
472 <!-- jalopy code reformatter -->
473 <target name="sourcescrub" depends="init,build">
474 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
475 <fileset dir="${sourceDir}">
476 <include name="*.java" />
477 <include name="**/*.java" />
478 <include name="**/**/*.java" />
485 <!-- Compile, package and obfuscate Jalview Applet -->
486 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
488 <target name="compileApplet" depends="init,clean">
489 <mkdir dir="${outputDir}" />
490 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
491 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
492 excludes="ext/**,MCview/**,org/**,vamsas/**" />
495 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
496 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
497 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
498 <copy todir="${outputDir}/lang">
499 <fileset dir="${resourceDir}/lang">
500 <include name="**.*"/>
503 <jar destfile="in.jar" index="true">
505 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
506 <attribute name="Application-Name" value="JalviewLite" />
507 <attribute name="Codebase" value="${applet.codebase}" />
509 <fileset dir="${outputDir}">
510 <include name="com/**" />
511 <include name="MCview/**" />
512 <include name="jalview/**" />
513 <include name=".build_properties" />
514 <include name="images/idwidth.gif" />
515 <include name="images/link.gif" />
516 <include name="lang/**" />
520 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
522 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
523 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
524 <delete file="in.jar" />
526 <target name="-obfuscatereally" unless="donotobfuscate">
528 <path id="obfuscateDeps.path">
529 <pathelement location="${applet.jre.tools}" />
530 <pathelement location="appletlib/${jmolJar}" />
532 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
535 <injar file="in.jar" />
536 <outjar file="${jalviewLiteJar}" />
537 <libraryjar refid="obfuscateDeps.path" />
539 <keep access="public" type="class" name="jalview.bin.JalviewLite">
540 <field access="public" />
541 <method access="public" />
542 <constructor access="public" />
544 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
545 <field access="public" />
546 <method access="public" />
547 <constructor access="public" />
549 <!-- -libraryjars "${obfuscateDeps}"
551 -outjars jalviewApplet.jar
552 -keep public class jalview.bin.JalviewLite
555 <delete file="in.jar" />
558 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
559 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
561 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
562 <include name="*.java" />
563 <include name="descriptors/*.java" />
566 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
567 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
568 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
569 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
571 now build the jalview.binding package with the old schema set
574 <fileset dir="${sourceDir}/jalview/binding/">
575 <include name="**" />
578 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
579 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
580 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
582 <target name="sourcedist" description="create jalview source distribution" depends="init">
583 <delete file="${source.dist.name}" />
584 <tar destfile="${source.dist.name}" compression="gzip">
585 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
586 <include name="LICENSE" />
587 <include name="README" />
588 <include name="build.xml" />
589 <include name="jalview-jalopy.xml" />
590 <include name="JalviewApplet.jpx" />
591 <include name="JalviewX.jpx" />
592 <include name="nbbuild.xml"/>
593 <include name="nbproject/genfiles.properties"/>
594 <include name="nbproject/project.properties"/>
595 <include name="nbproject/project.xml"/>
596 <include name="${sourceDir}/*.java" />
597 <include name="${sourceDir}/**/*.java" />
598 <include name="${sourceDir}/**/*.cdr" />
599 <include name="${libDir}/**/*" />
600 <include name="${resourceDir}/**/*" />
601 <include name="${helpDir}/**/*" />
602 <include name="appletlib/${jmolJar}" />
603 <exclude name="**/*locales" />
604 <exclude name="*locales/**" />
605 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
606 <exclude name="utils/InstallAnywhere/**Build*/**" />
607 <exclude name="utils/InstallAnywhere/**Build*/**" />
608 <exclude name="utils/InstallAnywhere/**locale*" />
609 <exclude name="utils/InstallAnywhere/**locale*/**" />
610 <include name="${schemaDir}/**/*" />
611 <include name="utils/**/*" />
612 <include name="${docDir}/**/*" />
613 <include name="examples/**/*" />
617 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
618 <copy todir="${packageDir}/examples">
619 <fileset dir="examples">
620 <include name="**/*"/>
621 <include name="javascript/*"/>
622 <include name="jmol/*"/>
625 <include name="${jalviewLiteJar}" />
627 <fileset dir="appletlib">
628 <include name="**/*"/>
631 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
632 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
634 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
635 <!-- <attribute name="Permissions" value="sandbox" /> -->
636 <!--<attribute name="Trusted-Lib" value="true" /> -->
637 <attribute name="Codebase" value="${applet.codebase}"/>
638 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
641 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
642 <fileset dir="${packageDir}/examples">
643 <include name="*.jar" />
646 <presetdef name="ap_applet.jar">
647 <!-- build a signed applet with 'all-permissions' -
648 Needs 'param name="permissions' value="all-permissions"' in applet tag
649 JalviewLite+JmolApplet linked sequence/structure fails
650 Mixed code warnings are raised
652 <jar update="true" index="true">
654 <attribute name="Application-Name" value="JalviewLite" />
655 <attribute name="Permissions" value="all-permissions" />
656 <attribute name="Codebase" value="${applet.codebase}" />
657 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
658 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
662 <presetdef name="applet.jar">
663 <!-- build signed applet with sandbox permissions -
664 Needs 'param name="permissions' value="sandbox"' in applet tag
665 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
668 <jar update="true" index="true">
670 <attribute name="Application-Name" value="JalviewLite" />
671 <attribute name="Permissions" value="sandbox" />
672 <attribute name="Codebase" value="${applet.codebase}" />
673 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
674 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
678 <presetdef name="tl_applet.jar">
679 <!-- build signed applet with trusted library/trusted permissions -
680 Needs 'param name="permissions' value="all-permissions"' in applet tag
682 No mixed code warnings raised
683 Jmol/JalviewLite sequence/structure example doesn't link structures
684 Raises dialog asking user to allow page to control applet via LiveConnect javascript
688 <jar update="true" index="true">
690 <attribute name="Application-Name" value="JalviewLite" />
691 <attribute name="Permissions" value="all-permissions" />
692 <attribute name="Codebase" value="${applet.codebase}" />
693 <attribute name="Trusted-Only" value="true" />
694 <attribute name="Trusted-Library" value="true" />
698 <presetdef name="to_applet.jar">
699 <!-- not fully test variant (yet) -->
700 <jar update="true" index="true">
702 <attribute name="Application-Name" value="JalviewLite" />
703 <attribute name="Permissions" value="all-permissions" />
704 <attribute name="Codebase" value="${applet.codebase}" />
705 <attribute name="Trusted-Only" value="true" />
709 <!-- create differently privileged artefacts -->
710 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
711 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true"/>
712 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
713 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
714 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
715 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
716 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
717 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
718 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
719 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
720 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
721 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
722 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
723 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
724 <!-- finally, create manifest for original jars -->
725 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
726 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
728 <!-- todo - write examples/downloads for alternate versions of the applet -->
729 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
731 <fileset dir="${packageDir}/examples">
732 <exclude name="u_*.jar"/>
733 <include name="${jalviewLiteJar}" />
734 <include name="${jmolJar}" />
735 <include name="to_${jalviewLiteJar}" />
736 <include name="to_${jmolJar}" />
737 <include name="tl_${jalviewLiteJar}" />
738 <include name="tl_${jmolJar}" />
739 <include name="ap_${jalviewLiteJar}" />
740 <include name="ap_${jmolJar}" />
743 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
744 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
746 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
747 <javadoc destdir="${javadocDir}">
748 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">