Files
getdown/build.xml
T
Michael Bayne c4641083bf Reference this at the permanent location, though this should all go away
and be replaced with something free.
2004-12-14 23:14:12 +00:00

98 lines
3.6 KiB
XML

<!-- build configuration -->
<project name="getdown" default="compile" basedir=".">
<!-- various basic settings -->
<property name="app.name" value="getdown"/>
<property name="src.dir" value="src/java"/>
<property name="deploy.dir" value="dist"/>
<property name="dist.jar" value="${app.name}.jar"/>
<property name="app.dop" value="etc/${app.name}.dop"/>
<!-- we get DashO from a magical place -->
<property name="dasho-tool.jar" value="/export/threerings/lib/DashoPro.jar"/>
<!-- used when generating javadocs -->
<property name="javadoc.dir" value="${deploy.dir}/docs"/>
<property name="doc.packages" value="com.threerings.getdown.*"/>
<property name="doc.overview" value="com/threerings/getdown/overview.html"/>
<property name="copy.pre" value="Copyright &#169; 2004"/>
<property name="copyright.holder" value="Three Rings Design, Inc."/>
<property name="copy.post" value="All Rights Reserved."/>
<!-- declare our classpath -->
<path id="clazzpath">
<fileset dir="lib" includes="**/*.jar"/>
<pathelement location="${deploy.dir}/classes"/>
</path>
<!-- prepares the application directories -->
<target name="prepare">
<mkdir dir="${deploy.dir}"/>
<mkdir dir="${deploy.dir}/classes"/>
<mkdir dir="${javadoc.dir}"/>
<!-- copy media and properties into the target directory -->
<copy todir="${deploy.dir}/classes">
<fileset dir="${src.dir}" includes="**/*.jpg"/>
<fileset dir="${src.dir}" includes="**/*.png"/>
<fileset dir="${src.dir}" includes="**/*.properties"/>
</copy>
</target>
<!-- cleans out the built application -->
<target name="clean">
<delete dir="${deploy.dir}"/>
</target>
<!-- build the java class files -->
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${deploy.dir}/classes"
debug="on" optimize="off" deprecation="on"
classpathref="clazzpath" includeAntRuntime="no"/>
</target>
<!-- build the javadoc documentation -->
<target name="javadoc" depends="prepare">
<javadoc sourcepath="${src.dir}"
packagenames="${doc.packages}"
windowtitle="${app.name} API"
doctitle="${app.name} API"
overview="${src.dir}/${doc.overview}"
bottom="${copy.pre} ${copyright.holder} ${copy.post}"
destdir="${javadoc.dir}">
<classpath refid="clazzpath"/>
<link href="http://www.samskivert.com/code/samskivert/javadoc"/>
<link href="http://java.sun.com/products/jdk/1.4/docs/api"/>
</javadoc>
</target>
<!-- a target for rebuilding everything -->
<target name="all" depends="clean,prepare,compile,javadoc,dist"/>
<!-- builds our distribution files -->
<target name="dist" depends="prepare,compile">
<jar destfile="${deploy.dir}/${dist.jar}" manifest="lib/manifest.mf"
basedir="${deploy.dir}/classes"/>
</target>
<!-- runs DashO on the code and jars up the results -->
<target name="dasho" depends="dist">
<delete dir="dclasses"/>
<!-- now run DashO on the whole business -->
<echo message="Invoking DashO ${dasho-tool.jar}..."/>
<exec executable="java">
<arg line="-mx256M"/>
<arg line="-classpath ${dasho-tool.jar}"/>
<arg line="DashoPro"/>
<arg line="-f ${app.dop}"/>
</exec>
<!-- blow away some javaws crap -->
<delete dir="dclasses/com/sun/javaws/resources"/>
<delete dir="dclasses/com/sun/javaws/ui"/>
<!-- finally jar up the results -->
<jar basedir="dclasses" manifest="lib/manifest.mf"
destfile="${deploy.dir}/${app.name}-dop.jar"/>
</target>
</project>