AppleCommander/build/build.xml
2003-04-14 01:29:09 +00:00

75 lines
2.5 KiB
XML

<project name="AppleCommander" default="executableJar" basedir="..">
<description>
This ANT build script will build the pieces that need to be distributed.
</description>
<property name="work" value="work"/>
<property name="classes" value="${work}/classes"/>
<property name="lib" value="${work}/lib"/>
<property name="source" value="src"/>
<property name="build" value="build"/>
<property name="doc" value="documentation"/>
<property name="web" value="web"/>
<property name="swtjar" value="C:\Program Files\Eclipse 2.1\plugins\org.eclipse.swt.win32_2.1.0\ws\win32\swt.jar"/>
<property name="acjar" value="${lib}/AppleCommander.jar"/>
<property name="aczip" value="${work}/AppleCommander.zip"/>
<target name="init" description="Ensure work directory is present">
<mkdir dir="${work}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${lib}"/>
</target>
<target name="clean" depends="init" description="Wipes out work contents">
<delete dir="${classes}"/>
<delete dir="${lib}"/>
</target>
<target name="executableJar" depends="init" description="Build executable JAR">
<javac srcdir="${source}" destdir="${classes}" target="1.3" classpath="${swtjar}">
<include name="**/*.java"/>
<exclude name="**/*Test.java"/>
</javac>
<jar jarfile="${acjar}" manifest="build/manifest.mf">
<fileset dir="${classes}"/>
<fileset dir="${source}">
<include name="**/*.dump"/>
<include name="**/*.properties"/>
<include name="**/*.gif"/>
</fileset>
<fileset dir=".">
<include name="LICENSE"/>
<include name="TODO"/>
<include name="VERSIONS"/>
</fileset>
</jar>
</target>
<target name="sourceZip" depends="init" description="Build source ZIP archive">
<zip zipfile="${aczip}">
<zipfileset dir=".">
<include name="ECLIPSE-CONFIG"/>
<include name="HEADER"/>
<include name="LICENSE"/>
<include name="NATIVE-COMPILE"/>
<include name="TODO"/>
<include name="VERSIONS"/>
</zipfileset>
<zipfileset dir="${source}" prefix="${source}">
<include name="**/*.java"/>
<include name="**/*.dump"/>
<include name="**/*.properties"/>
<include name="**/*.gif"/>
</zipfileset>
<zipfileset dir="${build}" prefix="${build}"/>
<zipfileset dir="${doc}" prefix="${doc}">
<include name="**/*.txt"/>
</zipfileset>
<zipfileset dir="${web}" prefix="${web}">
<include name="**/*.html"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
</zipfileset>
</zip>
</target>
</project>