Update build.xml
This commit is contained in:
parent
6a49b8b0da
commit
27ac7c1859
1 changed files with 32 additions and 24 deletions
56
build.xml
56
build.xml
|
@ -1,31 +1,39 @@
|
|||
<project default="run">
|
||||
<project name="lwjgl-examples">
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="bin"/>
|
||||
<delete dir="exe"/>
|
||||
</target>
|
||||
<property file="build.properties" />
|
||||
<property name="src.dir" value="src" />
|
||||
<property name="build.dir" value="bin"/>
|
||||
<property name="lwjgl_jars.dir" value="./libs/"/>
|
||||
<property name="lwjgl_natives.dir" value="./libs/"/>
|
||||
<property name="build.sysclasspath" value="last"/>
|
||||
|
||||
<path id="my_cp">
|
||||
<fileset dir="${lwjgl_jars.dir}" includes="lwjgl.jar"/>
|
||||
<fileset dir="${lwjgl_jars.dir}" includes="lwjgl_util.jar"/>
|
||||
</path>
|
||||
|
||||
<target name="compile" depends="clean">
|
||||
<mkdir dir="bin"/>
|
||||
<javac srcdir="src" destdir="bin"/>
|
||||
</target>
|
||||
<target name="compile">
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="my_cp"/>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="compile">
|
||||
</target>
|
||||
<target name="clean">
|
||||
<delete dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile">
|
||||
<mkdir dir="exe"/>
|
||||
<jar destfile="exe/HelloWorld.jar" basedir="bin">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="org.sdf.HelloWorld"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="run" depends="jar">
|
||||
<java jar="exe/HelloWorld.jar" fork="true"/>
|
||||
</target>
|
||||
<target name="test" depends="compile">
|
||||
<!--
|
||||
fork="true" seems to be absolutely
|
||||
necessary for the setting of java.library.path
|
||||
to be effective. -->
|
||||
|
||||
<java fork="true" classname="Simple">
|
||||
<classpath>
|
||||
<path refid="my_cp"/>
|
||||
<path location="${build.dir}"/>
|
||||
</classpath>
|
||||
<sysproperty key="java.library.path"
|
||||
value="${lwjgl_natives.dir}"/>
|
||||
</java>
|
||||
</target>
|
||||
</project>
|
||||
|
|
Reference in a new issue