Files
msproj/build.xml
Woody Folsom 14bc769493 Added connect.bat, made minor changes to kgsGtp.ini. ScratchGo can now easily connect to gokgs.com's server.
It will
look for room whf4cs6999
as whf4human (to avoid creating more accounts)
and will connect to or wait for whf4cs6999.
2012-12-12 19:34:32 -05:00

105 lines
3.3 KiB
XML

<project name="GoGame" default="dist" basedir=".">
<description>Simple Framework for Testing Tree Search and Monte-Carlo Go</description>
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="test" location="test" />
<property name="docs" location="docs" />
<property name="lib" location="lib" />
<path id="build.classpath">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="classpath.test">
<path refid="build.classpath" />
<pathelement location="lib/junit-4.10.jar" />
<pathelement location="${build}" />
</path>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="build.classpath" debug="true"/>
</target>
<target name="compile-test" depends="compile">
<javac srcdir="${test}" destdir="${build}" debug="true">
<classpath refid="classpath.test" />
</javac>
</target>
<target name="copy-resources">
<copy todir="${dist}" file="connect.bat" />
<copy todir="${dist}" file="rrt.bat" />
<copy todir="${dist}" file="data/log4j.xml" />
<copy todir="${dist}" file="data/kgsGtp.ini" />
<copy todir="${dist}" file="data/gogame.cfg" />
<!--copy todir="${dist}/data">
<fileset dir="data" />
</copy-->
<copy todir="${build}/net/woodyfolsom/msproj/gui">
<fileset dir="${src}/net/woodyfolsom/msproj/gui">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy todir="${build}/net/woodyfolsom/msproj/sfx">
<fileset dir="${src}/net/woodyfolsom/msproj/sfx">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="copy-libs">
<copy todir="${dist}/lib">
<fileset dir="lib" />
</copy>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<target name="dist" depends="compile,copy-resources,copy-libs" description="generate the distribution">
<jar jarfile="${dist}/GoGame.jar">
<fileset dir="${build}" excludes="**/*Test.class" />
<manifest>
<attribute name="Main-Class" value="net.woodyfolsom.msproj.StandAloneGame" />
<attribute name="Class-Path" value="lib/kgsGtp.jar lib/log4j-1.2.16.jar lib/antlrworks-1.4.3.jar lib/encog-engine-2.5.0.jar lib/neuroph-2.6.jar"/>
</manifest>
</jar>
</target>
<!-- Creates Javadoc -->
<target name="docs" depends="compile">
<javadoc packagenames="src" sourcepath="${src}" destdir="${docs}">
<!-- Define which files / directory should get included, we include all -->
<fileset dir="${src}">
<include name="**" />
</fileset>
</javadoc>
</target>
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="test" depends="compile-test">
<junit haltonfailure="true">
<classpath refid="classpath.test" />
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${build}" includes="**/*Test.class" />
</batchtest>
</junit>
</target>
</project>