<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
    <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
    <AssemblyName>Jellyfin2Samsung</AssemblyName>
	<PublishSingleFile>true</PublishSingleFile>
	<SelfContained>true</SelfContained>
	<!-- Windows icon -->
    <ApplicationIcon>Assets\jelly2sams.ico</ApplicationIcon>
	<!-- macOS bundle info -->
	<CFBundleName>Jellyfin2Samsung</CFBundleName>
	<CFBundleDisplayName>Jellyfin to Samsung TV</CFBundleDisplayName>
	<CFBundleIdentifier>com.yourcompany.jellyfin2samsung</CFBundleIdentifier>
	<CFBundleVersion>1.0.0</CFBundleVersion>
	<CFBundlePackageType>APPL</CFBundlePackageType>
	<CFBundleSignature>????</CFBundleSignature>
	<CFBundleExecutable>Jellyfin2Samsung</CFBundleExecutable>
	<CFBundleIconFile>jelly2sams.icns</CFBundleIconFile>
	<!-- Linux desktop entry info -->
	<LinuxDesktopFile>true</LinuxDesktopFile>
	<LinuxDesktopFileName>jellyfin2samsung.desktop</LinuxDesktopFileName>
	<PackageId>Jellyfin2Samsung</PackageId>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
	<DefineConstants>DEBUG;TRACE</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)'=='Release'">
	<DefineConstants>TRACE</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <AvaloniaResource Include="Assets\**" />
  </ItemGroup>

  <ItemGroup>
    <None Update="Assets\**\*">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <ItemGroup>
    <AvaloniaXaml Remove="App.axaml" />
  </ItemGroup>

  <ItemGroup>
    <AvaloniaResource Include="App.axaml" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="Assets\jelly2sams.ico" />
  </ItemGroup>

  <ItemGroup>
    <None Include="Assets\jelly2sams.ico">
		<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
	</None>
	<None Include="Assets\jelly2sams.icns" Condition="Exists('Assets\jelly2sams.icns')">
		<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
	</None>
	<None Include="Assets\jelly2sams.png" Condition="Exists('Assets\jelly2sams.png')">
		<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
	</None>
  </ItemGroup>

	<ItemGroup>
    <PackageReference Include="Avalonia" Version="11.3.6" />
    <PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.6" />
    <PackageReference Include="Avalonia.Desktop" Version="11.3.6" />
    <PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.6" />
    <PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.6" />
    <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
    <PackageReference Include="Avalonia.Diagnostics" Version="11.3.6">
      <IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
      <PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
    </PackageReference>
    <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
    <PackageReference Include="Fleck" Version="1.2.0" />
    <PackageReference Include="FluentAvaloniaUI" Version="2.4.0" />
    <PackageReference Include="Jint" Version="4.4.2" />
    <PackageReference Include="Microsoft.AspNetCore" Version="2.3.0" />
  <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.3.6" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
    <PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
  <PackageReference Include="System.Formats.Asn1" Version="6.0.1" />
  </ItemGroup>

	<ItemGroup>
	  <Folder Include="Assets\TizenSDB\" />
	</ItemGroup>

	<ItemGroup>
	  <AvaloniaResource Update="Assets\esbuild\linux-x64\esbuild">
	    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
	  </AvaloniaResource>
	  <AvaloniaResource Update="Assets\esbuild\macos-x64\esbuild">
	    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
	  </AvaloniaResource>
	  <AvaloniaResource Update="Assets\esbuild\win-x64\esbuild.exe">
	    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
	  </AvaloniaResource>
	</ItemGroup>
</Project>
