rendered paste body<project name="SpyXT-Bot" default="compile"> <description> NXT Software for SpyXT </description> <!-- set properties for this build --> <property environment = "env"/> <property file="build.properties"/> <property name="src" location="src"/> <property name="program" value="SpyXT"/> <property name="class" value="com.snuxoll.spyxt.Bot" /> <property name="binary" value="${program}.nxj" /> <!-- deletes class files --> <target name="clean" description="clean up all generated files"> <delete> <fileset dir="."> <include name="**/*.class"/> </fileset> </delete> <delete dir="bin" /> <delete dir="com" /> </target> <target name="compile" depends="clean" description="compile the source " > <!-- Compile the java code from ${src} --> <javac srcdir="${src}" destdir="${basedir}"> <bootclasspath> <pathelement location="${nxj.classes.home}/lib/classes.jar"/> </bootclasspath> </javac> </target> <target name="link" depends="compile" description="link the binary " > <!-- Link the binary and create a signature file --> <java classname="js.tinyvm.TinyVM"> <arg value="--classpath"/> <arg path="${nxj.classes.home}/lib/classes.jar:." /> <arg value="--writeorder" /> <arg value="LE" /> <arg value="${class}"/> <arg value="-o"/> <arg value="${binary}"/> <arg value="-v"/> <classpath> <pathelement location="${nxj.jtools.home}/lib/jtools.jar"/> <pathelement location="${nxj.jtools.home}/3rdparty/lib/commons-cli-1.0.jar"/> <pathelement location="${nxj.jtools.home}/3rdparty/lib/bcel-5.1.jar"/> </classpath> </java> </target> <!-- Uploads the binary to the NXT --> <target name="upload" depends="link" description="upload the binary to the NXT"> <java classname="lejos.pc.tools.NXJUpload" fork="true"> <jvmarg value="-Djava.library.path=${nxj.library.path}"/> <arg value="${binary}"/> <classpath> <pathelement location="${nxj.jtools.home}/lib/jtools.jar"/> <pathelement location="${nxj.pctools.home}/lib/pctools.jar"/> <pathelement location="${nxj.pccomm.home}/lib/pccomm.jar"/> <pathelement location="${nxj.jtools.home}/3rdparty/lib/commons-cli-1.0.jar"/> <pathelement location="${nxj.jtools.home}/3rdparty/lib/bcel-5.1.jar"/> <pathelement location="${nxj.pccomm.home}/3rdparty/lib/bluecove.jar"/> <pathelement location="${nxj.pccomm.home}/3rdparty/lib/bluecove-gpl.jar"/> </classpath> </java> </target> <!-- Uploads the binary to the NXT and then runs it --> <target name="uploadandrun" depends="link" description="upload and run the binary " > <java classname="lejos.pc.tools.NXJUpload" fork="true"> <jvmarg value="-Djava.library.path=${nxj.library.path}"/> <arg value="${binary}"/> <arg value="-r"/> <classpath> <pathelement location="${nxj.jtools.home}/lib/jtools.jar"/> <pathelement location="${nxj.pctools.home}/lib/pctools.jar"/> <pathelement location="${nxj.pccomm.home}/lib/pccomm.jar"/> <pathelement location="${nxj.jtools.home}/3rdparty/lib/commons-cli-1.0.jar"/> <pathelement location="${nxj.jtools.home}/3rdparty/lib/bcel-5.1.jar"/> <pathelement location="${nxj.pccomm.home}/3rdparty/lib/bluecove.jar"/> <pathelement location="${nxj.pccomm.home}/3rdparty/lib/bluecove-gpl.jar"/> </classpath> </java> </target> </project>