You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
696 lines
30 KiB
XML
696 lines
30 KiB
XML
<!--
|
|
The Slick2D Build file. It has the following capabilities:
|
|
|
|
dist - Build the complete distribution
|
|
build-key-store - Build a valid key store for distributing your game
|
|
sign-a-jar - Sign a JAR file for distribution using a key store generated here
|
|
|
|
javadoc - generate the javadoc for Slick
|
|
-->
|
|
<project name="slick" default="dist" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
|
<taskdef name="pack200" classname="com.sun.tools.apache.ant.pack200.Pack200Task" classpath="Pack200Task.jar"/>
|
|
<path id="maven-ant-tasks.classpath" path="maven/maven-ant-tasks-2.0.9.jar" />
|
|
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
|
|
uri="urn:maven-artifact-ant"
|
|
classpathref="maven-ant-tasks.classpath" />
|
|
|
|
<!--
|
|
Initialise the build script
|
|
-->
|
|
<target name="init">
|
|
<property name="username" value="kevin"/>
|
|
<property name="host" value="bob.newdawnsoftware.com"/>
|
|
<property name="dir" value="/home/kevin/public_html/slick"/>
|
|
|
|
<!-- Need to add versioning stuff here! -->
|
|
|
|
<property name="mode" value="demos"/>
|
|
<property name="demos" value="/home/kevin/public_html/slick/${mode}"/>
|
|
<property name="demoscodebase" value="http://slick.cokeandcode.com/${mode}"/>
|
|
|
|
<property name="build.dir" value="target"/>
|
|
<property name="dist" value="dist"/>
|
|
|
|
<delete dir="${build.dir}"/>
|
|
<mkdir dir="${build.dir}/classes"/>
|
|
<mkdir dir="${build.dir}/example-classes"/>
|
|
<delete dir="${dist}"/>
|
|
<mkdir dir="${dist}"/>
|
|
<delete dir="webstart"/>
|
|
<mkdir dir="webstart"/>
|
|
<delete dir="lzma"/>
|
|
<mkdir dir="lzma"/>
|
|
</target>
|
|
|
|
<!--
|
|
Build the java source to the Slick Library
|
|
-->
|
|
<target name="build-slick" depends="init">
|
|
<propertyfile file="src/version">
|
|
<entry key="build" type="int" operation="+" value="1"/>
|
|
</propertyfile>
|
|
<property file="src/version" prefix="version"/>
|
|
|
|
<delete dir="lib/slick.jar"/>
|
|
<javac includes="org/newdawn/slick/**" debug="true" srcdir="src" destdir="${build.dir}/classes" target="1.4" source="1.4">
|
|
<classpath>
|
|
<pathelement path="lib/lwjgl.jar"/>
|
|
<pathelement path="applet/lwjgl_util_applet.jar"/>
|
|
<pathelement path="lib/ibxm.jar"/>
|
|
<pathelement path="lib/jnlp.jar"/>
|
|
<pathelement path="lib/jogg-0.0.7.jar"/>
|
|
<pathelement path="lib/jorbis-0.0.15.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
<jar destfile="lib/slick.jar"
|
|
basedir="${build.dir}/classes" includes="org/newdawn/slick/**"/>
|
|
<jar update="true" destfile="lib/slick.jar"
|
|
basedir="src" includes="org/newdawn/slick/data/*"/>
|
|
<jar update="true" destfile="lib/slick.jar"
|
|
basedir="src" includes="version"/>
|
|
<copy file="lib/slick.jar" toDir="applet"/>
|
|
</target>
|
|
|
|
<target name="build-slick-source" depends="init">
|
|
<delete file="lib/slick-sources.jar"/>
|
|
|
|
<jar destfile="lib/slick-sources.jar"
|
|
basedir="src" includes="org/newdawn/slick/**" excludes="org/newdawn/slick/data/*"/>
|
|
</target>
|
|
|
|
<target name="deploy-maven" depends="build-slick, build-slick-source">
|
|
<input message="Maven Username" addproperty="maven.username"/>
|
|
<input message="Maven Password:" addproperty="maven.password"/>
|
|
|
|
<copy file="lib/slick.jar" toFile="maven/slick-${version.build}.jar"/>
|
|
<copy file="lib/slick-sources.jar" toFile="maven/slick-${version.build}-sources.jar"/>
|
|
<copy file="maven/slick.pom.template" toFile="maven/slick-${version.build}.pom">
|
|
<filterset>
|
|
<filter token="VERSION" value="${version.build}"/>
|
|
</filterset>
|
|
</copy>
|
|
|
|
<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-2"/>
|
|
<artifact:deploy file="maven/slick-${version.build}.jar">
|
|
<artifact:pom file="maven/slick-${version.build}.pom" id="slick"/>
|
|
<artifact:attach file="maven/slick-${version.build}-sources.jar" classifier="sources"/>
|
|
<artifact:remoteRepository url="scp://bob.newdawnsoftware.com:122/home/kevin/public_html/slick/mavenrepo">
|
|
<authentication username="${maven.username}" password="${maven.password}" />
|
|
</artifact:remoteRepository>
|
|
</artifact:deploy>
|
|
</target>
|
|
|
|
<target name="slick-util" depends="build-slick">
|
|
<jar destfile="lib/slick-util.jar">
|
|
<fileset dir="${build.dir}/classes">
|
|
<include name="org/newdawn/slick/opengl/*.class"/>
|
|
<include name="org/newdawn/slick/opengl/renderer/*.class"/>
|
|
<include name="org/newdawn/slick/openal/*.class"/>
|
|
<include name="org/newdawn/slick/util/ResourceLoader.class"/>
|
|
<include name="org/newdawn/slick/util/*Location.class"/>
|
|
<include name="org/newdawn/slick/util/Log.class"/>
|
|
<include name="org/newdawn/slick/loading/*.class"/>
|
|
<include name="org/newdawn/slick/SlickException.class"/>
|
|
<include name="org/newdawn/slick/tests/TestUtils.class"/>
|
|
<include name="org/newdawn/slick/Font.class"/>
|
|
<include name="org/newdawn/slick/Color.class"/>
|
|
<include name="org/newdawn/slick/TrueTypeFont*.class"/>
|
|
<include name="org/newdawn/slick/util/BufferedImageUtil.class"/>
|
|
<include name="org/newdawn/slick/util/LogSystem.class"/>
|
|
<include name="org/newdawn/slick/util/DefaultLogSystem.class"/>
|
|
</fileset>
|
|
</jar>
|
|
|
|
<zip destfile="lib/slick-util-src.zip">
|
|
<fileset dir="src">
|
|
<include name="org/newdawn/slick/opengl/*.java"/>
|
|
<include name="org/newdawn/slick/opengl/renderer/*.java"/>
|
|
<include name="org/newdawn/slick/openal/*.java"/>
|
|
<include name="org/newdawn/slick/util/ResourceLoader.java"/>
|
|
<include name="org/newdawn/slick/util/*Location.java"/>
|
|
<include name="org/newdawn/slick/util/Log.java"/>
|
|
<include name="org/newdawn/slick/loading/*.java"/>
|
|
<include name="org/newdawn/slick/SlickException.java"/>
|
|
<include name="org/newdawn/slick/tests/TestUtils.java"/>
|
|
<include name="org/newdawn/slick/Font.java"/>
|
|
<include name="org/newdawn/slick/Color.java"/>
|
|
<include name="org/newdawn/slick/TrueTypeFont.java"/>
|
|
<include name="org/newdawn/slick/util/BufferedImageUtil.java"/>
|
|
<include name="org/newdawn/slick/util/LogSystem.class"/>
|
|
<include name="org/newdawn/slick/util/DefaultLogSystem.class"/>
|
|
</fileset>
|
|
</zip>
|
|
|
|
<zip destfile="${dist}/slick-util.zip">
|
|
<fileset dir="." includes="lib/slick-util.jar"/>
|
|
<fileset dir="." includes="lib/slick-util-src.zip"/>
|
|
<fileset dir="." includes="lib/ibxm.jar"/>
|
|
<fileset dir="." includes="lib/jorbis*.jar"/>
|
|
<fileset dir="." includes="lib/jogg*.jar"/>
|
|
<fileset dir="." includes="lib/lwjgl*.jar"/>
|
|
</zip>
|
|
|
|
<delete dir="javadoc-util"/>
|
|
<mkdir dir="javadoc-util"/>
|
|
|
|
<javadoc sourcepath="src"
|
|
defaultexcludes="yes"
|
|
destdir="javadoc-util"
|
|
author="true"
|
|
version="true"
|
|
use="true"
|
|
windowtitle="Slick Util - LWJGL Utilities extracted from Slick">
|
|
<fileset dir="src" defaultexcludes="yes">
|
|
<include name="org/newdawn/slick/opengl/*.java"/>
|
|
<include name="org/newdawn/slick/opengl/renderer/*.java"/>
|
|
<include name="org/newdawn/slick/openal/*.java"/>
|
|
<include name="org/newdawn/slick/util/ResourceLoader.java"/>
|
|
<include name="org/newdawn/slick/util/*Location.java"/>
|
|
<include name="org/newdawn/slick/util/Log.java"/>
|
|
<include name="org/newdawn/slick/loading/*.java"/>
|
|
<include name="org/newdawn/slick/SlickException.java"/>
|
|
<include name="org/newdawn/slick/tests/TestUtils.java"/>
|
|
<include name="org/newdawn/slick/tests/TestUtils.java"/>
|
|
<include name="org/newdawn/slick/Font.java"/>
|
|
<include name="org/newdawn/slick/Color.java"/>
|
|
<include name="org/newdawn/slick/TrueTypeFont.java"/>
|
|
<include name="org/newdawn/slick/util/BufferedImageUtil.java"/>
|
|
</fileset>
|
|
<classpath>
|
|
<pathelement path="lib/slick.jar"/>
|
|
<pathelement path="lib/lwjgl.jar"/>
|
|
<pathelement path="lib/ibxm.jar"/>
|
|
<pathelement path="lib/jogg-0.0.7.jar"/>
|
|
<pathelement path="lib/jorbis-0.0.15.jar"/>
|
|
</classpath>
|
|
<doctitle><![CDATA[<h1>Slick</h1>]]></doctitle>
|
|
<bottom><![CDATA[<i>Copyright © 2006 New Dawn Software. All Rights Reserved.</i>]]></bottom>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<!-- build the pedigree tool -->
|
|
<target name="build-pedigree" depends="build-slick">
|
|
<delete file="lib/pedigree.jar"/>
|
|
<javac includes="org/newdawn/slick/tools/peditor/**" debug="true" srcdir="tools" destdir="${build.dir}/classes" target="1.4" source="1.4">
|
|
<classpath>
|
|
<pathelement path="lib/slick.jar"/>
|
|
<pathelement path="lib/lwjgl.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
<jar destfile="lib/pedigree.jar"
|
|
basedir="${build.dir}/classes" includes="org/newdawn/slick/tools/peditor/**">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="org.newdawn.slick.tools.peditor.ParticleEditor"/>
|
|
<attribute name="Class-Path" value="slick.jar lwjgl.jar"/>
|
|
</manifest>
|
|
</jar>
|
|
<jar update="true" destfile="lib/pedigree.jar"
|
|
basedir="tools" includes="org/newdawn/slick/tools/peditor/data/*"/>
|
|
</target>
|
|
|
|
<!-- build the hiero tool -->
|
|
<target name="build-hiero" depends="init">
|
|
<delete file="lib/hiero.jar"/>
|
|
<javac includes="org/newdawn/slick/tools/hiero/**" debug="true" srcdir="tools" destdir="${build.dir}/classes" target="1.4" source="1.4">
|
|
</javac>
|
|
<jar destfile="lib/hiero.jar"
|
|
basedir="${build.dir}/classes" includes="org/newdawn/slick/tools/hiero/**">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="org.newdawn.slick.tools.hiero.Hiero"/>
|
|
</manifest>
|
|
</jar>
|
|
<jar update="true" destfile="lib/hiero.jar"
|
|
basedir="tools" includes="org/newdawn/slick/tools/hiero/resources/*"/>
|
|
<jar update="true" destfile="lib/hiero.jar"
|
|
basedir="tools" includes="org/newdawn/slick/tools/hiero/*.jpg"/>
|
|
</target>
|
|
|
|
<!-- build the scalar tool -->
|
|
<target name="build-scalar" depends="init">
|
|
<delete file="lib/scalar.jar"/>
|
|
<javac includes="org/newdawn/slick/tools/scalar/**" debug="true" srcdir="tools" destdir="${build.dir}/classes" target="1.4" source="1.4">
|
|
</javac>
|
|
<jar destfile="lib/scalar.jar"
|
|
basedir="${build.dir}/classes" includes="org/newdawn/slick/tools/scalar/**">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="org.newdawn.slick.tools.scalar.Scalar"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<!-- build the sprite packer tool -->
|
|
<target name="build-packer" depends="init">
|
|
<delete dir="lib/scalar.jar"/>
|
|
<javac includes="org/newdawn/slick/tools/packulike/**" debug="true" srcdir="tools" destdir="${build.dir}/classes" target="1.4" source="1.4">
|
|
</javac>
|
|
<jar destfile="lib/packulike.jar"
|
|
basedir="${build.dir}/classes" includes="org/newdawn/slick/tools/packulike/**">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="org.newdawn.slick.tools.packulike.Packer"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<!-- build the examples -->
|
|
<target name="build-examples" depends="init">
|
|
<delete dir="lib/slick-examples.jar"/>
|
|
<javac includes="org/newdawn/slick/**" debug="true" srcdir="examples" destdir="${build.dir}/example-classes" target="1.4" source="1.4">
|
|
<classpath>
|
|
<pathelement path="lib/slick.jar"/>
|
|
<pathelement path="lib/lwjgl.jar"/>
|
|
<pathelement path="applet/lwjgl_util_applet.jar"/>
|
|
<pathelement path="lib/ibxm.jar"/>
|
|
<pathelement path="lib/jnlp.jar"/>
|
|
<pathelement path="lib/jogg-0.0.7.jar"/>
|
|
<pathelement path="lib/jorbis-0.0.15.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
<jar destfile="lib/slick-examples.jar"
|
|
basedir="${build.dir}/example-classes" includes="org/newdawn/slick/**">
|
|
</jar>
|
|
</target>
|
|
|
|
<!--
|
|
Generate the javadoc from the Slick sources
|
|
-->
|
|
<target name="javadoc" depends="init">
|
|
<delete dir="javadoc"/>
|
|
<mkdir dir="javadoc"/>
|
|
|
|
<javadoc sourcepath="src"
|
|
defaultexcludes="yes"
|
|
destdir="javadoc"
|
|
author="true"
|
|
version="true"
|
|
use="true"
|
|
windowtitle="Slick - The 2D Library">
|
|
<packageset dir="src" defaultexcludes="yes">
|
|
<include name="org/newdawn/slick/**/**"/>
|
|
</packageset>
|
|
<classpath>
|
|
<pathelement path="lib/slick.jar"/>
|
|
<pathelement path="lib/lwjgl.jar"/>
|
|
<pathelement path="lib/jnlp.jar"/>
|
|
<pathelement path="applet/lwjgl_util_applet.jar"/>
|
|
<pathelement path="lib/ibxm.jar"/>
|
|
<pathelement path="lib/jogg-0.0.7.jar"/>
|
|
<pathelement path="lib/jorbis-0.0.15.jar"/>
|
|
</classpath>
|
|
<doctitle><![CDATA[<h1>Slick</h1>]]></doctitle>
|
|
<bottom><![CDATA[<i>Copyright © 2006 New Dawn Software. All Rights Reserved.</i>]]></bottom>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<!--
|
|
Build and package the complete Slick distribution and demo game
|
|
-->
|
|
<target name="dist" depends="build-slick, build-examples, javadoc, build-test-webstarts">
|
|
<zip destfile="${dist}/slick.zip">
|
|
<fileset dir="." includes="applet/applet.html"/>
|
|
<fileset dir="." includes="applet/jinput.jar"/>
|
|
<fileset dir="." includes="applet/lwjgl.jar"/>
|
|
<fileset dir="." includes="applet/lwjgl_applet.jar"/>
|
|
<fileset dir="." includes="applet/lwjgl_util_applet.jar"/>
|
|
<fileset dir="." includes="applet/natives.jar"/>
|
|
<fileset dir="." includes="javadoc/**"/>
|
|
<fileset dir="." includes="src/org/newdawn/slick/**"/>
|
|
<fileset dir="." includes="tools/**"/>
|
|
<fileset dir="." includes="lib/**"/>
|
|
<fileset dir="." includes="testdata/**"/>
|
|
<fileset dir="." includes="scripts/**"/>
|
|
<fileset dir="." includes="readme.txt"/>
|
|
<fileset dir="." includes="build.xml"/>
|
|
<fileset dir="." includes="lwjgl.dll"/>
|
|
<fileset dir="." includes="OpenAL32.dll"/>
|
|
<fileset dir="." includes="jinput-dx8.dll"/>
|
|
<fileset dir="." includes="jinput-raw.dll"/>
|
|
</zip>
|
|
</target>
|
|
|
|
<!--
|
|
Build pedigree distribution
|
|
-->
|
|
<target name="dist-pedigree" depends="build-pedigree">
|
|
<zip destfile="${dist}/pedigree.zip">
|
|
<fileset dir="lib" includes="pedigree.jar"/>
|
|
<fileset dir="lib" includes="lwjgl.jar"/>
|
|
<fileset dir="lib" includes="slick.jar"/>
|
|
<zipfileset src="lib/natives-win32.jar"/>
|
|
<zipfileset src="lib/natives-linux.jar"/>
|
|
<zipfileset src="lib/natives-mac.jar"/>
|
|
<fileset dir="." includes="pedigree-readme.xml"/>
|
|
<fileset dir="." includes="testdata/flame.xml"/>
|
|
<fileset dir="." includes="testdata/smoke.xml"/>
|
|
<fileset dir="." includes="testdata/system.xml"/>
|
|
</zip>
|
|
</target>
|
|
|
|
<target name="build-webstart-pedigree" depends="build-pedigree">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
|
|
<copyandsign jar="pedigree"/>
|
|
<createdemojnlp name="pedigree" title="Slick2D Pedigree, Whiskas flavoured" mainclass="org.newdawn.slick.tools.peditor.ParticleEditor"/>
|
|
</target>
|
|
|
|
<target name="upload-pedigree" depends="build-webstart-pedigree, dist-pedigree">
|
|
<copy todir="${dir}/downloads" file="dist/pedigree.zip"/>
|
|
<copy todir="${demos}" file="webstart/pedigree.jar"/>
|
|
|
|
</target>
|
|
|
|
<!--
|
|
Build hiero distribution
|
|
-->
|
|
<target name="dist-hiero" depends="build-hiero">
|
|
<zip destfile="${dist}/hiero.zip">
|
|
<fileset dir="lib" includes="hiero.jar"/>
|
|
</zip>
|
|
</target>
|
|
|
|
<target name="build-webstart-hiero" depends="build-hiero">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
|
|
<copyandsign jar="hiero"/>
|
|
<createdemojnlp name="hiero" title="Slick2D Hiero Bitmap Font Generator" mainclass="org.newdawn.slick.tools.hiero.Hiero"/>
|
|
</target>
|
|
|
|
<target name="upload-hiero" depends="build-webstart-hiero, dist-hiero">
|
|
<copy todir="${dir}/downloads" file="dist/hiero.zip"/>
|
|
<copy todir="${demos}" file="webstart/hiero.jar"/>
|
|
</target>
|
|
|
|
|
|
<!--
|
|
Build scalar distribution
|
|
-->
|
|
<target name="dist-scalar" depends="build-scalar">
|
|
<zip destfile="${dist}/scalar.zip">
|
|
<fileset dir="lib" includes="scalar.jar"/>
|
|
</zip>
|
|
</target>
|
|
|
|
<target name="build-webstart-scalar" depends="build-scalar">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
|
|
<copyandsign jar="scalar"/>
|
|
<createdemojnlp name="scalar" title="Slick2D Scalar Scale2/3X Tool" mainclass="org.newdawn.slick.tools.scalar.Scalar"/>
|
|
</target>
|
|
|
|
<target name="upload-scalar" depends="build-webstart-scalar, dist-scalar">
|
|
<copy todir="${dir}/downloads" file="dist/scalar.zip"/>
|
|
<copy todir="${demos}" file="webstart/scalar.jar"/>
|
|
</target>
|
|
|
|
<!--
|
|
Build packer distribution
|
|
-->
|
|
<target name="dist-packer" depends="build-packer">
|
|
<zip destfile="${dist}/packulike.zip">
|
|
<fileset dir="lib" includes="packulike.jar"/>
|
|
</zip>
|
|
</target>
|
|
|
|
<target name="build-webstart-packer" depends="build-packer">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
|
|
<copyandsign jar="packulike"/>
|
|
<createdemojnlp name="packer" title="Slick2D Sprite Packer" mainclass="org.newdawn.slick.tools.packulike.Packer"/>
|
|
</target>
|
|
|
|
<target name="upload-packer" depends="build-webstart-packer, dist-packer">
|
|
<copy todir="${dir}/downloads" file="dist/packulike.zip"/>
|
|
<copy todir="${demos}" file="webstart/packulike.jar"/>
|
|
</target>
|
|
<!--
|
|
Create a keystore to use when signing your own games
|
|
-->
|
|
<target name="build-key-store">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
<input message="KeyStore Name, your name:" addproperty="keystore.name"/>
|
|
<input message="KeyStore Company, your development group or company:" addproperty="keystore.company"/>
|
|
|
|
<genkey keystore="${keystore.alias}.ks" alias="${keystore.alias}" storepass="${keystore.password}" >
|
|
<dname>
|
|
<param name="CN" value="${keystore.name}"/>
|
|
<param name="OU" value="${keystore.company}"/>
|
|
<param name="O" value=""/>
|
|
<param name="C" value=""/>
|
|
</dname>
|
|
</genkey>
|
|
</target>
|
|
|
|
<!--
|
|
Package and sign the libraries require for a webstart distribution of Slick
|
|
-->
|
|
<target name="build-webstart-libs" depends="build-slick, build-examples">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
|
|
<copyandsign jar="ibxm"/>
|
|
<copyandsign jar="lwjgl"/>
|
|
<copyandsign jar="jogg-0.0.7"/>
|
|
<copyandsign jar="jinput"/>
|
|
<copyandsign jar="jorbis-0.0.15"/>
|
|
<copyandsignres jar="natives-linux"/>
|
|
<copyandsignres jar="natives-win32"/>
|
|
<copyandsignres jar="natives-mac"/>
|
|
<copyandsign jar="slick"/>
|
|
<!-- copyandsign jar="lwjgl_util_applet"/ -->
|
|
<copy file="webstart/slick.jar" toFile="webstart/slick-b${version.build}.jar"/>
|
|
<copyandsign jar="slick-examples"/>
|
|
</target>
|
|
|
|
<!--
|
|
Sign a single jar - useful for your game specific jars
|
|
-->
|
|
<target name="sign-a-jar">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
<input message="Jar Location" addproperty="jar"/>
|
|
|
|
<signjar jar="${jar}" keystore="${keystore.alias}.ks" storepass="${keystore.password}" alias="${keystore.alias}"/>
|
|
</target>
|
|
|
|
<!--
|
|
Generate and package the JNLP and HTML files for the Slick webstart demos
|
|
-->
|
|
<target name="build-test-webstarts" depends="build-webstart-libs">
|
|
<input message="KeyStore Alias, a username:" addproperty="keystore.alias"/>
|
|
<input message="KeyStore Password, a password:" addproperty="keystore.password"/>
|
|
|
|
<jar destfile="webstart/testdata.jar"
|
|
basedir="." includes="testdata/**"/>
|
|
<copy file="webstart/testdata.jar" toDir="applet"/>
|
|
<signjar jar="webstart/testdata.jar" keystore="${keystore.alias}.ks" storepass="${keystore.password}" alias="${keystore.alias}"/>
|
|
|
|
<echo file="webstart/demos.txt">VERSION|0.4.8|SUBJECT|Webstart Demos|CONTENT|[html]</echo>
|
|
|
|
<createdemojnlp name="imagetest" title="Slick2D Image Test" mainclass="org.newdawn.slick.tests.ImageTest"/>
|
|
<createdemojnlp name="fonttest" title="Slick2D Font Test" mainclass="org.newdawn.slick.tests.FontTest"/>
|
|
<createdemojnlp name="inputtest" title="Slick2D Input Test" mainclass="org.newdawn.slick.tests.InputTest"/>
|
|
<createdemojnlp name="soundtest" title="Slick2D Sound Test" mainclass="org.newdawn.slick.tests.SoundTest"/>
|
|
<createdemojnlp name="animationtest" title="Slick2D Animation Test" mainclass="org.newdawn.slick.tests.AnimationTest"/>
|
|
<createdemojnlp name="graphicstest" title="Slick2D Graphics Test" mainclass="org.newdawn.slick.tests.GraphicsTest"/>
|
|
<createdemojnlp name="geomtest" title="Slick2D Geom Test" mainclass="org.newdawn.slick.tests.GeomTest"/>
|
|
<createdemojnlp name="tilemaptest" title="Slick2D TileMap Test" mainclass="org.newdawn.slick.tests.TileMapTest"/>
|
|
|
|
<createdemojnlp name="particletest" title="Slick2D Particle Test" mainclass="org.newdawn.slick.tests.ParticleTest"/>
|
|
<createdemojnlp name="duplicateemittertest" title="Slick2D Duplicate Emitter Test" mainclass="org.newdawn.slick.tests.DuplicateEmitterTest"/>
|
|
<createdemojnlp name="transformtest" title="Slick2D Transform Test" mainclass="org.newdawn.slick.tests.TransformTest"/>
|
|
<createdemojnlp name="statebasedtest" title="Slick2D StateBasedGame Test" mainclass="org.newdawn.slick.tests.StateBasedTest"/>
|
|
|
|
<createdemojnlp name="guitest" title="Slick2D GUI Test" mainclass="org.newdawn.slick.tests.GUITest"/>
|
|
<createdemojnlp name="packedtest" title="Slick2D Packed Sprite Sheet Test" mainclass="org.newdawn.slick.tests.PackedSheetTest"/>
|
|
|
|
<createdemojnlp name="storedstatetest" title="Slick2D Stored State Test" mainclass="org.newdawn.slick.tests.SavedStateTest"/>
|
|
<createdemojnlp name="pedigreetest" title="Slick2D Pedigree Test" mainclass="org.newdawn.slick.tests.PedigreeTest"/>
|
|
<createdemojnlp name="flashtest" title="Slick2D Flash Test" mainclass="org.newdawn.slick.tests.FlashTest"/>
|
|
<createdemojnlp name="deferredtest" title="Slick2D Deferred Test" mainclass="org.newdawn.slick.tests.DeferredLoadingTest"/>
|
|
|
|
<createdemojnlp name="spritesheetfonttest" title="Slick2D Sprite Sheet Font Test" mainclass="org.newdawn.slick.tests.SpriteSheetFontTest"/>
|
|
<createdemojnlp name="transparentcolortest" title="Slick2D Transparent Color Test" mainclass="org.newdawn.slick.tests.TransparentColorTest"/>
|
|
<createdemojnlp name="polygontest" title="Slick2D Polygon Point Test" mainclass="org.newdawn.slick.tests.PolygonTest"/>
|
|
|
|
<createdemojnlp name="purefonttest" title="Slick2D Pure Font Test" mainclass="org.newdawn.slick.tests.PureFontTest"/>
|
|
<createdemojnlp name="canvastest" title="Slick2D Canvas Container Test" mainclass="org.newdawn.slick.tests.CanvasContainerTest"/>
|
|
<createdemojnlp name="antialiastest" title="Slick2D Anti-Alias Test" mainclass="org.newdawn.slick.tests.AntiAliasTest"/>
|
|
|
|
<createdemojnlp name="offscreen" title="Slick2D Offscreen Rendering Test" mainclass="org.newdawn.slick.tests.ImageGraphicsTest"/>
|
|
<createdemojnlp name="clip" title="Slick2D Clipping Test" mainclass="org.newdawn.slick.tests.ClipTest"/>
|
|
<createdemojnlp name="imagereadtest" title="Slick2D Image Read Test" mainclass="org.newdawn.slick.tests.ImageReadTest"/>
|
|
<createdemojnlp name="bigimagetest" title="Slick2D Big Image Test" mainclass="org.newdawn.slick.tests.BigImageTest"/>
|
|
<createdemojnlp name="slickcallable" title="Slick2D Callables" mainclass="org.newdawn.slick.tests.SlickCallableTest"/>
|
|
<createdemojnlp name="keyrepeat" title="Slick2D Key Repeat" mainclass="org.newdawn.slick.tests.KeyRepeatTest"/>
|
|
<createdemojnlp name="musiclistener" title="Slick2D Music Listener" mainclass="org.newdawn.slick.tests.MusicListenerTest"/>
|
|
<createdemojnlp name="gradient" title="Slick2D Gradients" mainclass="org.newdawn.slick.tests.GradientTest"/>
|
|
<createdemojnlp name="transition" title="Slick2D Transitions" mainclass="org.newdawn.slick.tests.TransitionTest"/>
|
|
|
|
<!-- Examples under here please -->
|
|
<createdemojnlp template="slickexample.jnlp" name="scroller" title="Slick2D TileMap Scroll Example" mainclass="org.newdawn.slick.examples.scroller.Scroller"/>
|
|
|
|
<echo file="webstart/demos.txt" append="true">[/html]|DATE|1162965600</echo>
|
|
</target>
|
|
|
|
<!--
|
|
Upload the distrubtion ZIPs
|
|
-->
|
|
<target name="upload-dist" depends="dist, slick-util">
|
|
<copy todir="${dir}/downloads" file="dist/slick.zip"/>
|
|
<copy todir="${dir}/downloads/util" file="dist/slick-util.zip"/>
|
|
<copy todir="${dir}/downloads" file="lib/slick.jar"/>
|
|
<copy todir="${dir}/downloads/util" file="lib/slick-util.jar"/>
|
|
<copy todir="${dir}/downloads" file="src/version"/>
|
|
</target>
|
|
|
|
<!--
|
|
Upload the test webstarts to the Slick website
|
|
-->
|
|
<target name="upload-test-webstarts" depends="dist">
|
|
<copy todir="${demos}" file="webstart/slick.jar"/>
|
|
<copy todir="${demos}/versions" file="webstart/slick-b${version.build}.jar"/>
|
|
<copy todir="${demos}" file="webstart/slick-examples.jar"/>
|
|
<copy todir="${demos}" file="webstart/testdata.jar"/>
|
|
<copy todir="${demos}">
|
|
<fileset dir="webstart">
|
|
<include name="*.jnlp"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${dir}/content/static" file="webstart/demos.txt"/>
|
|
</target>
|
|
|
|
<!--
|
|
Upload the javadoc
|
|
-->
|
|
<target name="upload-javadoc" depends="dist">
|
|
<copy todir="${dir}/javadoc">
|
|
<fileset dir="javadoc" includes="**/*"/>
|
|
</copy>
|
|
<copy todir="${dir}/javadoc-util">
|
|
<fileset dir="javadoc-util" includes="**/*"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<!--
|
|
Upload everything, i.e. create a complete update to the Slick stuff.
|
|
-->
|
|
<target name="upload-all" depends="deploy-maven, upload-dist, upload-test-webstarts, upload-javadoc, upload-pedigree, upload-hiero, upload-scalar, upload-packer">
|
|
</target>
|
|
|
|
<!--
|
|
A macro to copy and sign a library for webstart distribution
|
|
-->
|
|
<macrodef name="copyandsign">
|
|
<attribute name="jar" default="NOT SET"/>
|
|
<sequential>
|
|
<copy file="lib/@{jar}.jar" toDir="webstart"/>
|
|
<signjar jar="webstart/@{jar}.jar" keystore="${keystore.alias}.ks" storepass="${keystore.password}" alias="${keystore.alias}"/>
|
|
<copy file="lib/@{jar}.jar" toDir="lzma"/>
|
|
<antcall target="compress-sign-class">
|
|
<param name="dir" value="lzma/"/>
|
|
<param name="jarfile" value="@{jar}"/>
|
|
</antcall>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<macrodef name="copyandsignres">
|
|
<attribute name="jar" default="NOT SET"/>
|
|
<sequential>
|
|
<copy file="lib/@{jar}.jar" toDir="webstart"/>
|
|
<signjar jar="webstart/@{jar}.jar" keystore="${keystore.alias}.ks" storepass="${keystore.password}" alias="${keystore.alias}"/>
|
|
<copy file="lib/@{jar}.jar" toDir="lzma"/>
|
|
<signjar jar="lzma/@{jar}.jar" keystore="${keystore.alias}.ks" storepass="${keystore.password}" alias="${keystore.alias}"/>
|
|
<antcall target="compress-resource">
|
|
<param name="input" value="lzma/@{jar}.jar"/>
|
|
<param name="output" value="lzma/@{jar}.jar.lzma"/>
|
|
</antcall>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<!--
|
|
A macro to copy and preprocess the JNLP template for all webstart demos
|
|
-->
|
|
<macrodef name="createdemojnlp">
|
|
<attribute name="name" default="NOT SET"/>
|
|
<attribute name="title" default="NOT SET"/>
|
|
<attribute name="mainclass" default="NOT SET"/>
|
|
<attribute name="template" default="slickdemo.jnlp"/>
|
|
<attribute name="datajar" default="testdata.jar"/>
|
|
<attribute name="projectjar" default=""/>
|
|
<sequential>
|
|
<delete file="webstart/@{name}.jnlp"/>
|
|
<copy file="scripts/@{template}" toFile="webstart/@{name}.jnlp">
|
|
<filterchain>
|
|
<replacetokens>
|
|
<token key="title" value="@{title}"/>
|
|
<token key="mainclass" value="@{mainclass}"/>
|
|
<token key="jnlpname" value="@{name}.jnlp"/>
|
|
<token key="homepage" value="http://slick.cokeandcode.com"/>
|
|
<token key="datajar" value="@{datajar}"/>
|
|
<token key="projectjar" value="@{projectjar}"/>
|
|
<token key="vendor" value="Slick 2D"/>
|
|
<token key="codebase" value="${demoscodebase}"/>
|
|
</replacetokens>
|
|
</filterchain>
|
|
</copy>
|
|
|
|
<echo file="webstart/demos.txt" append="true">
|
|
<a href="http://slick.cokeandcode.com/demos/@{name}.jnlp"> @{title} </a>
|
|
<br/>
|
|
</echo>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="repack200" description="Pack200-repack a jar file">
|
|
<pack200 src="${input}" destfile="${output}" repack="true"/>
|
|
</target>
|
|
|
|
<target name="pack200" description="Pack200 a jar file">
|
|
<pack200 src="${input}" destfile="${output}"/>
|
|
</target>
|
|
|
|
<target name="lzma" description="LZMA compress a file">
|
|
<java fork="true" classname="SevenZip.LzmaAlone">
|
|
<classpath>
|
|
<pathelement location="JLzma.jar"/>
|
|
</classpath>
|
|
<jvmarg value="-Xmx512m"/>
|
|
<arg value="e"/>
|
|
<arg value="${input}"/>
|
|
<arg value="${output}"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="compress-sign-class">
|
|
<antcall target="repack200">
|
|
<param name="input" value="${dir}${jarfile}.jar"/>
|
|
<param name="output" value="${dir}${jarfile}-repack.jar"/>
|
|
</antcall>
|
|
<signjar jar="${dir}${jarfile}-repack.jar" keystore="${keystore.alias}.ks" storepass="${keystore.password}" alias="${keystore.alias}"/>
|
|
<antcall target="pack200">
|
|
<param name="input" value="${dir}${jarfile}-repack.jar"/>
|
|
<param name="output" value="${dir}${jarfile}.jar.pack"/>
|
|
</antcall>
|
|
<antcall target="lzma">
|
|
<param name="input" value="${dir}${jarfile}.jar.pack"/>
|
|
<param name="output" value="${dir}${jarfile}.jar.pack.lzma"/>
|
|
</antcall>
|
|
<delete file="${dir}${jarfile}-repack.jar"/>
|
|
<delete file="${dir}${jarfile}.jar.pack"/>
|
|
<delete file="${dir}${jarfile}.jar"/>
|
|
</target>
|
|
|
|
<target name="compress-resource">
|
|
<antcall target="lzma">
|
|
<param name="input" value="${input}"/>
|
|
<param name="output" value="${output}"/>
|
|
</antcall>
|
|
<delete file="${input}"/>
|
|
</target>
|
|
|
|
</project>
|