aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/DX8/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/DX8/build.xml')
-rw-r--r--plugins/DX8/build.xml103
1 files changed, 103 insertions, 0 deletions
diff --git a/plugins/DX8/build.xml b/plugins/DX8/build.xml
new file mode 100644
index 0000000..32001e1
--- /dev/null
+++ b/plugins/DX8/build.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+
+<!-- Written to assume that classpath is rooted in the current directory. -->
+<!-- So this should be OK if you make this script in the root of a filesystem. -->
+<!-- If not, you may prefer to adjust the basedir, or move some directories around. -->
+<!-- The idea is that both Ant and NetBeans have to know what the package root is -->
+<!-- for the classes in your application. -->
+<project name="Direct Input Plugin" basedir="." default="all">
+
+ <!-- Don't worry if you don't know the Ant syntax completely or need help on some tasks! -->
+ <!-- The standard Ant documentation is bundled. See Help | Help Sets | Ant 1.4.1 Manual. -->
+
+ <target name="init">
+ <!-- You can set up any variables you want used throughout the script here. -->
+ <property name="hello" value="world"/>
+ <mkdir dir="classes"/>
+ <mkdir dir="bin"/>
+ <!-- To use e.g. Jikes, uncomment this line. -->
+ <!-- (Or make the same change in Tools | Options | Ant Settings | Properties.) -->
+ <!-- <property name="build.compiler" value="jikes"/> -->
+ <!-- You might like to set up some overridable paths, etc.: -->
+ <!-- <property name="mylib" value="../lib/mylib.jar"/> -->
+ </target>
+
+ <target name="compile" depends="init">
+ <!-- Both srcdir and destdir should be package roots. -->
+ <!-- They could be different of course; in that case NetBeans can also be set -->
+ <!-- up to compile to a different filesystem in the same way; see Compiler Types: -->
+ <javac srcdir="src/java" destdir="classes" debug="true" deprecation="true" source="1.4">
+ <!-- To add something to the classpath: -->
+ <classpath>
+ <pathelement location="lib/controller.jar"/>
+ <pathelement location="lib/jutils.jar"/>
+ </classpath>
+ <!-- To exclude some files: -->
+ <!--
+ <exclude name="com/foo/SomeFile.java"/>
+ <exclude name="com/foo/somepackage/"/>
+ -->
+ </javac>
+ <exec dir="." executable="gcc" os="Windows 2000">
+ <arg line=" -D_STRICT_ANSI -D_JNI_IMPLEMENTATION_"/>
+ <arg line=" -I'${java.home}/../include' -I'${java.home}/../include/win32' -Ic:/dx9/include"/>
+ <arg line=" -o bin/dxinput.dll src/native/input.cpp -Wl,--export-all-symbols"/>
+ <arg line=" -shared -Wl,--kill-at -ldxguid -ldinput -ldinput8"/>
+ </exec>
+ <copy file="bin/dxinput.dll" todir="../../coreAPI/src/tests/controller" />
+ </target>
+
+ <target name="jar" depends="init,compile">
+ <!-- To make a standalone app: -->
+ <!-- 1. Create a myapp.mf manifest somewhere. -->
+ <!-- 2. Put in it: -->
+ <!-- Manifest-Version: 1.0 -->
+ <!-- Main-Class: com.foo.Main -->
+ <!-- 3. Pass to <jar>: manifest="myapp.mf" -->
+ <jar jarfile="bin/dxinput.jar" compress="true" basedir="classes">
+ <exclude name="**/*.java"/>
+ <exclude name="**/*.form"/>
+ <exclude name="dxinput.mf"/>
+ <exclude name="dxinput.jar"/>
+ <exclude name="apidoc"/>
+ </jar>
+ <copy file="bin/dxinput.jar" todir="../../coreAPI/src/tests/controller" />
+ </target>
+
+ <target name="all" depends="compile,jar" description="Build everything.">
+ <echo message="Application built. Hello ${hello}!"/>
+ </target>
+
+ <target name="test" depends="init,all" description="Try running it.">
+ <echo message="Test by running test on the build.xml for input"/>
+ </target>
+
+ <target name="javadoc" depends="init" description="Javadoc for my API.">
+ <mkdir dir="apidocs"/>
+ <javadoc packagenames="net.*"
+ destdir="apidocs"
+ additionalparam="-source 1.4">
+ <sourcepath>
+ <pathelement location="src/java"/>
+ </sourcepath>
+ <classpath>
+ <pathelement location="lib/controller.jar"/>
+ <pathelement location="lib/jutils.jar"/>
+ </classpath>
+ </javadoc>
+ </target>
+
+ <target name="clean" depends="init" description="Clean all build products.">
+ <delete>
+ <fileset dir="classes">
+ <include name="**/*.class"/>
+ </fileset>
+ </delete>
+ <delete file="bin/dxinput.jar" failonerror="no"/>
+ <delete file="bin/dxinput.dll" failonerror="no"/>
+ <delete file="../../coreAPI/src/tests/controller/dxinput.jar" failonerror="no" />
+ <delete file="../../coreAPI/src/test/controller/dxinput.dll" failonerror="no"/>
+ <delete dir="../../docs/input/win32/apidoc" failonerror="no"/>
+ </target>
+
+</project>