<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
    <TrimMode>copyused</TrimMode>
    <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
    <Platforms>x64;x86;ARM;ARM64;AnyCPU</Platforms>
    <Configurations>Debug;Windows;Linux;MacOS;Android;iOS</Configurations>
    <WarningLevel>3</WarningLevel>
    <NoWarn>1701;1702;2026;IL2026</NoWarn>
    <ApplicationIcon>icon.ico</ApplicationIcon>
  </PropertyGroup>
  <PropertyGroup>
  	
	<TrimMode>partial</TrimMode>
	<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
	<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
	
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|x86'">
    <RuntimeIdentifier>win-x86</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <Platforms>x86</Platforms>
    <PlatformTarget>x86</PlatformTarget>
    <DefineConstants>OS_WINDOWS;ARCH_X86</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|x64'">
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <Platforms>x64</Platforms>
    <PlatformTarget>x64</PlatformTarget>
    <DefineConstants>OS_WINDOWS;ARCH_X86_64</DefineConstants>
    <DebugType>portable</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|ARM'">
    <RuntimeIdentifier>win-arm</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>ARM</PlatformTarget>
    <DefineConstants>OS_WINDOWS;ARCH_ARM</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Windows|ARM64'">
    <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>ARM64</PlatformTarget>
    <DefineConstants>OS_WINDOWS;ARCH_ARM64</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>


  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Android|ARM'">
    <RuntimeIdentifier>android-arm</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>ARM</PlatformTarget>
    <DefineConstants>OS_ANDROID;ARCH_ARM</DefineConstants>
    <WarningLevel>3</WarningLevel>
    <NoWarn></NoWarn>
    <DebugType>none</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Android|ARM64'">
    <RuntimeIdentifier>android-arm64</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>ARM64</PlatformTarget>
    <DefineConstants>OS_ANDROID;ARCH_ARM64</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>
  
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <NoWin32Manifest>true</NoWin32Manifest>
    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
    <DebugType>none</DebugType>
    <ProduceReferenceAssembly>False</ProduceReferenceAssembly>
    <AnalysisLevel>none</AnalysisLevel>
    <EnableNETAnalyzers>False</EnableNETAnalyzers>
    <Copyright>Public Domain, 2022</Copyright>
    <PackageProjectUrl>https://islehorse.com</PackageProjectUrl>
    <RepositoryUrl>https://github.com/islehorse/HISP</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <WarningLevel>3</WarningLevel>
    <NoWarn>1701;1702;2026;IL2026</NoWarn>
  </PropertyGroup>
  
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Linux|x64'">
    <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>x64</PlatformTarget>
    <DefineConstants>OS_LINUX;ARCH_X86_64</DefineConstants>
    <DebugType>portable</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Linux|ARM'">
    <RuntimeIdentifier>linux-arm</RuntimeIdentifier>
    <PlatformTarget>ARM</PlatformTarget>
    <Optimize>true</Optimize>
    <DefineConstants>OS_LINUX;ARCH_ARM</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Linux|ARM64'">
    <RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
    <PlatformTarget>ARM64</PlatformTarget>
    <Optimize>true</Optimize>
    <DefineConstants>OS_LINUX;ARCH_ARM64</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Linux|AnyCPU'">
    <Optimize>true</Optimize>
    <DefineConstants>OS_LINUX;ARCH_ANYCPU</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>
  
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MacOS|x64'">
    <RuntimeIdentifier>osx-x64</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>x64</PlatformTarget>
    <DefineConstants>OS_MACOS;ARCH_X86_64</DefineConstants>
    
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MacOS|ARM64'">
    <RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <DefineConstants>OS_MACOS;ARCH_ARM64</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='iOS|ARM'">
    <RuntimeIdentifier>ios-arm</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>ARM</PlatformTarget>
    <DefineConstants>OS_IOS;ARCH_ARM</DefineConstants>
    <DebugType>none</DebugType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='iOS|ARM64'">
    <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
    <Optimize>true</Optimize>
    <PlatformTarget>ARM64</PlatformTarget>
    <DefineConstants>OS_IOS;ARCH_ARM64</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='All|AnyCPU'">
    <RuntimeIdentifiers>win-x86;win-x64;win-arm;win-arm64;linux-x64;linux-arm;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
    <Optimize>True</Optimize>
    <DefineConstants>OS_ALL;ARCH_ANYCPU</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Android|x64'">
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='iOS|x64'">
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <ItemGroup>
    <None Remove=".gitignore" />
    <None Remove="HispLogo.gif" />
  </ItemGroup>
  <ItemGroup>
    <!--This helps with theme dll-s trimming.
	If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa.
	https://github.com/AvaloniaUI/Avalonia/issues/5593 -->
    <TrimmableAssembly Include="Avalonia.Themes.Fluent" />
    <TrimmableAssembly Include="Avalonia.Themes.Default" />
  </ItemGroup>
  <ItemGroup>
    <Compile Update="MpOrSp.axaml.cs">
      <DependentUpon>MpOrSp.axaml</DependentUpon>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\*.swf">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>client\%(Filename)%(Extension)</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>

  <ItemGroup>
    <ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\map750.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>client\map750.png</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>

  <ItemGroup>
    <ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\mod\*.swf">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>client\mod\%(Filename)%(Extension)</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>

  <ItemGroup>
    <ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\tack\*.swf">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>client\tack\%(Filename)%(Extension)</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>


  <ItemGroup>
    <ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\breed\*.swf">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>client\breed\%(Filename)%(Extension)</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>

  <ItemGroup>
    <ContentWithTargetPath Include="..\..\HorseIsleWeb\game-site\resource\*">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>client\resource\%(Filename)%(Extension)</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>

  <ItemGroup>
    <AvaloniaResource Include="HispLogo.gif">
      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
    </AvaloniaResource>
  </ItemGroup>

  <ItemGroup>
    <AvaloniaResource Include="icon.ico" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Avalonia" Version="0.10.19" />
    <PackageReference Include="Avalonia.Desktop" Version="0.10.19" />
    <PackageReference Include="XamlNameReferenceGenerator" Version="1.6.1" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\LibHISP\LibHISP.csproj" />
  </ItemGroup>

  <ItemGroup>
    <ContentWithTargetPath Include="flashplayer/LINUX/flash.elf">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>flashplayer/LINUX/flash.elf</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>
  
  <ItemGroup>
    <ContentWithTargetPath Include="flashplayer\WINDOWS\flash.exe">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>flashplayer\WINDOWS\flash.exe</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>

  <ItemGroup>
    <ContentWithTargetPath Include="flashplayer\MACOS\**">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <TargetPath>flashplayer\MACOS\%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
    </ContentWithTargetPath>
  </ItemGroup>


</Project>