<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <AssemblyName>HexManiacAdvance</AssemblyName>
    <TargetFramework>net6.0-windows</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <UseWPF>true</UseWPF>
    <UseWindowsForms>true</UseWindowsForms>
    <ImplicitUsings>false</ImplicitUsings>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <Nullable>annotations</Nullable>
  <ApplicationIcon>Resources\AppIcon.ico</ApplicationIcon>
  <Platforms>AnyCPU;x86;x64</Platforms>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="$(SolutionDir)src\SharedAssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\MoveRelearnerTesting.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\AddFairyType.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\FastNewGame.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\FairyIcon_Emerald.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\FairyIcon_FR_LG.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\How_To_Use_HMA_Files.txt">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\StevenBugFix.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\AddProfessorPokemonConstantsToRubySapphire.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\type_items.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\ability_type_swaps.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\EditBattleOdds.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\callasmBattleScriptCommand.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Include="Scripts\AllowEvolutionWithoutNationalDex_FireRedLeafGreen.hma">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Crc32.NET" Version="1.2.0" />
    <PackageReference Include="IronPython" Version="3.4.0" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="$(SolutionDir)src\HexManiac.Core\HexManiac.Core.csproj" />
  </ItemGroup>
  <ItemGroup>
    <Resource Include="Resources\AppIcon.ico" />
    <Resource Include="Resources\AppImage.png" />
  </ItemGroup>
  <PropertyGroup>
    <PostBuildEvent>
      if not exist "$(TargetDir)resources" mkdir "$(TargetDir)resources"
      if not exist "$(TargetDir)resources\Scripts" mkdir "$(TargetDir)resources\Scripts"
      copy "$(TargetDir)Models\Code\*.txt" "$(TargetDir)resources"
      del "$(TargetDir)Models\Code\*.txt"
      copy "$(TargetDir)Models\Code\*.hma" "$(TargetDir)resources"
      del "$(TargetDir)Models\Code\*.hma"
      copy "$(TargetDir)Models\Code\*.toml" "$(TargetDir)resources"
      del "$(TargetDir)Models\Code\*.toml"
      copy "$(TargetDir)Scripts\*.*" "$(TargetDir)resources/Scripts"
      copy "$(SolutionDir)src\HexManiac.WPF\Resources\Yogia16.graphics.titlescreen.copyright.tilemap.png" "$(TargetDir)resources"
      copy "$(SolutionDir)src\HexManiac.WPF\Resources\Yogia16-dark.graphics.titlescreen.copyright.tilemap.png" "$(TargetDir)resources"
      del "$(TargetDir)Scripts\*.hma"
      del "$(TargetDir)Scripts\*.png"
      del "$(TargetDir)Scripts\*.txt"
      rmdir "$(TargetDir)Scripts"
      rmdir "$(TargetDir)Models\Code"
      rmdir "$(TargetDir)Models"
      del "$(TargetDir)IronPython.SQLite.dll"
      del "$(TargetDir)Mono.Unix.dll"
      rmdir "$(TargetDir)runtimes" /s /q
    </PostBuildEvent>
  </PropertyGroup>
</Project>
