</classpath>
</taskdef>
- <target name="build-all-cores" id="build-all-cores">
+ <target name="build-all-cores" id="build-all-cores" depends="toJs">
<foreach target="CallToJs" param="classlist">
<path>
<fileset dir="./classlists/" includes="*.txt" />
</target>
<target name="CallToJs" id="CallToJs" description="Don't call this directly - used by build-all-cores to configure the toJs task for each set of classes in classlist">
- <propertyregex property="core.name" input="${classlist}" replace="" regexp="\.txt"/>
+ <basename property="core.name.txt" file="${classlist}"/>
+ <propertyregex property="core.name" input="${core.name.txt}" replace="" regexp="\.txt"/>
<antcall target="toJs"/>
</target>
<target name="toJs" id="toJs">
<!-- sensible defaults for default target -->
- <property name="site.path" value="site/swingjs" />
+ <property name="site" value="site"/>
+ <property name="site.path" value="${site}/swingjs" />
<property name="core.name" value="_jalview" />
<property name="classlist"
description="Class list .txt generated by java2script classloader to be bundled into corefile - default is _j2sclasslist.txt"
<!-- make core files -->
- <echo>creating and compressing core files - warnings are OK; "does not exist" is trouble</echo>
- <echo>reading core class list from file coreclasses</echo>
+ <echo>Building core file '${core.name}' - warnings are OK; "does not exist" is trouble</echo>
+ <echo>Reading core class list from file ${classlist}</echo>
<loadresource property="coreclasses">
<file file="${classlist}"/>
</loadresource>
${coreclasses}
" />
</antcall>
+ <antcall target="publish-core-template"/>
+ </target>
+
+ <target name="publish-core-template" id="publish-core-template" description="Creates a new file ${template.name}_${core.name} from ${template.html} in ${site} which include core file ${core.name} in the Info block">
+ <!-- TODO: extend to process all html templates -->
+ <property name="template.html" value="jalview_bin_Jalview.html"/>
+ <property name="template.name" value="JalviewJS"/>
- <echo>......Now copy an html file in site/ and add core:"${core.name}", to the Info block.</echo>
+ <echo>......Now copying ${site}/${template.html} as ${$template.name}_${core.name}.html with core:"${core.name}", added to the Info block.</echo>
+ <copy file="${site}/${template.html}" tofile="${site}/${template.name}_${core.name}.html"/>
+ <replace token="NONE" value="${core.name}" file="${site}/${template.name}_${core.name}.html"/>
</target>