Here's the TreasureTomb build.xml. I don't really suppose it's all that much use to you unless you write your games in a very similar way to me, which is unlikely, but here goes anyway:
<project name="TreasureTomb" default="all" basedir="..">
<target name="init">
<!-- Paths -->
<property name="res" value="res" />
<property name="src" value="src" />
<property name="bin" value="bin" />
<property name="resources-src" value="resources" />
<property name="libs" value="../Common/libs" />
<property name="nativelibs" value="../Common/native" />
<property name="gamecommerce" value="../GameCommerce/bin" />
<property name="spgltools" value="../SPGLTools/bin" />
<property name="spgl" value="../Shaven Puppy Game Library/bin" />
<property name="lwjgl" value="../Common/libs/lwjgl.jar" />
<property name="lwjglutil" value="../Common/libs/lwjgl_util.jar" />
<property name="lwjglapplet" value="../LWJGLApplets/bin" />
<property name="output" value="build" />
<property name="webstart-output" value="${output}/webstart" />
<property name="affiliate" value="puppygames" />
<!-- Signing -->
<property name="keystore" value="c:/Projects/Common/build/shavenpuppyltd-code-signing-certificate-2006" />
<property name="alias" value="puppygames"/>
<property name="storepass" value="as if i'm going to tell you"/>
<property name="storetype" value="jks"/>
<!-- MacOS X -->
<property name="product.name" value="${ant.project.name}" />
<property name="product.version" value="1.0" />
<property name="macos-stuff" value="${output}/MacOS" />
<property name="macbuilds" location="${output}/${product.name}Mac" />
<property name="gamejar" value="${product.name}.jar" />
<!-- Tools path -->
<path id="tools.classpath">
<pathelement path="${bin}" />
<!-- Add the /res directory to the path... -->
<pathelement path="${res}" />
<pathelement path="${src}" />
<pathelement path="${diddler}" />
<pathelement path="${gamecommerce}" />
<pathelement path="${lwjglapplet}" />
<pathelement path="${spgltools}" />
<pathelement path="${spgl}" />
<pathelement path="${lwjgl}" />
<pathelement path="${lwjglutil}" />
<pathelement path="${orbis}" />
<pathelement path="${java.class.path}" />
</path>
</target>
<!-- Webstart (also used as the basis for MacOS X) -->
<target name="Webstart Builds" description="Builds the webstart jar and puts it in ${webstart-output}" depends="init">
<mkdir dir="${webstart-output}" taskname="initialiazing webstart dist folder" />
<jar destfile="${webstart-output}/${gamejar}" taskname="Create Webstart game jar" compress="true">
<fileset dir="${bin}">
<include name="**/**.*" />
</fileset>
<fileset dir="${res}">
<include name="**/**.*" />
</fileset>
<fileset dir="${src}">
<include name="**/**.xml" />
</fileset>
<fileset dir="${src}">
<include name="map.dat" />
</fileset>
</jar>
<signjar jar="${webstart-output}/${gamejar}" alias="${alias}" storepass="${storepass}" storetype="${storetype}" keystore="file:${keystore}" />
</target>
<!-- MacOS X Stuff -->
<target name="clean-osx" depends="init">
<delete dir="${macbuilds}" />
<delete>
<fileset dir="${output}" includes="${product.name}_*_MacOSX.zip"/>
</delete>
</target>
<!-- distribution tasks -->
<target name="MacOS X Builds" description="Make Mac application bundle" depends="clean-osx">
<mkdir dir="${macbuilds}/${product.name}.app"/>
<mkdir dir="${macbuilds}/${product.name}.app/Contents"/>
<mkdir dir="${macbuilds}/${product.name}.app/Contents/MacOS"/>
<mkdir dir="${macbuilds}/${product.name}.app/Contents/Resources"/>
<mkdir dir="${macbuilds}/${product.name}.app/Contents/Resources/Java"/>
<copy todir="${macbuilds}/${product.name}.app/Contents/MacOS">
<fileset dir="${macos-stuff}" includes="JavaApplicationStub,mac_launch_fd.sh"/>
</copy>
<copy todir="${macbuilds}/${product.name}.app/Contents/Resources">
<fileset dir="${macos-stuff}" includes="${product.name}.icns"/>
</copy>
<copy todir="${macbuilds}/${product.name}.app/Contents/Resources/Java">
<fileset dir="${webstart-output}">
<include name="${gamejar}" />
</fileset>
<fileset dir="${libs}">
<include name="common.jar" />
<include name="gamecommerce.jar" />
<include name="jorbis.jar" />
<include name="lwjgl.jar" />
<include name="lwjgl_util.jar" />
<include name="spgl-lite.jar" />
<include name="jinput.jar" />
</fileset>
<fileset id="osx.native.files" dir="${nativelibs}">
<include name="liblwjgl.jnilib" />
<include name="libjinput-osx.jnilib" />
<include name="openal.dylib" />
</fileset>
</copy>
<copy preservelastmodified="true" todir="${macbuilds}/${product.name}.app/Contents">
<fileset dir="${macos-stuff}" includes="Info.plist,PkgInfo"/>
<filterset>
<!-- EXECUTABLE is usually the JavaApplicationStub, mac_launch_fd.sh can be
used instead to get more file descriptors for applications that need them. -->
<filter token="EXECUTABLE" value="JavaApplicationStub"/>
<filter token="PRODUCT" value="${product.name}"/>
<filter token="VERSION" value="${product.version}"/>
<filter token="MAIN_CLASS" value="net.puppygames.applet.Launcher"/>
<!-- This part needs to be customized to include all the jars in the path
don't forget to modify Info.plist as needed. -->
<filter token="JAR_FILE1" value="${gamejar}"/>
<filter token="JAR_FILE2" value="gamecommerce.jar"/>
<filter token="JAR_FILE3" value="jorbis.jar"/>
<filter token="JAR_FILE4" value="common.jar"/>
<filter token="JAR_FILE5" value="lwjgl.jar"/>
<filter token="JAR_FILE6" value="lwjgl_util.jar"/>
<filter token="JAR_FILE7" value="spgl-lite.jar"/>
<filter token="JAR_FILE8" value="jinput.jar"/>
<filter token="ICON_FILE" value="${product.name}.icns"/>
<filter token="AFFILIATE" value="puppygames"/>
</filterset>
</copy>
<zip destfile="${output}/${product.name}_MacOSX.zip">
<zipfileset dir="${macbuilds}" filemode="644" dirmode="755" prefix="" includes="**/*" excludes="**/JavaApplicationStub,**/*.sh"/>
<zipfileset dir="${macbuilds}" filemode="755" prefix="" includes="**/JavaApplicationStub,**/*.sh"/>
</zip>
<!-- Puppygames -->
<copy overwrite="true" preservelastmodified="true" todir="${macbuilds}/${product.name}.app/Contents">
<fileset dir="${macos-stuff}" includes="Info.plist,PkgInfo"/>
<filterset>
<!-- EXECUTABLE is usually the JavaApplicationStub, mac_launch_fd.sh can be
used instead to get more file descriptors for applications that need them. -->
<filter token="EXECUTABLE" value="JavaApplicationStub"/>
<filter token="PRODUCT" value="${product.name}"/>
<filter token="VERSION" value="${product.version}"/>
<filter token="MAIN_CLASS" value="net.puppygames.applet.Launcher"/>
<!-- This part needs to be customized to include all the jars in the path
don't forget to modify Info.plist as needed. -->
<filter token="JAR_FILE1" value="${gamejar}"/>
<filter token="JAR_FILE2" value="gamecommerce.jar"/>
<filter token="JAR_FILE3" value="jorbis.jar"/>
<filter token="JAR_FILE4" value="common.jar"/>
<filter token="JAR_FILE5" value="lwjgl.jar"/>
<filter token="JAR_FILE6" value="lwjgl_util.jar"/>
<filter token="JAR_FILE7" value="spgl-lite.jar"/>
<filter token="JAR_FILE8" value="jinput.jar"/>
<filter token="ICON_FILE" value="${product.name}.icns"/>
<filter token="AFFILIATE" value="puppygames"/>
</filterset>
</copy>
<zip destfile="${output}/${product.name}_MacOSX.zip">
<zipfileset dir="${macbuilds}" filemode="644" dirmode="755" prefix="" includes="**/*" excludes="**/JavaApplicationStub,**/*.sh"/>
<zipfileset dir="${macbuilds}" filemode="755" prefix="" includes="**/JavaApplicationStub,**/*.sh"/>
</zip>
<delete dir="${macbuilds}" />
</target>
<target name="pack-fonts" depends="init">
<java fork="true" dir="${res}" classname="com.shavenpuppy.jglib.tools.FontConverter">
<arg value=""04b11-10"" />
<arg value=""tinyfont.jgfont"" />
<arg value="256" />
<arg value=""04b11-16"" />
<arg value=""smallfont.jgfont"" />
<arg value="256" />
<arg value=""04b11-20"" />
<arg value=""bigfont.jgfont"" />
<arg value="256" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
</target>
<target name="pack-images" depends="init">
<java fork="true" dir="." classname="com.shavenpuppy.jglib.tools.ImageConverter">
<arg value="${resources-src}" />
<arg value="${res}" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
<!-- This bit's specially for converting pre-packed tilesets -->
<java fork="true" dir="." classname="com.shavenpuppy.jglib.tools.ImageConverter">
<arg value="${resources-src}/tiles" />
<arg value="${res}" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
</target>
<target name="pack-textures" depends="init">
<java fork="true" dir="." classname="com.shavenpuppy.jglib.tools.TexturePacker">
<arg value="${resources-src}\sprites" />
<arg value="sprites" />
<arg value="${res}" />
<arg value="sprites" />
<arg value="${src}\sprites.xml" />
<arg value="${resources-src}\hotspots.txt" />
<arg value="${resources-src}\styles.txt" />
<arg value="${resources-src}\excludes.txt" />
<arg value="512" />
<arg value="nojpeg" />
<arg value="linear" />
<jvmarg value="-ea" />
<jvmarg value="-Xmx256m" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
</target>
<target name="pack-resources" depends="init">
<java fork="true" dir="${resources-src}" classname="com.shavenpuppy.jglib.resources.ResourceConverter">
<arg value="resources.xml" />
<arg value="../${res}/resources.dat" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
</target>
<target name="pack-sounds" depends="init">
<java fork="true" dir="${resources-src}" classname="com.shavenpuppy.jglib.tools.SoundPacker">
<arg value="sounds" />
<arg value="." />
<arg value="sounds" />
<arg value="../src/soundbank.xml" />
<arg value="44100" />
<arg value="44100" />
<arg value="stereo" />
<jvmarg value="-ea" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
<java fork="true" dir="${resources-src}" classname="com.shavenpuppy.jglib.tools.SoundPacker">
<arg value="sounds" />
<arg value="." />
<arg value="sounds-mono" />
<arg value="../src/soundbank-mono.xml" />
<arg value="44100" />
<arg value="44100" />
<arg value="mono" />
<jvmarg value="-ea" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
<exec dir="${resources-src}" executable="../build/oggenc.exe">
<arg line="-r -C 2 -q 0 -o ..\${res}\sounds.ogg sounds.raw" />
</exec>
<exec dir="${resources-src}" executable="../build/oggenc.exe">
<arg line="-r -C 1 -q 0 -o ..\${res}\sounds-mono.ogg sounds-mono.raw" />
</exec>
</target>
<target name="pack-music" depends="init">
<java fork="true" dir="${resources-src}" classname="com.shavenpuppy.jglib.tools.SoundPacker">
<arg value="music" />
<arg value="." />
<arg value="music" />
<arg value="../src/music.xml" />
<arg value="44100" />
<arg value="22050" />
<arg value="stereo" />
<arg value="xmlonly" />
<jvmarg value="-ea" />
<classpath>
<path refid="tools.classpath" />
</classpath>
</java>
<exec dir="${resources-src}/music" executable="../build/oggenc.exe">
<arg line="--downmix --resample 22050 -q 0 -o ..\..\${res}\title.ogg title.wav" />
</exec>
<exec dir="${resources-src}/music" executable="../build/oggenc.exe">
<arg line="--downmix --resample 22050 -q 0 -o ..\..\${res}\hiscores.ogg hiscores.wav" />
</exec>
<exec dir="${resources-src}/music" executable="../build/oggenc.exe">
<arg line="--downmix --resample 22050 -q 0 -o ..\..\${res}\music00.ogg music00.wav" />
</exec>
</target>
<target name="resources"
depends="pack-sounds, pack-music, pack-fonts, pack-textures, pack-images, pack-resources"
/>
<target name="all">
<antcall target="resources" />
<antcall target="Win32 Builds" />
<antcall target="Webstart Builds" />
<antcall target="MacOS X Builds" />
</target>
<target name="windows" depends="init">
<mkdir dir="${output}/molebox"
taskname="initialiazing molebox folder"
/>
<jar destfile="${output}/molebox/${gamejar}"
taskname="Create game jar (uncompressed)"
compress="false"
>
<fileset dir="${bin}">
<include name="**/**.*" />
</fileset>
<fileset dir="${res}">
<include name="**/**.*" />
</fileset>
</jar>
<copy todir="${output}/molebox" file="${libs}/lwjgl.jar"/>
<copy todir="${output}/molebox" file="${libs}/lwjgl_util.jar"/>
<copy todir="${output}/molebox" file="${libs}/common.jar"/>
<copy todir="${output}/molebox" file="${libs}/gamecommerce.jar"/>
<copy todir="${output}/molebox" file="${libs}/spgl-lite.jar"/>
<copy todir="${output}/molebox" file="${libs}/jorbis.jar"/>
<copy todir="${output}/molebox" file="${libs}/jinput.jar"/>
<copy todir="${output}/${ant.project.name}" file="${nativelibs}/lwjgl.dll"/>
<copy todir="${output}/${ant.project.name}" file="${nativelibs}/jinput-dx8.dll"/>
<copy todir="${output}/${ant.project.name}" file="${nativelibs}/jinput-raw.dll"/>
<copy todir="${output}/${ant.project.name}" file="${nativelibs}/OpenAL32.dll"/>
<signjar jar="${output}/molebox/${gamejar}"
alias="${alias}"
storepass="${storepass}"
storetype="${storetype}"
keystore="file:${keystore}"
/>
</target>
<target name="molebox" depends="windows">
<exec dir="${output}/molebox" executable="build/mbox2c.exe" description="Molebox">
<arg value="${basedir}\build\molebox\${product.name}.exe"/>
</exec>
</target>
<target name="Win32 Builds" description="Make Win32 builds." depends="molebox">
<exec dir="build" executable="build/makensis.exe" description="Build Win32 Puppygames affiliate version">
<arg value="${product.name}PUPPYGAMES.nsi"/>
</exec>
</target>
</project>
BTW I am an Ant n00b so this script is probably rubbish.
Cas
