documentation and targets for building a working applet examples
authorjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 29 Jun 2011 17:33:37 +0000 (18:33 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 29 Jun 2011 17:33:37 +0000 (18:33 +0100)
directory (JAL-834)

build.xml
doc/building.html
doc/index.html

index a75e4ea..5b1066f 100755 (executable)
--- a/build.xml
+++ b/build.xml
                </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" />
+               <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" />
+               -->
+               <property name="java118.home" value="${java.home}" />
+                   <!--<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"/>
                
 
 
        <!-- Compile, package and obfuscate Jalview Applet -->
-       <target name="makeApplet" depends="obfuscate" />
+       <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}" />
                        </fileset>
                </jar>
        </target>
-       <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally" description="construct the final jalviewLite applet jar with or without obfuscation">
+       <target name="obfuscate" depends="-obfuscatefake,-obfuscatereally">
        </target>
        <target name="-obfuscatefake" depends="packageApplet" if="donotobfuscate">
                <copy file="in.jar" tofile="${jalviewLiteJar}" overwrite="true" />
                                <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="${schemaDir}/**/*" />
                                <include name="utils/**/*" />
                                <include name="${docDir}/**/*" />
+                               <include name="examples/**/*" />
                        </tarfileset>
                </tar>
        </target>
+       <target name="pubapplet" description="installs the jalviewLite applet and dependent jars into an applet examples directory built under ${outputDir}" depends="makeApplet">
+         <copy todir="${packageDir}/examples">
+         <fileset dir="examples">
+               <include name="**/*"/>
+         </fileset>
+               <fileset dir=".">
+               <include name="jalviewApplet.jar"/>
+                       </fileset>
+               <fileset dir="appletlib">
+                     <include name="**/*"/>
+                       </fileset>
+         </copy>
+                       
+       </target>
 </project>
index 9c09324..5202400 100755 (executable)
@@ -62,7 +62,21 @@ ant makedist
   key)
 </pre>
 
-<p>
+       <p>
+               <strong>Building the JalviewLite applet<br>
+               </strong> The JalviewLite applet is compiled using a subset of the packages in
+               the src directory (specifically: MCView, and jalview.{datamodel,
+               analysis, appletgui, utils, schemes, api, structure}, and
+               com.stevesoft.*). Once compiled, these class files are obfuscated to
+               make the code run efficiently. To compile the applet Jar, use the
+               makeApplet task - optionally passing in a 'donotobfuscate' property to
+               the ant build (e.g. -Ddonotobfuscate=true) to disable obfuscation. </p><p>
+               The ant target 'pubapplet' can be used to compile install the
+               jalviewApplet.jar and any dependent jars (under appletlib) into a copy
+               of the examples directory created under the <em>outputDir</em> build
+               property (which defaults to the 'dist' directory).
+       </p>
+       <p>
 <h1>using IDEs to build Jalview</h1>
        <p>The Jalview source distribution includes project definitions for
                Eclipse, Netbeans and some rather ancient Borland JBuilder .jpx
index 8c18340..fcc01fe 100644 (file)
@@ -32,11 +32,12 @@ Jalview Source Documentation
        information about each task, and there's lots of comments too.</li>\r
        <li></li>\r
        <li>src - all jalview source packages, including any specially\r
-       adapted code from other GPL programs. See <a href="developing.html">Jalvew\r
+       adapted code from other GPL programs. See <a href="developing.html">Jalview\r
        Development</a> for more info.</li>\r
        <li>lib - All the libraries that Jalview depends on. Every jar\r
        file in this directory should be added to the classpath when building\r
        or running the jalview application.</li>\r
+       <li>appletlib - Any libraries that are specifically required for compiling and/or running the jalviewLite applet (e.g. an applet build of Jmol).\r
        <li>help - the jalview JavaHelp documents<br>\r
        <ul>\r
                <li>help.hs - the main index page. This is generated by the\r
@@ -137,12 +138,11 @@ Jalview Source Documentation
                documentation.</li>\r
        </ul>\r
        </li>\r
-       <li>dist - where the Jars and JNLP file for the java webstart distribution is generated.</li>\r
        <li>installAnywhere - where the installAnywhere build is generated</li>\r
        <li><em>keys</em> - you might not have this - see <a\r
                href="building.html">building</a> for info on how to create it.</li>\r
-</ul>\r
-</li>\r
+<li>dist - where the Jars and JNLP file for the java webstart distribution is generated, and where a copy of the examples directory is created complete with jalviewApplet.jar and the contents of appletlib/*.jar.</li>\r
+<li>examples - a set of example jalview projects and web pages demonstrating the jalviewLite applet. This is essentially mirrors the <a href="http://www.jalview.org/examples/">www.jalview.org/examples</a> directory on Jalview's website.</li>\r
 <li>nbbuild.xml - custom config used by the vanilla netbeans project in nbproject</li>\r
 <li>nbproject - vanilla netbeans project</li>\r
 <li>JalviewApplet.jpx, JalviewX.jpx - old JBuilder project files</li>\r