<project name="LTOOLSGui" default="LTOOLSGui" basedir=".">

  <property name="src" value="." />
  <property name="build" value="build" />
  <property name="doku" value="javadoc" />
  <property name="lib" value="lib" />
  <property name="version" value="6.0" />
  <property name="bin" value="../../bin" />
  <property name="bin.unx" value="../../bin.unx" />

  <!-- TARGET: prepare -->
  <target name="prepare">
    <mkdir dir="${build}" />
    <mkdir dir="${build}/images" />
    <mkdir dir="${lib}" />
    <mkdir dir="${lib}/images" />
    <mkdir dir="${doku}" />
    <mkdir dir="${bin}/images" />
    <mkdir dir="${bin.unx}/images" />
    <mkdir dir="${bin}/temp" />
    <mkdir dir="${bin.unx}/temp" />
    <copy todir="${lib}/images">
      <fileset dir="images" />
    </copy>
    <copy todir="${build}/images">
      <fileset dir="images" />
    </copy>
    <copy todir="${build}">
      <fileset file="../../bin/GetDriveType.exe" />
      <fileset file="../../bin/ldir.exe" />
      <fileset file="runit.bat" />
      <fileset file="ltoolgui.bat" />
      <fileset file="ltoolgui*.htm" />
    </copy>
    <copy todir="${lib}">
      <fileset file="../../bin/GetDriveType.exe" />
      <fileset file="../../bin/ldir.exe" />
      <fileset file="runit.bat" />
      <fileset file="ltoolgui.bat" />
      <fileset file="ltoolgui*.htm" />
    </copy>
  </target>

  <!-- TARGET: compile -->
  <target name="compile" depends="prepare">
    <javac srcdir="${src}" destdir="${build}" />
  </target>

  <!-- TARGET: LTOOLSGui - default -->
  <target name="LTOOLSGui" depends="compile">
    <jar jarfile="${lib}/LTOOLSGui.jar" basedir="${build}" />
    <!-- copy files to bin and bin.unx -->
    <copy todir="${bin}">
      <fileset file="${lib}/LTOOLSGui.jar" />
      <fileset file="runit.bat" />
      <fileset file="ltoolgui.bat" />
      <fileset file="ltoolgui*.htm" />
    </copy>
    <copy todir="${bin}/images">
      <fileset dir="images" />
    </copy>
    <copy todir="${bin.unx}">
      <fileset file="${lib}/LTOOLSGui.jar" />
      <fileset file="ltoolgui.sh" />
      <fileset file="ltoolgui*.htm" />
    </copy>
    <copy todir="${bin.unx}/images">
      <fileset dir="images" />
    </copy>
  </target>
  
  <!-- TARGET: clean -->
  <target name="clean">
    <delete dir="${build}" />
    <delete dir="${doku}" />
    <delete dir="${lib}" />
  </target>

  <!-- TARGET: javadoc -->
  <target name="javadoc">
    <javadoc sourcepath="${src}" destdir="${doku}" 
    sourcefiles="AddDriveDialog.java,ContextMenuTable.java,ContextMenuTree.java,DirectoryMutableTreeNode.java,DirFilePane.java,DOSFileFilter.java,DriveType.java,FilePatternDialog.java,HelpBox.java,ListItemFile.java,ltoolapplet.java,LToolGuiTableCellRenderer.java,LToolGuiTableColumnData.java,LToolGuiTableHeaderMouseListener.java,LToolGuiTableIconData.java,LToolGuiTableKeyListener.java,LToolGuiTableModel.java,LToolGuiTableMouseListener.java,LToolGuiTableMouseMotionListener.java,LToolGuiTreeIconCellRenderer.java,LToolGuiTreeIconData.java,LToolGuiTreeMouseListener.java,LToolGuiTreeSelectionListener.java,LToolGuiTreeWillExpandListener.java,LTOOLSGui.java,ModifyDosDialog.java,ModifyLinuxDialog.java,PartitionsFrame.java,RemoteBoxDialog.java"
    Private="true" windowtitle="LTOOLSGui API">
    </javadoc>
  </target>

</project>