<?xml version="1.0"?>
<project name="NUnitGuiExe" default="build" basedir=".">

  <patternset id="source-files">
        <include name="AssemblyInfo.cs"/>
        <include name="Class1.cs"/>
  </patternset>

  <target name="build">
    <csc target="winexe" 
        output="${current.build.dir}/nunit.exe" 
        win32icon="App.ico" debug="${build.debug}"
        define="${build.defines}">
      <sources>
        <patternset refid="source-files"/>
        <include name="../../GeneratedAssemblyInfo.cs"/>
      </sources>
      <references basedir="${current.lib.dir}">
        <include name="nunit-gui-runner.dll"/>
        <include name="nunit.core.dll"/>
      </references>
    </csc>

    <copy file="App.config"
      tofile="${current.build.dir}/nunit.exe.config"/>

    <csc target="winexe" 
        output="${current.build.dir}/nunit-x86.exe" 
        win32icon="App.ico" debug="${build.debug}"
        define="${build.defines}" platform="x86" 
        if="${runtime.version >= '2.0'}">
      <sources>
        <patternset refid="source-files"/>
        <include name="../../GeneratedAssemblyInfo.cs"/>
      </sources>
      <references basedir="${current.lib.dir}">
        <include name="nunit-gui-runner.dll"/>
        <include name="nunit.core.dll"/>
      </references>
    </csc>

    <copy file="App.config" if="${runtime.version >='2.0'}"
      tofile="${current.build.dir}/nunit-x86.exe.config"/>
  </target>

  <target name="package">
    <copy todir="${package.src.dir}/GuiRunner/nunit-gui-exe">
      <fileset>
        <patternset refid="source-files"/>
        <include name="nunit-gui.exe.csproj"/>
        <include name="nunit-gui.exe.build"/>
        <include name="App.ico"/>
        <include name="App.config"/>
      </fileset>
    </copy>
  </target>

</project>