3 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 <!-- Anne's version needs 1.7 - should rebuild VARNA to java 1.6 for release -->
98 <property name="j2sev" value="1.7+"/>
100 <!-- Permissions for running Java applets and applications. -->
101 <!-- Defaults are those suitable for deploying jalview webstart www.jalview.org -->
102 <property name="application.codebase" value="*.jalview.org" />
103 <!-- and allowing the applet to be deployed from any URL -->
104 <property name="applet.codebase" value="*" />
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="varnaJar" value="VARNAv3-9.jar" />
120 <property name="jalviewLiteJar" value="jalviewApplet.jar" />
121 <!-- switch to indicate if we should obfuscate jalviewLite -->
122 <!--<property name="donotobfuscate" value="true"/> -->
124 <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
125 <property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
126 <property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
127 <property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
128 <property name="wsdl.MsaWS2" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS?wsdl" />
129 <property name="WSInterf" value="MsaWS" />
130 <property name="wsdl.Namespace" value="vamsas" />
131 <property name="wsdl.ClientNS" value="ext.vamsas" />
132 <!-- the class path for building the application -->
133 <path id="build.classpath">
134 <fileset dir="utils">
135 <include name="*.jar" />
136 <include name="**/*.jar" />
138 <fileset dir="${libDir}">
139 <include name="*.jar" />
140 <include name="**/*.jar" />
142 <fileset dir="${java.home}/lib">
143 <include name="plugin.jar"/>
145 <fileset dir="appletlib">
146 <!-- the JmolApplet includes the JmolApplet console and the application javac seems to always try and build all packages
148 <include name="${jmolJar}" />
149 <include name="${varnaJar}" />
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" />
159 --><!-- jre for 1.4 version -->
160 <property name="applet.jre.tools" value="${java.home}/lib/rt.jar"/>
162 <!-- the classpath for building the 1.1 applet -->
163 <path id="jalviewlite.deps">
164 <fileset dir="${java118.home}">
165 <include name="lib/classes.zip" />
167 <fileset dir="${java.home}/lib">
168 <include name="plugin.jar"/>
170 <pathelement location="appletlib/${jmolJar}" />
171 <pathelement location="lib/${varnaJar}" />
174 <!-- default location for outputting javadoc -->
175 <property name="javadocDir" value="${packageDir}/javadoc"/>
179 <taskdef classpath="utils/roxes-ant-tasks-1.2-2004-01-30.jar" resource="com/roxes/tools/ant/taskdefs.properties" />
180 <target name="buildPropertiesFile" depends="init">
181 <tstamp prefix="build">
182 <format property="date" pattern="dd MMMM yyyy" />
184 <properties file="${outputDir}/.build_properties">
186 ---Jalview Build Details---
188 <property name="VERSION" value="${JALVIEW_VERSION}" />
189 <property name="BUILD_DATE" value="${build.date}" />
194 <target name="clean" depends="init">
195 <!-- not efficient yet. -->
196 <delete dir="${outputDir}" includes="*,**/*"/>
199 <target name="distclean" depends="init, clean">
201 <echo message="REMOVING ALL BACKUP/AUTOSAVES!" />
204 <include name="${outputJar}" />
205 <include name="#*#" />
206 <include name="#*.*#" />
207 <include name="**/#*#" />
208 <include name="**/#*.*#" />
209 <include name="*~" />
210 <include name="*.*~" />
211 <include name="**/*~" />
212 <include name="**/*.*~" />
217 <target name="prepare" depends="init">
218 <mkdir dir="${outputDir}" />
219 <copy todir="${outputDir}">
221 <include name="${docDir}/**/*.*" />
222 <include name="${helpDir}/**/*.*" />
223 <include name="${libDir}/*.jar" />
225 <fileset dir="${resourceDir}">
226 <include name="**/*.*" />
231 <target name="build" depends="prepare">
232 <!-- not efficient yet. -->
233 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}" classpathref="build.classpath">
234 <exclude name="jalview/*applet*" />
235 <exclude name="jalview/appletgui/**" />
236 <exclude name="com/stevesoft/**" />
239 <target name="buildindices" depends="init, prepare" unless="help.uptodate">
240 <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
245 <target name="makefulldist" depends="makedist">
246 <copy todir="${packageDir}">
247 <fileset dir="${resourceDir}/images">
248 <include name="${WebStartImage}"/>
252 <taskdef classpathref="build.classpath" resource="com/roxes/tools/ant/taskdefs.properties" />
254 <!-- create a dummy jar which will eventually contain the jnlp template -->
255 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
256 <fileset dir="${packageDir}">
257 <include name="jalview.jar" />
261 <mkdir dir="${packageDir}/JNLP-INF"/>
262 <antcall target="writejnlpf">
263 <param name="jnlpFile" value="${packageDir}/JNLP-INF/APPLICATION-TEMPLATE.JNLP"/>
264 <param name="inih" value="*" />
265 <param name="maxh" value="*"/>
268 <jar destfile="${packageDir}/jalview_jnlp_vm.jar" index="true">
269 <fileset dir="${packageDir}">
270 <include name="JNLP-INF"/>
274 <antcall target="writejnlpf">
275 <param name="jnlpFile" value="${packageDir}/jalview.jnlp"/>
276 <param name="inih" value="10M" />
277 <param name="maxh" value="256M"/>
280 <antcall target="writejnlpf">
281 <param name="jnlpFile" value="${packageDir}/jalview_1G.jnlp"/>
282 <param name="inih" value="128M" />
283 <param name="maxh" value="512M"/>
286 <antcall target="writejnlpf">
287 <param name="jnlpFile" value="${packageDir}/jalview_2G.jnlp"/>
288 <param name="inih" value="256M" />
289 <param name="maxh" value="1024M"/>
292 <!-- finally, need to postprocess to add in associations at end of 'information' element
294 <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
301 <association mime-type="application-x/ext-file" extensions="fa"/>
302 <association mime-type="application-x/ext-file" extensions="fasta"/>
303 <association mime-type="application-x/ext-file" extensions="mfa"/>
304 <association mime-type="application-x/ext-file" extensions="fastq"/>
305 <association mime-type="application-x/ext-file" extensions="blc"/>
306 <association mime-type="application-x/ext-file" extensions="msf"/>
307 <association mime-type="application-x/ext-file" extensions="pfam"/>
308 <association mime-type="application-x/ext-file" extensions="aln"/>
309 <association mime-type="application-x/ext-file" extensions="pir"/>
310 <association mime-type="application-x/ext-file" extensions="amsa"/>
311 <association mime-type="application-x/ext-file" extensions="stk"/>
312 <association mime-type="application-x/ext-file" extensions="jar"/>-->
313 <!-- and sign the jars -->
314 <!-- the default keystore details might need to be edited here -->
315 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
316 <fileset dir="${packageDir}">
317 <include name="*.jar" />
322 <target name="runenv" depends="init">
323 <path id="run.classpath">
324 <pathelement location="${outputDir}" />
325 <fileset dir="${outputDir}">
326 <include name="${libDir}/*.jar" />
329 <pathconvert targetos="unix" refid="run.classpath" property="run.classpath" />
331 <echo>java -classpath ${run.classpath} jalview.bin.Jalview
334 <target name="writejnlpf">
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}"/>
368 <target name="buildextclients" depends="init">
369 <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" />
370 <condition property="dontextbuild">
371 <equals arg1="n" arg2="${doextbuild.response}" />
373 <condition property="dontextbuild">
374 <equals arg1="N" arg2="${doextbuild.response}" />
376 <fail if="dontextbuild">
377 Build External Client Code process aborted by user. Jalview source is unchanged.
379 <!-- Currently, this doesn't happen automatically.
380 1. Run WSDL2Java as below, which generates an ext.vamsas +
381 vamsas.<datapackages> fileset.
382 2. refactor ext.vamsas.SpecificserviceWS* to
383 ext.vamsas.ServiceclassWS* that implements the ServiceclassWSI interface.
384 3. Update the jalview.ws.*WServices classes to reflect the
385 interface type, and all locations of this wsdl type that Jalview
389 <path id="axisbuild">
390 <path refid="build.classpath" />
392 <taskdef resource="axis-tasks.properties" classpathref="axisbuild" />
394 <fileset dir="${sourceDir}" id="client">
395 <include name="${wsdl.ClientNS}/*.*" />
399 <axis-wsdl2java output="${sourceDir}" verbose="true" url="${wsdl.MsaWS2}" serverside="false" deployscope="Request" debug="false" helpergen="true" all="true">
401 <mapping namespace="${wsdl.Namespace}" package="${wsdl.ClientNS}" />
402 <mapping namespace="http://dataTypes.vamsas" package="${wsdl.ClientNS}" />
407 <target name="makedist" depends="build, buildPropertiesFile, buildindices">
408 <!-- make the package jar if not already existing -->
409 <mkdir dir="${packageDir}" />
410 <!-- clean dir if it already existed -->
412 <fileset dir="${packageDir}">
413 <include name="*.jar"/>
416 <jar destfile="${packageDir}/${outputJar}" index="true">
418 <attribute name="Main-Class" value="jalview.bin.Jalview" />
419 <attribute name="Permissions" value="all-permissions" />
420 <attribute name="Application-Name" value="Jalview Desktop" />
421 <attribute name="Codebase" value="${application.codebase}" />
423 <fileset dir="${outputDir}/">
424 <exclude name="cache*/**" />
425 <exclude name="*.jar" />
426 <exclude name="*.jar.*" />
427 <exclude name="**/*.jar" />
428 <exclude name="**/*.jar.*" />
432 <copy toDir="${packageDir}" flatten="true">
433 <fileset dir="${outputDir}">
434 <include name="*.jar" />
435 <include name="**/*.jar" />
441 <!-- jalopy code reformatter -->
442 <target name="sourcescrub" depends="init,build">
443 <jalopy destdir="jsrc" classpathref="run.classpath" convention="jalview-jalopy.xml">
444 <fileset dir="${sourceDir}">
445 <include name="*.java" />
446 <include name="**/*.java" />
447 <include name="**/**/*.java" />
454 <!-- Compile, package and obfuscate Jalview Applet -->
455 <target name="makeApplet" depends="obfuscate" description="assemble the final jalviewLite applet jar with or without obfuscation"/>
457 <target name="compileApplet" depends="init,clean">
458 <mkdir dir="${outputDir}" />
459 <javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
460 classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
461 excludes="ext/**,MCview/**,org/**,vamsas/**,jalview/ext/paradise/**" />
464 <target name="packageApplet" depends="compileApplet, buildPropertiesFile">
465 <copy file="${resourceDir}/images/idwidth.gif" toFile="${outputDir}/images/idwidth.gif" />
466 <copy file="${resourceDir}/images/link.gif" toFile="${outputDir}/images/link.gif" />
467 <copy todir="${outputDir}/lang">
468 <fileset dir="${resourceDir}/lang"><include name="**.*"/></fileset></copy>
469 <jar destfile="in.jar" index="true">
471 <attribute name="Main-Class" value="jalview.bin.JalviewLite" />
472 <attribute name="Application-Name" value="JalviewLite" />
473 <attribute name="Codebase" value="${applet.codebase}" />
475 <fileset dir="${outputDir}">
476 <include name="com/**" />
477 <include name="MCview/**" />
478 <include name="jalview/**" />
479 <include name=".build_properties" />
480 <include name="images/idwidth.gif" />
481 <include name="images/link.gif" />
482 <include name="lang/**" />
486 <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
488 <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
489 <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
490 <delete file="in.jar" />
492 <target name="-obfuscatereally" unless="donotobfuscate">
494 <path id="obfuscateDeps.path">
495 <pathelement location="${applet.jre.tools}" />
496 <pathelement location="appletlib/${jmolJar}" />
498 <taskdef resource="proguard/ant/task.properties" classpath="utils/proguard.jar" />
501 <injar file="in.jar" />
502 <outjar file="${jalviewLiteJar}" />
503 <libraryjar refid="obfuscateDeps.path" />
505 <keep access="public" type="class" name="jalview.bin.JalviewLite">
506 <field access="public" />
507 <method access="public" />
508 <constructor access="public" />
510 <keep access="public" type="class" name="jalview.appletgui.AlignFrame">
511 <field access="public" />
512 <method access="public" />
513 <constructor access="public" />
515 <!-- -libraryjars "${obfuscateDeps}"
517 -outjars jalviewApplet.jar
518 -keep public class jalview.bin.JalviewLite
521 <delete file="in.jar" />
524 <target name="castorbinding" depends="init" description="Generate Java bindings to supported Jalview XML models.">
525 <taskdef name="castor-srcgen" classname="org.castor.anttask.CastorCodeGenTask" classpathref="build.classpath" />
527 <fileset dir="${sourceDir}/jalview/schemabinding/version2">
528 <include name="*.java" />
529 <include name="descriptors/*.java" />
532 <castor-srcgen file="${schemaDir}/vamsas.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
533 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
534 <castor-srcgen file="${schemaDir}/JalviewWsParamSet.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
535 <castor-srcgen file="${schemaDir}/jalview.xsd" todir="${sourceDir}" package="jalview.schemabinding.version2" warnings="false" nodesc="false" verbose="true" properties="${schemaDir}/jalview.properties" />
537 now build the jalview.binding package with the old schema set
540 <fileset dir="${sourceDir}/jalview/binding/">
541 <include name="**" />
544 <castor-srcgen file="${schemaDir}/vamsasJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
545 <castor-srcgen file="${schemaDir}/JalviewUserColours.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
546 <castor-srcgen file="${schemaDir}/jalviewJvV1.xsd" todir="${sourceDir}" package="jalview.binding" warnings="false" nodesc="true" verbose="true" properties="${schemaDir}/jalview.nodesc.properties" />
548 <target name="sourcedist" description="create jalview source distribution" depends="init">
549 <delete file="${source.dist.name}" />
550 <tar destfile="${source.dist.name}" compression="gzip">
551 <tarfileset dir="./" prefix="jalview" preserveLeadingSlashes="true">
552 <include name="LICENSE" />
553 <include name="README" />
554 <include name="build.xml" />
555 <include name="jalview-jalopy.xml" />
556 <include name="JalviewApplet.jpx" />
557 <include name="JalviewX.jpx" />
558 <include name="nbbuild.xml"/>
559 <include name="nbproject/genfiles.properties"/>
560 <include name="nbproject/project.properties"/>
561 <include name="nbproject/project.xml"/>
562 <include name="${sourceDir}/*.java" />
563 <include name="${sourceDir}/**/*.java" />
564 <include name="${sourceDir}/**/*.cdr" />
565 <include name="${libDir}/**/*" />
566 <include name="${resourceDir}/**/*" />
567 <include name="${helpDir}/**/*" />
568 <include name="appletlib/${jmolJar}" />
569 <exclude name="**/*locales" />
570 <exclude name="*locales/**" />
571 <exclude name="utils/InstallAnywhere/**Build.iap_xml" />
572 <exclude name="utils/InstallAnywhere/**Build*/**" />
573 <exclude name="utils/InstallAnywhere/**Build*/**" />
574 <exclude name="utils/InstallAnywhere/**locale*" />
575 <exclude name="utils/InstallAnywhere/**locale*/**" />
576 <include name="${schemaDir}/**/*" />
577 <include name="utils/**/*" />
578 <include name="${docDir}/**/*" />
579 <include name="examples/**/*" />
583 <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
584 <copy todir="${packageDir}/examples">
585 <fileset dir="examples">
586 <include name="**/*"/>
587 <include name="javascript/*"/>
588 <include name="jmol/*"/>
591 <include name="${jalviewLiteJar}" />
593 <fileset dir="appletlib">
594 <include name="**/*"/>
597 <jar update="true" index="true" jarfile="${packageDir}/examples/${jalviewLiteJar}"/>
598 <jar update="true" index="true" jarfile="${packageDir}/examples/${jmolJar}">
600 <attribute name="Application-Name" value="Jmol (bundled with JalviewLite)"/>
601 <!-- <attribute name="Permissions" value="sandbox" /> -->
602 <!--<attribute name="Trusted-Lib" value="true" /> -->
603 <attribute name="Codebase" value="${applet.codebase}"/>
604 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}"/>
607 <signjar sigalg="SHA1WithRSA" storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
608 <fileset dir="${packageDir}/examples">
609 <include name="*.jar" />
612 <presetdef name="ap_applet.jar">
613 <!-- build a signed applet with 'all-permissions' -
614 Needs 'param name="permissions' value="all-permissions"' in applet tag
615 JalviewLite+JmolApplet linked sequence/structure fails
616 Mixed code warnings are raised
618 <jar update="true" index="true">
620 <attribute name="Application-Name" value="JalviewLite" />
621 <attribute name="Permissions" value="all-permissions" />
622 <attribute name="Codebase" value="${applet.codebase}" />
623 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
624 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
628 <presetdef name="applet.jar">
629 <!-- build signed applet with sandbox permissions -
630 Needs 'param name="permissions' value="sandbox"' in applet tag
631 Preserves Pre-Java 1.7_u45 behavior once 'permissions' parameter added to applet tag
634 <jar update="true" index="true">
636 <attribute name="Application-Name" value="JalviewLite" />
637 <attribute name="Permissions" value="sandbox" />
638 <attribute name="Codebase" value="${applet.codebase}" />
639 <attribute name="Caller-Allowable-Codebase" value="${applet.caller-codebase}" />
640 <attribute name="Application-Library-Allowable-Codebase" value="${applet.codebase}" />
644 <presetdef name="tl_applet.jar">
645 <!-- build signed applet with trusted library/trusted permissions -
646 Needs 'param name="permissions' value="all-permissions"' in applet tag
648 No mixed code warnings raised
649 Jmol/JalviewLite sequence/structure example doesn't link structures
650 Raises dialog asking user to allow page to control applet via LiveConnect javascript
654 <jar update="true" index="true">
656 <attribute name="Application-Name" value="JalviewLite" />
657 <attribute name="Permissions" value="all-permissions" />
658 <attribute name="Codebase" value="${applet.codebase}" />
659 <attribute name="Trusted-Only" value="true" />
660 <attribute name="Trusted-Library" value="true" />
664 <presetdef name="to_applet.jar">
665 <!-- not fully test variant (yet) -->
666 <jar update="true" index="true">
668 <attribute name="Application-Name" value="JalviewLite" />
669 <attribute name="Permissions" value="all-permissions" />
670 <attribute name="Codebase" value="${applet.codebase}" />
671 <attribute name="Trusted-Only" value="true" />
675 <!-- create differently privileged artefacts -->
676 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/u_${jalviewLiteJar}" />
677 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true"/>
678 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/ap_${jalviewLiteJar}" />
679 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/ap_${jmolJar}"/>
680 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jalviewLiteJar}" />
681 <ap_applet.jar jarfile="${packageDir}/examples/ap_${jmolJar}" />
682 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/tl_${jalviewLiteJar}" />
683 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/tl_${jmolJar}" />
684 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jalviewLiteJar}" />
685 <tl_applet.jar jarfile="${packageDir}/examples/tl_${jmolJar}" />
686 <copy file="${packageDir}/examples/${jalviewLiteJar}" tofile="${packageDir}/examples/to_${jalviewLiteJar}" />
687 <copy file="${packageDir}/examples/${jmolJar}" tofile="${packageDir}/examples/to_${jmolJar}" />
688 <to_applet.jar jarfile="${packageDir}/examples/to_${jalviewLiteJar}" />
689 <to_applet.jar jarfile="${packageDir}/examples/to_${jmolJar}" />
690 <!-- finally, create manifest for original jars -->
691 <applet.jar jarfile="${packageDir}/examples/${jalviewLiteJar}" />
692 <applet.jar jarfile="${packageDir}/examples/${jmolJar}" />
694 <!-- todo - write examples/downloads for alternate versions of the applet -->
695 <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false">
697 <fileset dir="${packageDir}/examples">
698 <exclude name="u_*.jar"/>
699 <include name="${jalviewLiteJar}" />
700 <include name="${jmolJar}" />
701 <include name="to_${jalviewLiteJar}" />
702 <include name="to_${jmolJar}" />
703 <include name="tl_${jalviewLiteJar}" />
704 <include name="tl_${jmolJar}" />
705 <include name="ap_${jalviewLiteJar}" />
706 <include name="ap_${jmolJar}" />
709 <!-- bizarre bug causes JmolApplet to always get signed, even if excluded from above. so copy explicitly -->
710 <copy file="appletlib/${jmolJar}" tofile="${packageDir}/examples/u_${jmolJar}" overwrite="true" />
712 <target name="sourcedoc" description="Create jalview source documentation pages" depends="init">
713 <javadoc destdir="${javadocDir}">
714 <packageset dir="${sourceDir}" includes="jalview/*,MCView/*">