<?xml version="1.0" ?>
<project name="OpenSim.Data.MySQL" default="build">
    <target name="build">
        <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
        <mkdir dir="${project::get-base-directory()}/${build.dir}" />
        <copy todir="${project::get-base-directory()}/${build.dir}" flatten="true">
            <fileset basedir="${project::get-base-directory()}">
            </fileset>
        </copy>
        <copy todir="${project::get-base-directory()}/${build.dir}">
            <fileset basedir=".">
            </fileset>
        </copy>
        <csc target="library" debug="${build.debug}" unsafe="False" warnaserror="False" define="TRACE;DEBUG" main="" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
            <resources prefix="OpenSim.Data.MySQL" dynamicprefix="true" >
                <include name="Resources/001_AssetStore.sql" />
                <include name="Resources/001_GridStore.sql" />
                <include name="Resources/001_InventoryStore.sql" />
                <include name="Resources/001_LogStore.sql" />
                <include name="Resources/001_RegionStore.sql" />
                <include name="Resources/001_UserStore.sql" />
                <include name="Resources/002_AssetStore.sql" />
                <include name="Resources/002_InventoryStore.sql" />
                <include name="Resources/002_RegionStore.sql" />
                <include name="Resources/002_UserStore.sql" />
                <include name="Resources/003_AssetStore.sql" />
                <include name="Resources/003_RegionStore.sql" />
                <include name="Resources/003_UserStore.sql" />
                <include name="Resources/004_AssetStore.sql" />
                <include name="Resources/004_RegionStore.sql" />
                <include name="Resources/004_UserStore.sql" />
                <include name="Resources/005_AssetStore.sql" />
                <include name="Resources/005_RegionStore.sql" />
                <include name="Resources/005_UserStore.sql" />
                <include name="Resources/006_RegionStore.sql" />
                <include name="Resources/006_UserStore.sql" />
                <include name="Resources/007_RegionStore.sql" />
                <include name="Resources/007_UserStore.sql" />
                <include name="Resources/008_RegionStore.sql" />
                <include name="Resources/009_RegionStore.sql" />
                <include name="Resources/010_RegionStore.sql" />
                <include name="Resources/011_RegionStore.sql" />
                <include name="Resources/012_RegionStore.sql" />
                <include name="Resources/013_RegionStore.sql" />
                <include name="Resources/014_RegionStore.sql" />
                <include name="Resources/015_RegionStore.sql" />
                <include name="Resources/016_RegionStore.sql" />
                <include name="Resources/017_RegionStore.sql" />
                <include name="Resources/018_RegionStore.sql" />
                <include name="Resources/019_RegionStore.sql" />
                <include name="Resources/020_RegionStore.sql" />
                <include name="Resources/CreateAgentsTable.sql" />
                <include name="Resources/CreateAssetsTable.sql" />
                <include name="Resources/CreateAvatarAppearance.sql" />
                <include name="Resources/CreateFoldersTable.sql" />
                <include name="Resources/CreateItemsTable.sql" />
                <include name="Resources/CreateLandTable.sql" />
                <include name="Resources/CreateLogsTable.sql" />
                <include name="Resources/CreateRegionsTable.sql" />
                <include name="Resources/CreateUserFriendsTable.sql" />
                <include name="Resources/CreateUsersTable.sql" />
                <include name="Resources/UpgradeFoldersTableToVersion2.sql" />
                <include name="Resources/UpgradeItemsTableToVersion2.sql" />
                <include name="Resources/UpgradeItemsTableToVersion3.sql" />
                <include name="Resources/UpgradeLandTableToVersion2.sql" />
                <include name="Resources/UpgradeRegionsTableToVersion2.sql" />
                <include name="Resources/UpgradeRegionsTableToVersion3.sql" />
                <include name="Resources/UpgradeUsersTableToVersion2.sql" />
                <include name="Resources/OpenSim.Data.MySQL.addin.xml" />
            </resources>
            <sources failonempty="true">
                <include name="MySQLAssetData.cs" />
                <include name="MySQLEstateData.cs" />
                <include name="MySQLGridData.cs" />
                <include name="MySQLInventoryData.cs" />
                <include name="MySQLLogData.cs" />
                <include name="MySQLManager.cs" />
                <include name="MySQLRegionData.cs" />
                <include name="MySQLSuperManager.cs" />
                <include name="MySQLUserData.cs" />
                <include name="Properties/AssemblyInfo.cs" />
            </sources>
            <references basedir="${project::get-base-directory()}">
                <lib>
                    <include name="${project::get-base-directory()}" />
                    <include name="${project::get-base-directory()}/${build.dir}" />
                </lib>
                <include name="../../../bin/log4net.dll" />
                <include name="../../../bin/Mono.Addins.dll" />
                <include name="../../../bin/MySql.Data.dll" />
                <include name="../../../bin/OpenMetaverse.dll" />
                <include name="../../../bin/OpenMetaverseTypes.dll" />
                <include name="../../../bin/OpenSim.Data.dll" />
                <include name="../../../bin/OpenSim.Data.Base.dll" />
                <include name="../../../bin/OpenSim.Data.MapperFactory.dll" />
                <include name="../../../bin/OpenSim.Data.MySQLMapper.dll" />
                <include name="../../../bin/OpenSim.Framework.dll" />
                <include name="../../../bin/OpenSim.Framework.Console.dll" />
                <include name="../../../bin/OpenSim.Region.Environment.dll" />
                <include name="System.dll" />
                <include name="System.Data.dll" />
                <include name="System.Drawing.dll" />
                <include name="System.Xml.dll" />
            </references>
        </csc>
        <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
        <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
        <copy todir="${project::get-base-directory()}/../../../bin/">
            <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
                <include name="*.dll"/>
                <include name="*.exe"/>
                <include name="*.mdb" if='${build.debug}'/>
            </fileset>
        </copy>
    </target>
    <target name="clean">
        <delete dir="${obj.dir}" failonerror="false" />
        <delete dir="${bin.dir}" failonerror="false" />
    </target>
    <target name="doc" description="Creates documentation.">
    </target>
</project>
