<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:j2seproject1= "http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3= "http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc= "http://www.netbeans.org/ns/j2se-project/jax-rpc" name= "jMonkeyEngine3" default= "default" basedir= "." >
<description > Builds, tests, and runs the project jME3_ordered.</description>
<import file= "nbproject/build-impl.xml" />
<!-- compiles the *native binary* of the native bullet version (read bullet - native - build.txt for more info) -->
<target name= "build-bullet-natives" description= "uses native build tools to build the bulletjme binary (read bullet-native-build.txt for more info)" depends= "jar" >
<ant antfile= "nbproject/build-bullet-natives.xml" target= "build-bullet-natives" />
</target>
<target name= "run-bullet-native" description= "runs the jMonkeyEngine3 demos using native bullet" >
<copy file= "dist/opt/native-bullet/jME3-bullet-natives.jar" todir= "dist/lib" failonerror= "false" />
<copy file= "dist/opt/native-bullet/jME3-bullet.jar" todir= "dist/lib" failonerror= "false" />
<delete file= "dist/lib/jME3-jbullet.jar" failonerror= "false" />
<exec executable= "java" dir= "dist" >
<arg line= "-jar jMonkeyEngine3.jar" />
</exec>
</target>
<!-- Override compile section to compile in different folders -->
<target depends= "init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if= "have.sources" name= "-do-compile" >
<mkdir dir= "${build.dir}/core" />
<mkdir dir= "${build.dir}/plugins" />
<mkdir dir= "${build.dir}/jogg" />
<mkdir dir= "${build.dir}/blender" />
<mkdir dir= "${build.dir}/desktop" />
<mkdir dir= "${build.dir}/terrain" />
<mkdir dir= "${build.dir}/jbullet" />
<mkdir dir= "${build.dir}/bullet" />
<mkdir dir= "${build.dir}/niftygui" />
<mkdir dir= "${build.dir}/lwjgl" />
<mkdir dir= "${build.dir}/android" />
<mkdir dir= "${build.dir}/test" />
<echo > Compile Core</echo>
<j2seproject3:javac
destdir="${build.dir}/core"
srcdir="${src.core.dir}:${src.core-data.dir}:${src.core-plugins.dir}:${src.tools.dir}:${src.networking.dir}"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/core" >
<fileset dir= "${src.core.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
<fileset dir= "${src.core-data.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
<fileset dir= "${src.core-plugins.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
<fileset dir= "${src.tools.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Plugins (Ogre, XML)</echo>
<j2seproject3:javac
destdir="${build.dir}/plugins"
srcdir="${src.ogre.dir}:${src.xml.dir}"
classpath="${javac.classpath}:${build.dir}/core"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/plugins" >
<fileset dir= "${src.ogre.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
<fileset dir= "${src.xml.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Jogg</echo>
<j2seproject3:javac
destdir="${build.dir}/jogg"
srcdir="${src.jogg.dir}"
classpath="${javac.classpath}:${build.dir}/core"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/jogg" >
<fileset dir= "${src.jogg.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Desktop</echo>
<j2seproject3:javac
destdir="${build.dir}/desktop"
srcdir="${src.desktop.dir}:${src.desktop-fx.dir}"
classpath="${javac.classpath}:${build.dir}/core"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/desktop" >
<fileset dir= "${src.desktop.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
<fileset dir= "${src.desktop-fx.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Blender Loader</echo>
<j2seproject3:javac
destdir="${build.dir}/blender"
srcdir="${src.blender.dir}"
classpath="${javac.classpath}:${build.dir}/core:${build.dir}/plugins:${build.dir}/desktop"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/blender" >
<fileset dir= "${src.blender.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Terrain</echo>
<j2seproject3:javac
destdir="${build.dir}/terrain"
srcdir="${src.terrain.dir}"
classpath="${javac.classpath}:${build.dir}/core:${build.dir}/desktop"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/terrain" >
<fileset dir= "${src.terrain.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile jBullet</echo>
<j2seproject3:javac
destdir="${build.dir}/jbullet"
srcdir="${src.jbullet.dir}:${src.bullet-common.dir}"
classpath="${javac.classpath}:${build.dir}/core:${build.dir}/terrain"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/jbullet" >
<fileset dir= "${src.jbullet.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
<fileset dir= "${src.bullet-common.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Bullet</echo>
<j2seproject3:javac
destdir="${build.dir}/bullet"
srcdir="${src.bullet.dir}:${src.bullet-common.dir}"
classpath="${javac.classpath}:${build.dir}/core:${build.dir}/terrain"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/bullet" >
<fileset dir= "${src.bullet.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
<fileset dir= "${src.bullet-common.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Nifty</echo>
<j2seproject3:javac
destdir="${build.dir}/niftygui"
srcdir="${src.niftygui.dir}"
classpath="${javac.classpath}:${build.dir}/core"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/niftygui" >
<fileset dir= "${src.niftygui.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Lwjgl</echo>
<j2seproject3:javac
destdir="${build.dir}/lwjgl"
srcdir="${src.lwjgl.dir}"
classpath="${javac.classpath}:${build.dir}/core:${build.dir}/desktop"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/lwjgl" >
<fileset dir= "${src.lwjgl.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<echo > Compile Android</echo>
<j2seproject3:javac
destdir="${build.dir}/android"
srcdir="${src.android.dir}"
classpath="${javac.classpath}:${build.dir}/core:${build.dir}/plugins"
gensrcdir="${build.generated.sources.dir}"
excludes="${excludes},**/jme3test/**"
/>
<copy todir= "${build.dir}/android" >
<fileset dir= "${src.android.dir}" excludes= "${build.classes.excludes},${excludes},**/jme3test/**,**/res/**" includes= "${includes}" />
</copy>
<echo > Compile Tests</echo>
<j2seproject3:javac
destdir="${build.dir}/test"
srcdir="${src.test.dir}"
classpath="${javac.classpath}:${build.dir}/core:${build.dir}/plugins:${build.dir}/jogg:${build.dir}/desktop:${build.dir}/blender:${build.dir}/terrain:${build.dir}/jbullet:${build.dir}/niftygui"
gensrcdir="${build.generated.sources.dir}"/>
<copy todir= "${build.dir}/test" >
<fileset dir= "${src.test.dir}" excludes= "${build.classes.excludes},${excludes}" includes= "${includes}" />
</copy>
<copy todir= "${build.classes.dir}" >
<fileset dir= "${build.dir}/test" />
</copy>
</target>
<target name= "-pre-jar" >
<echo > Building Engine JAR files..</echo>
<jar jarfile= "build/jME3-core.jar" basedir= "${build.dir}/core" compress= "true" />
<jar jarfile= "build/jME3-plugins.jar" basedir= "${build.dir}/plugins" compress= "true" />
<jar jarfile= "build/jME3-jogg.jar" basedir= "${build.dir}/jogg" compress= "true" />
<jar jarfile= "build/jME3-desktop.jar" basedir= "${build.dir}/desktop" compress= "true" />
<jar jarfile= "build/jME3-blender.jar" basedir= "${build.dir}/blender" compress= "true" />
<jar jarfile= "build/jME3-terrain.jar" basedir= "${build.dir}/terrain" compress= "true" />
<jar jarfile= "build/jME3-jbullet.jar" basedir= "${build.dir}/jbullet" compress= "true" />
<jar jarfile= "build/jME3-bullet.jar" basedir= "${build.dir}/bullet" compress= "true" />
<jar jarfile= "build/jME3-niftygui.jar" basedir= "${build.dir}/niftygui" compress= "true" />
<jar jarfile= "build/jME3-lwjgl.jar" basedir= "${build.dir}/lwjgl" compress= "true" />
<jar jarfile= "build/jME3-android.jar" basedir= "${build.dir}/android" compress= "true" />
<echo > Building TestData JAR files..</echo>
<jar jarfile= "build/jME3-testdata.jar" basedir= "test-data" compress= "true" />
<!-- this sets properties that would normally later be created in the build - impl.xml -->
<!-- the names here correspont to the run.classpath entries in the project.properties file -->
<property location= "test-data" name= "testdata.dir.resolved" />
<property location= "build/jME3-testdata.jar" name= "testdata.jar.resolved" />
<property location= "lib/android/android.jar" name= "android.jar.resolved" />
<property location= "${build.classes.dir}" name= "build.classes.dir.resolved" />
<property location= "${build.dir}/core" name= "build.core.dir.resolved" />
<property location= "${build.dir}/plugins" name= "build.plugins.dir.resolved" />
<property location= "${build.dir}/jogg" name= "build.jogg.dir.resolved" />
<property location= "${build.dir}/desktop" name= "build.desktop.dir.resolved" />
<property location= "${build.dir}/blender" name= "build.blender.dir.resolved" />
<property location= "${build.dir}/terrain" name= "build.terrain.dir.resolved" />
<property location= "${build.dir}/jbullet" name= "build.jbullet.dir.resolved" />
<property location= "${build.dir}/bullet" name= "build.bullet.dir.resolved" />
<property location= "${build.dir}/niftygui" name= "build.niftygui.dir.resolved" />
<property location= "${build.dir}/lwjgl" name= "build.lwjgl.dir.resolved" />
<property location= "${build.dir}/android" name= "build.android.dir.resolved" />
<pathconvert property= "run.classpath.without.build.classes.dir" >
<path path= "${run.classpath}" />
<map from= "${build.classes.dir.resolved}" to= "" />
<map from= "${build.core.dir.resolved}" to= "" />
<map from= "${build.plugins.dir.resolved}" to= "" />
<map from= "${build.jogg.dir.resolved}" to= "" />
<map from= "${build.desktop.dir.resolved}" to= "" />
<map from= "${build.blender.dir.resolved}" to= "" />
<map from= "${build.terrain.dir.resolved}" to= "" />
<map from= "${build.jbullet.dir.resolved}" to= "" />
<map from= "${build.bullet.dir.resolved}" to= "" />
<map from= "${build.niftygui.dir.resolved}" to= "" />
<map from= "${build.lwjgl.dir.resolved}" to= "" />
<map from= "${build.android.dir.resolved}" to= "" />
<path path= "build/jME3-core.jar" />
<path path= "build/jME3-plugins.jar" />
<path path= "build/jME3-jogg.jar" />
<path path= "build/jME3-desktop.jar" />
<path path= "build/jME3-blender.jar" />
<path path= "build/jME3-terrain.jar" />
<path path= "build/jME3-jbullet.jar" />
<path path= "build/jME3-bullet.jar" />
<path path= "build/jME3-niftygui.jar" />
<path path= "build/jME3-lwjgl.jar" />
<!-- path path="build/jME3 - android.jar"/ -->
<map from= "${testdata.dir.resolved}" to= "${testdata.jar.resolved}" />
<map from= "${android.jar.resolved}" to= "" />
</pathconvert>
</target>
<target name= "-post-jar" >
<echo > Moving optional packages</echo>
<mkdir dir= "dist/opt" />
<!-- native bullet -->
<mkdir dir= "dist/opt/native-bullet" />
<!-- ant antfile="nbproject/build - bullet - natives.xml" target="bullet - api - diff"/ -->
<!-- move file="bullet - api - diff.html" todir="dist/opt/native - bullet" overwrite="true"/ -->
<move file= "dist/lib/jME3-bullet.jar" todir= "dist/opt/native-bullet" overwrite= "true" />
<move file= "dist/lib/jME3-bullet-natives.jar" todir= "dist/opt/native-bullet" overwrite= "true" />
<copy file= "lib/bullet/jME3-bullet-natives-android.jar" todir= "dist/opt/native-bullet" overwrite= "true" />
<!-- android -->
<mkdir dir= "dist/opt/android" />
<copy file= "build/jME3-android.jar" todir= "dist/opt/android" overwrite= "true" />
</target>
<!--
****************************************************************
Only Relevant for building the SDK from here on
****************************************************************
-->
<!-- convenience target to transfer jme3 libraries to sdk (jMonkeyPlatform) -->
<target name= "update-sdk" depends= "jar, javadoc" >
<antcall target= "-do-update-sdk" inheritall= "true" >
<param name= "jmp_dir" value= "../sdk/" />
</antcall>
</target>
<target name= "-do-update-sdk" >
<fileset id= "jme3-jars" dir= "build" >
<include name= "**/jME3**.jar" />
<exclude name= "**/jME3-testdata.jar" />
<exclude name= "**/jME3-bullet-natives.jar" />
<exclude name= "**/jME3-bullet-natives-android.jar" />
</fileset>
<fileset id= "jme3-sdk-jars" dir= "build" >
<include name= "**/jME3**.jar" />
<exclude name= "**/jME3-android.jar" />
<exclude name= "**/jME3-testdata.jar" />
<exclude name= "**/jME3-bullet.jar" />
<exclude name= "**/jME3-bullet-natives.jar" />
<exclude name= "**/jME3-bullet-natives-android.jar" />
</fileset>
<fileset id= "jme3-bullet-native-jars" dir= "dist/opt/native-bullet" >
<include name= "**/jME3-bullet-native**.jar" />
</fileset>
<fileset id= "jme3-testdata-jars" dir= "build" >
<include name= "**/jME3-testdata.jar" />
</fileset>
<fileset id= "jme3-lwjgl-native-jars" dir= "dist/lib" >
<include name= "**/jME3-lwjgl-natives.jar" />
</fileset>
<fileset id= "jme3-external-libraries" dir= "dist/lib/" >
<exclude name= "jME3-**" />
</fileset>
<!-- clear old files -->
<delete dir= "${jmp_dir}/JME3TestsTemplate/src/" />
<delete dir= "${jmp_dir}/jme3-core-baselibs/release/modules/ext/" />
<delete dir= "${jmp_dir}/jme3-core-libraries/release/modules/ext/" />
<delete dir= "${jmp_dir}/jme3-project-libraries/release/libs/" />
<delete dir= "${jmp_dir}/jme3-project-baselibs/release/libs/" />
<delete dir= "${jmp_dir}/jme3-project-testdata/release/libs/" />
<!-- jMonkeyPlatform jME3 libs -->
<copy toDir= "${jmp_dir}/jme3-core-baselibs/release/modules/ext/" overwrite= "true" failonerror= "true" verbose= "false" flatten= "true" >
<fileset refid= "jme3-sdk-jars" />
<!-- natives need to be in jme3 package for jme to work in jMP -->
<fileset refid= "jme3-lwjgl-native-jars" />
</copy>
<!-- jMonkeyPlatform external libraries -->
<copy todir= "${jmp_dir}/jme3-core-libraries/release/modules/ext/" overwrite= "true" failonerror= "true" verbose= "false" flatten= "true" >
<fileset refid= "jme3-external-libraries" />
</copy>
<!-- Project jME3 libs -->
<copy toDir= "${jmp_dir}/jme3-project-baselibs/release/libs/" overwrite= "true" failonerror= "true" verbose= "false" flatten= "true" >
<fileset refid= "jme3-jars" />
</copy>
<!-- Project external libraries -->
<copy todir= "${jmp_dir}/jme3-project-libraries/release/libs/" overwrite= "true" failonerror= "true" verbose= "false" flatten= "true" >
<fileset refid= "jme3-external-libraries" />
<fileset refid= "jme3-lwjgl-native-jars" />
<fileset refid= "jme3-bullet-native-jars" />
</copy>
<!-- Test Project Data -->
<copy toDir= "${jmp_dir}/jme3-project-testdata/release/libs/" overwrite= "true" failonerror= "true" verbose= "false" >
<fileset refid= "jme3-testdata-jars" />
</copy>
<!-- javadoc -->
<zip destfile= "dist/jMonkeyEngine3-javadoc.zip" >
<zipfileset dir= "dist/javadoc/" />
</zip>
<copy file= "dist/jMonkeyEngine3-javadoc.zip" toDir= "${jmp_dir}/jme3-project-baselibs/release/libs/" overwrite= "true" failonerror= "true" verbose= "false" />
<zip destfile= "dist/jMonkeyEngine3-sources.zip" >
<zipfileset dir= "${src.core.dir}" />
<zipfileset dir= "${src.core-data.dir}" />
<zipfileset dir= "${src.core-plugins.dir}" />
<zipfileset dir= "${src.desktop.dir}" />
<zipfileset dir= "${src.desktop-fx.dir}" />
<zipfileset dir= "${src.jbullet.dir}" />
<zipfileset dir= "${src.niftygui.dir}" />
<zipfileset dir= "${src.jogg.dir}" />
<zipfileset dir= "${src.lwjgl.dir}" />
<zipfileset dir= "${src.ogre.dir}" />
<zipfileset dir= "${src.test.dir}" />
<zipfileset dir= "${src.tools.dir}" />
<zipfileset dir= "${src.xml.dir}" />
<zipfileset dir= "${src.terrain.dir}" />
<zipfileset dir= "${src.networking.dir}" />
</zip>
<copy file= "dist/jMonkeyEngine3-sources.zip" toDir= "${jmp_dir}/jme3-project-baselibs/release/libs/" overwrite= "true" failonerror= "true" verbose= "false" />
<copy todir= "${jmp_dir}/jme3-project-libraries/release/libs/" overwrite= "true" failonerror= "true" verbose= "false" flatten= "true" >
<fileset refid= "jme3-external-libraries" />
<fileset refid= "jme3-lwjgl-native-jars" />
<fileset refid= "jme3-bullet-native-jars" />
<fileset dir= "lib/niftygui/" >
<include name= "nifty-javadoc.jar" />
<include name= "nifty-default-controls-javadoc.jar" />
</fileset>
</copy>
<!-- examples -->
<copy todir= "${jmp_dir}/JME3TestsTemplate/src/" overwrite= "true" failonerror= "true" verbose= "false" >
<fileset dir= "src/test/" >
<exclude name= ".svn" />
</fileset>
</copy>
</target>
<!--
****************************************************************
Only Relevant for building nightly on Hudson server from here on
****************************************************************
-->
<!-- puts jme3 jars, libs, source and javadoc in a dated zip file -->
<target depends= "init" name= "create-zip-distribution" description= "puts jme3 jars, libs, source and javadoc in a dated zip file" >
<!-- create date in the format MM - dd - yyyy -->
<tstamp >
<format property= "date" pattern= "yyyy-MM-dd" locale= "en,US" />
</tstamp>
<property name= "jme3zip" value= "jME3_${date}.zip" />
<!-- make zip file -->
<zip destfile= "${jme3zip}" >
<fileset dir= "." >
<include name= "TestChooser.exe" />
<include name= "README.TXT" />
</fileset>
<fileset dir= "dist/" >
<include name= "jMonkeyEngine3.jar" />
</fileset>
<zipfileset dir= "dist/lib" prefix= "lib" />
<zipfileset dir= "dist/opt" prefix= "opt" />
<zipfileset dir= "dist/javadoc" prefix= "javadoc" />
<zipfileset dir= "${src.core.dir}" prefix= "source" />
<zipfileset dir= "${src.core-data.dir}" prefix= "source" />
<zipfileset dir= "${src.core-plugins.dir}" prefix= "source" />
<zipfileset dir= "${src.desktop.dir}" prefix= "source" />
<zipfileset dir= "${src.desktop-fx.dir}" prefix= "source" />
<zipfileset dir= "${src.jbullet.dir}" prefix= "source" />
<zipfileset dir= "${src.niftygui.dir}" prefix= "source" />
<zipfileset dir= "${src.jogg.dir}" prefix= "source" />
<zipfileset dir= "${src.lwjgl.dir}" prefix= "source" />
<zipfileset dir= "${src.ogre.dir}" prefix= "source" />
<zipfileset dir= "${src.test.dir}" prefix= "source" />
<zipfileset dir= "${src.tools.dir}" prefix= "source" />
<zipfileset dir= "${src.xml.dir}" prefix= "source" />
<zipfileset dir= "${src.terrain.dir}" prefix= "source" />
<zipfileset dir= "${src.networking.dir}" prefix= "source" />
</zip>
</target>
<target depends= "init" name= "update-sdk-nobuild" >
<antcall target= "-do-update-sdk" inheritall= "true" >
<param name= "jmp_dir" value= "../sdk/" />
</antcall>
</target>
<target name= "copy-javadoc" >
<copydir
src="dist/javadoc/" dest="/var/www/org/javadoc/" forceoverwrite="true"
/>
</target>
</project>