<?xml version="1.0" encoding="UTF-8"?>

<!-- ==================================================================== -->
<!--  Ant build script for building preparing launch directory in Eclipse -->
<!-- ==================================================================== -->

<project name="robocode" default="build" basedir="..">

    <property name="robocodeextract.dir" location="../robocodeextract"/>
    <property name="launch.dir" location="launch"/>

    <!-- ====================================== -->
    <!-- Target: build                          -->
    <!-- ====================================== -->
    <target name="build">
        <!-- Make launch dir -->
        <mkdir dir="${launch.dir}"/>

        <!-- Copy compiled sample robots -->
        <copy todir="${launch.dir}">
            <fileset dir="${robocodeextract.dir}/bin"/>
        </copy>

        <!-- Copy battle files -->
        <copy todir="${launch.dir}/battles">
            <fileset dir="${robocodeextract.dir}/battles"/>
        </copy>

        <!-- Copy robot templates -->
        <copy todir="${launch.dir}/templates">
            <fileset dir="${robocodeextract.dir}/templates"/>
        </copy>

        <!-- Copy compilers (Jikes compiler) -->
        <copy todir="${launch.dir}/compilers">
            <fileset dir="${robocodeextract.dir}/compilers"/>
        </copy>
    </target>

    <!-- ====================================== -->
    <!-- Target: clean                          -->
    <!-- ====================================== -->
    <target name="clean">
        <!-- Delete launch dir -->
        <delete dir="${launch.dir}"/>
    </target>

</project>