aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml571
1 files changed, 270 insertions, 301 deletions
diff --git a/build.xml b/build.xml
index 8a2ee22..3f7c34b 100644
--- a/build.xml
+++ b/build.xml
@@ -1,314 +1,283 @@
<!-- Buildfile -->
<project name="jake2" default="usage" basedir=".">
- <taskdef name="proguard" classname="proguard.ant.ProGuardTask">
- <classpath>
- <pathelement location="lib/proguard/proguard.jar"/>
- </classpath>
- </taskdef>
-
+ <taskdef name="proguard" classname="proguard.ant.ProGuardTask">
+ <classpath>
+ <pathelement location="lib/proguard/proguard.jar"/>
+ </classpath>
+ </taskdef>
+
- <taskdef name="izpack" classpath="lib/izpack/standalone-compiler.jar"
+ <taskdef name="izpack" classpath="lib/izpack/standalone-compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask"/>
- <!-- properties -->
- <property name="version" value="cvs"/>
- <property name="src" location="src"/>
- <property name="test" location="test"/>
- <property name="build" location="build"/>
- <property name="dist" location="dist"/>
+ <!-- properties -->
+ <property name="version" value="cvs"/>
+ <property name="src" location="src"/>
+ <property name="test" location="test"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="dist"/>
- <!-- different classpaths -->
- <path id="build.class.path">
- <pathelement location="lib/jogl/jogl.jar"/>
- <pathelement location="lib/jsr231/jogl.jar"/>
- <pathelement location="lib/jsr231/gluegen-rt.jar"/>
- <pathelement location="lib/joal/joal.jar"/>
- <pathelement location="lib/lwjgl/lwjgl.jar"/>
- <pathelement location="lib/lwjgl/lwjgl_util.jar"/>
- <pathelement location="${java.home}/lib/plugin.jar"/>
- </path>
-
- <!-- usage -->
- <target name="usage">
- <echo message="command line arguments for build.sh or build.bat"/>
- <echo message=""/>
- <echo message="installer build installer"/>
- <echo message="bindist build .tar.gz and .zip binary distribution"/>
- <echo message="srcdist build only source distribution"/>
- <echo message="all build everything"/>
- <echo message="clean delete classfiles keep distribution files"/>
- <echo message="distclean delete all generated files"/>
- <echo message="jar build only dist/lib/jake2.jar"/>
- <echo message=""/>
- </target>
+ <!-- different classpaths -->
+ <path id="build.class.path">
+ <pathelement location="lib/jogl/gluegen-rt.jar"/>
+ <pathelement location="lib/jogl/jogl-all.jar"/>
+ <pathelement location="lib/joal/joal.jar"/>
+ <pathelement location="lib/lwjgl/lwjgl.jar"/>
+ <pathelement location="lib/lwjgl/lwjgl_util.jar"/>
+ <pathelement location="${java.home}/lib/plugin.jar"/>
+ </path>
+
+ <!-- usage -->
+ <target name="usage">
+ <echo message="command line arguments for build.sh or build.bat"/>
+ <echo message=""/>
+ <echo message="installer build installer"/>
+ <echo message="bindist build .tar.gz and .zip binary distribution"/>
+ <echo message="srcdist build only source distribution"/>
+ <echo message="all build everything"/>
+ <echo message="clean delete classfiles keep distribution files"/>
+ <echo message="distclean delete all generated files"/>
+ <echo message="jar build only dist/lib/jake2.jar"/>
+ <echo message=""/>
+ </target>
- <!-- initialize directories -->
- <target name="init">
- <mkdir dir="${build}"/>
- <mkdir dir="${dist}/lib"/>
- </target>
+ <!-- initialize directories -->
+ <target name="init">
+ <mkdir dir="${build}"/>
+ <mkdir dir="${dist}/lib"/>
+ </target>
- <!-- compile -->
- <target name="compile" depends="init">
- <javac destdir="${build}" optimize="off" debug="on" source="1.4">
- <src path="${src}"/>
- <include name="jake2/**"/>
- <classpath refid="build.class.path"/>
- </javac>
- </target>
-
- <!-- copy resources -->
- <target name="copyres" depends="init">
- <copy todir="${build}">
- <fileset dir="resources">
- <include name="**/*"/>
- </fileset>
- </copy>
- </target>
-
- <!-- copy files -->
- <target name="copy">
- <copy todir="${dist}/lib">
- <fileset dir="lib/jogl">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="lib/joal">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="lib/lwjgl">
- <include name="*.jar"/>
- </fileset>
- </copy>
- <copy todir="${dist}/lib/linux">
- <fileset dir="lib/jogl/linux">
- <include name="*"/>
- </fileset>
- <fileset dir="lib/joal/linux">
- <include name="*"/>
- </fileset>
- </copy>
- <copy todir="${dist}/lib/linux/lwjgl">
- <fileset dir="lib/lwjgl/linux">
- <include name="*"/>
- </fileset>
- </copy>
- <copy todir="${dist}/lib/windows">
- <fileset dir="lib/jogl/windows">
- <include name="*"/>
- </fileset>
- <fileset dir="lib/joal/windows">
- <include name="*"/>
- </fileset>
- </copy>
- <copy todir="${dist}/lib/windows/lwjgl">
- <fileset dir="lib/lwjgl/windows">
- <include name="*"/>
- </fileset>
- </copy>
- <copy todir="${dist}/lib/osx">
- <fileset dir="lib/jogl/osx">
- <include name="*"/>
- </fileset>
- <fileset dir="lib/joal/osx">
- <include name="*"/>
- </fileset>
- </copy>
- <copy todir="${dist}/lib/osx/lwjgl">
- <fileset dir="lib/lwjgl/osx">
- <include name="*"/>
- </fileset>
- </copy>
- <copy todir="${dist}">
- <fileset dir="scripts">
- <include name="Jake2*"/>
- </fileset>
- <fileset dir=".">
- <include name="ChangeLog"/>
- <include name="LICENSE"/>
- <include name="README"/>
- <include name="readme.id"/>
- </fileset>
- </copy>
- <chmod perm="755">
- <fileset dir="${dist}">
- <include name="*.sh"/>
- </fileset>
- </chmod>
- <fixcrlf srcdir="${dist}"
- eol="crlf"
- includes="*.bat"
- />
- <fixcrlf srcdir="${dist}"
- eol="lf"
- includes="*.sh"
- />
- </target>
-
- <!-- jar -->
- <target name="jar" depends="compile,copyres">
- <jar destfile="${dist}/lib/jake2.jar" basedir="${build}">
- <include name="jake2/**"/>
- <include name="*.png"/>
- <include name="mirrors"/>
- </jar>
- <property name="classes" value="${java.home}/lib/rt.jar"/>
- <property name="plugin" value="${java.home}/lib/plugin.jar"/>
+ <!-- compile -->
+ <target name="compile" depends="init">
+ <javac destdir="${build}" optimize="off" debug="on" source="1.6">
+ <src path="${src}"/>
+ <include name="jake2/**"/>
+ <classpath refid="build.class.path"/>
+ </javac>
+ </target>
+
+ <!-- copy resources -->
+ <target name="copyres" depends="init">
+ <copy todir="${build}">
+ <fileset dir="resources">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- copy files -->
+ <target name="copy">
+ <copy todir="${dist}/lib">
+ <fileset dir="lib/lwjgl">
+ <include name="*.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${dist}/lib/linux/lwjgl">
+ <fileset dir="lib/lwjgl/linux">
+ <include name="*"/>
+ </fileset>
+ </copy>
+ <copy todir="${dist}/lib/windows/lwjgl">
+ <fileset dir="lib/lwjgl/windows">
+ <include name="*"/>
+ </fileset>
+ </copy>
+ <copy todir="${dist}/lib/osx/lwjgl">
+ <fileset dir="lib/lwjgl/osx">
+ <include name="*"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist}">
+ <fileset dir="scripts">
+ <include name="Jake2*"/>
+ </fileset>
+ <fileset dir=".">
+ <include name="ChangeLog"/>
+ <include name="LICENSE"/>
+ <include name="README"/>
+ <include name="readme.id"/>
+ </fileset>
+ </copy>
+ <chmod perm="755">
+ <fileset dir="${dist}">
+ <include name="*.sh"/>
+ </fileset>
+ </chmod>
+ <fixcrlf srcdir="${dist}"
+ eol="crlf"
+ includes="*.bat"
+ />
+ <fixcrlf srcdir="${dist}"
+ eol="lf"
+ includes="*.sh"
+ />
+ </target>
+
+ <!-- jar -->
+ <target name="jar" depends="compile,copyres">
+ <jar destfile="${dist}/lib/jake2.jar" basedir="${build}">
+ <include name="jake2/**"/>
+ <include name="*.png"/>
+ <include name="mirrors"/>
+ </jar>
+ <property name="classes" value="${java.home}/lib/rt.jar"/>
+ <property name="plugin" value="${java.home}/lib/plugin.jar"/>
<condition property="classes" value="${java.home}/../Classes/classes.jar">
<os name="Mac OS X"/>
- </condition>
- <!-- proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar"
- defaultpackage="" overloadaggressively="off" printmapping="jake2.map">
- <injar name="jake2.jar"/>
- <libraryjar name="lib/jogl/jogl.jar"/>
- <libraryjar name="lib/jsr231/jogl.jar"/>
- <libraryjar name="lib/joal/joal.jar"/>
- <libraryjar name="lib/joal/gluegen-rt.jar"/>
- <libraryjar name="${classes}"/>
- <libraryjar name="${plugin}"/>
- <keep access="public" name="jake2.Jake2">
- <method name="main(java.lang.String[])"/>
- </keep>
- </proguard -->
- </target>
-
- <target name="patch" depends="copy">
- <!-- performance patch for lwjgl -->
- <javac destdir="${build}" optimize="off" debug="on" source="1.4">
- <src path="lib/lwjgl/patch"/>
- <include name="org/lwjgl/**"/>
- <classpath refid="build.class.path"/>
- </javac>
- <!-- update original lwjgl.jar -->
- <jar destfile="${dist}/lib/lwjgl.jar" basedir="${build}" update="true">
- <include name="org/lwjgl/**"/>
- </jar>
- </target>
-
- <!-- everything -->
- <target name="all" depends="installer,bindist,srcdist">
- </target>
+ </condition>
+ <!-- proguard printseeds="on" printusage="off" outjar="${dist}/lib/jake2.jar"
+ defaultpackage="" overloadaggressively="off" printmapping="jake2.map">
+ <injar name="jake2.jar"/>
+ <libraryjar name="lib/jogl/jogl-all.jar"/>
+ <libraryjar name="lib/joal/joal.jar"/>
+ <libraryjar name="lib/joal/gluegen-rt.jar"/>
+ <libraryjar name="${classes}"/>
+ <libraryjar name="${plugin}"/>
+ <keep access="public" name="jake2.Jake2">
+ <method name="main(java.lang.String[])"/>
+ </keep>
+ </proguard -->
+ </target>
+
+ <target name="patch" depends="copy">
+ <!-- performance patch for lwjgl -->
+ <javac destdir="${build}" optimize="off" debug="on" source="1.6">
+ <src path="lib/lwjgl/patch"/>
+ <include name="org/lwjgl/**"/>
+ <classpath refid="build.class.path"/>
+ </javac>
+ <!-- update original lwjgl.jar -->
+ <jar destfile="${dist}/lib/lwjgl.jar" basedir="${build}" update="true">
+ <include name="org/lwjgl/**"/>
+ </jar>
+ </target>
+
+ <!-- everything -->
+ <target name="all" depends="installer,bindist,srcdist">
+ </target>
- <!-- dist -->
- <target name="dist" depends="jar,copy,patch">
- </target>
-
- <!-- binary distribution -->
- <target name="bindist" depends="dist">
- <tar destfile="jake2-${version}.tar.gz" compression="gzip">
- <tarfileset dir="${dist}" prefix="Jake2" mode="755">
- <include name="*.sh"/>
- </tarfileset>
- <tarfileset dir="${dist}" prefix="Jake2">
- <include name="**"/>
- <exclude name="*.sh"/>
- </tarfileset>
- </tar>
- <zip destfile="jake2-${version}.zip">
- <zipfileset dir="${dist}" prefix="Jake2">
- <include name="**"/>
- </zipfileset>
- </zip>
- </target>
-
- <!-- source distribution -->
- <target name="srcdist">
- <tar destfile="jake2src-${version}.tar.gz" compression="gzip">
- <tarfileset dir="." prefix="Jake2" mode="755">
- <include name="scripts/*.*"/>
- <include name="build.sh"/>
- </tarfileset>
- <tarfileset dir="." prefix="Jake2">
- <include name="src/jake2/**"/>
- <include name="resources/**"/>
- <include name="lib/**"/>
- <include name="build.xml"/>
- <include name="build.bat"/>
- <include name="ChangeLog"/>
- <include name="LICENSE"/>
- <include name="README*"/>
- <include name="install.xml"/>
- <include name="readme.id"/>
- <include name="Jake2_Eclipse_Setup.txt"/>
- </tarfileset>
- </tar>
- <zip destfile="jake2src-${version}.zip">
- <zipfileset dir="." prefix="Jake2">
- <include name="src/jake2/**"/>
- <include name="resources/**"/>
- <include name="scripts/*.*"/>
- <include name="lib/**"/>
- <include name="build.xml"/>
- <include name="build.sh"/>
- <include name="build.bat"/>
- <include name="ChangeLog"/>
- <include name="LICENSE"/>
- <include name="README*"/>
- <include name="install.xml"/>
- <include name="readme.id"/>
- <include name="Jake2_Eclipse_Setup.txt"/>
- </zipfileset>
- </zip>
- </target>
-
- <!-- standalone installer -->
- <target name="installer" depends="dist">
- <izpack input="${basedir}/install.xml"
- output="${basedir}/Jake2-${version}-install.jar"
- installerType="standard"
- basedir="${dist}"
- izPackDir="${basedir}/lib/izpack"/>
- </target>
-
- <!-- webstart -->
- <target name="webstart" depends="dist">
- <mkdir dir="webstart/lib"/>
- <copy todir="webstart/lib">
- <fileset dir="${dist}/lib">
- <include name="**/*.jar"/>
- <exclude name="jogl.jar"/>
- <exclude name="joal.jar"/>
- <exclude name="gluegen-rt.jar"/>
- </fileset>
- </copy>
+ <!-- dist -->
+ <target name="dist" depends="jar,copy,patch">
+ </target>
+
+ <!-- binary distribution -->
+ <target name="bindist" depends="dist">
+ <tar destfile="jake2-${version}.tar.gz" compression="gzip">
+ <tarfileset dir="${dist}" prefix="Jake2" mode="755">
+ <include name="*.sh"/>
+ </tarfileset>
+ <tarfileset dir="${dist}" prefix="Jake2">
+ <include name="**"/>
+ <exclude name="*.sh"/>
+ </tarfileset>
+ </tar>
+ <zip destfile="jake2-${version}.zip">
+ <zipfileset dir="${dist}" prefix="Jake2">
+ <include name="**"/>
+ </zipfileset>
+ </zip>
+ </target>
+
+ <!-- source distribution -->
+ <target name="srcdist">
+ <tar destfile="jake2src-${version}.tar.gz" compression="gzip">
+ <tarfileset dir="." prefix="Jake2" mode="755">
+ <include name="scripts/*.*"/>
+ <include name="build.sh"/>
+ </tarfileset>
+ <tarfileset dir="." prefix="Jake2">
+ <include name="src/jake2/**"/>
+ <include name="resources/**"/>
+ <include name="lib/**"/>
+ <include name="build.xml"/>
+ <include name="build.bat"/>
+ <include name="ChangeLog"/>
+ <include name="LICENSE"/>
+ <include name="README*"/>
+ <include name="install.xml"/>
+ <include name="readme.id"/>
+ <include name="Jake2_Eclipse_Setup.txt"/>
+ </tarfileset>
+ </tar>
+ <zip destfile="jake2src-${version}.zip">
+ <zipfileset dir="." prefix="Jake2">
+ <include name="src/jake2/**"/>
+ <include name="resources/**"/>
+ <include name="scripts/*.*"/>
+ <include name="lib/**"/>
+ <include name="build.xml"/>
+ <include name="build.sh"/>
+ <include name="build.bat"/>
+ <include name="ChangeLog"/>
+ <include name="LICENSE"/>
+ <include name="README*"/>
+ <include name="install.xml"/>
+ <include name="readme.id"/>
+ <include name="Jake2_Eclipse_Setup.txt"/>
+ </zipfileset>
+ </zip>
+ </target>
+
+ <!-- standalone installer -->
+ <target name="installer" depends="dist">
+ <izpack input="${basedir}/install.xml"
+ output="${basedir}/Jake2-${version}-install.jar"
+ installerType="standard"
+ basedir="${dist}"
+ izPackDir="${basedir}/lib/izpack"/>
+ </target>
+
+ <!-- webstart -->
+ <target name="webstart" depends="dist">
+ <mkdir dir="webstart/lib"/>
+ <copy todir="webstart/lib">
+ <fileset dir="${dist}/lib">
+ <include name="**/*.jar"/>
+ <exclude name="joal.jar"/>
+ <exclude name="gluegen-rt.jar"/>
+ <exclude name="jogl-all.jar"/>
+ </fileset>
+ </copy>
- <mkdir dir="webstart/lib/linux"/>
- <jar destfile="webstart/lib/linux/lwjgl-native.jar" basedir="${dist}/lib/linux/lwjgl">
- <include name="*.so"/>
- </jar>
- <mkdir dir="webstart/lib/osx"/>
- <jar destfile="webstart/lib/osx/lwjgl-native.jar" basedir="${dist}/lib/osx/lwjgl">
- <include name="liblwjgl.jnilib"/>
- <include name="openal.dylib"/>
- </jar>
- <mkdir dir="webstart/lib/windows"/>
- <jar destfile="webstart/lib/windows/lwjgl-native.jar" basedir="${dist}/lib/windows/lwjgl">
- <include name="lwjgl.dll"/>
- <include name="OpenAL32.dll"/>
- </jar>
- <signjar keystore="${user.home}/bytonic" alias="bytonic" storepass="${bytonic.pass}">
- <fileset dir="webstart/lib">
- <include name="**/*.jar"/>
- </fileset>
- </signjar>
- </target>
-
- <!-- clean -->
- <target name="clean">
- <delete dir="${build}"/>
- </target>
-
- <!-- distclean -->
- <target name="distclean" depends="clean">
- <delete dir="${dist}"/>
- <delete dir="webstart/lib"/>
- <delete>
- <fileset dir=".">
- <include name="*.tar.gz"/>
- <include name="*.zip"/>
- <include name="*.map"/>
- <include name="*.jar"/>
- </fileset>
- </delete>
- </target>
-</project> \ No newline at end of file
+ <mkdir dir="webstart/lib/linux"/>
+ <jar destfile="webstart/lib/linux/lwjgl-native.jar" basedir="${dist}/lib/linux/lwjgl">
+ <include name="*.so"/>
+ </jar>
+ <mkdir dir="webstart/lib/osx"/>
+ <jar destfile="webstart/lib/osx/lwjgl-native.jar" basedir="${dist}/lib/osx/lwjgl">
+ <include name="liblwjgl.jnilib"/>
+ <include name="openal.dylib"/>
+ </jar>
+ <mkdir dir="webstart/lib/windows"/>
+ <jar destfile="webstart/lib/windows/lwjgl-native.jar" basedir="${dist}/lib/windows/lwjgl">
+ <include name="lwjgl.dll"/>
+ <include name="OpenAL32.dll"/>
+ </jar>
+ <signjar keystore="${user.home}/bytonic" alias="bytonic" storepass="${bytonic.pass}">
+ <fileset dir="webstart/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </signjar>
+ </target>
+
+ <!-- clean -->
+ <target name="clean">
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- distclean -->
+ <target name="distclean" depends="clean">
+ <delete dir="${dist}"/>
+ <delete dir="webstart/lib"/>
+ <delete>
+ <fileset dir=".">
+ <include name="*.tar.gz"/>
+ <include name="*.zip"/>
+ <include name="*.map"/>
+ <include name="*.jar"/>
+ </fileset>
+ </delete>
+ </target>
+</project>