<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  </PropertyGroup>
  <PropertyGroup>
    <DefineConstants Condition="'$(RuntimeIdentifier)' == 'win-x64'">$(DefineConstants);Windows</DefineConstants>
    <DefineConstants Condition="'$(RuntimeIdentifier)' == 'osx-x64'">$(DefineConstants);MacOS</DefineConstants>
    <DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-x64'">$(DefineConstants);Linux</DefineConstants>
  </PropertyGroup>
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <Authors>dan0v</Authors>
    <Description>A sleek soundboard</Description>
    <Nullable>enable</Nullable>
    <AssemblyName>amplitude_soundboard</AssemblyName>
    <RootNamespace>Amplitude</RootNamespace>
    <NeutralLanguage>en</NeutralLanguage>
    <Platforms>AnyCPU;x64</Platforms>
    <Version>2.10.2</Version>
    <CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
    <PublishTrimmed>true</PublishTrimmed>
    <TrimMode>partial</TrimMode>
    <Copyright>Copyright (C) 2021-2024 dan0v</Copyright>
    <PackageIcon>Icon.png</PackageIcon>
    <PackageIconUrl />
    <ApplicationIcon>Icon.ico</ApplicationIcon>
    <PackageProjectUrl>https://amplitude-soundboard.dan0v.com/</PackageProjectUrl>
    <RepositoryUrl>https://git.dan0v.com/AmplitudeSoundboard</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <LangVersion>preview</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <AvaloniaResource Include="Assets\**" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Avalonia" Version="11.1.3" />
    <PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
    <PackageReference Include="Avalonia.ReactiveUI" Version="11.1.3" />
    <PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
    <PackageReference Include="Avalonia.Controls.ColorPicker" Version="11.1.3"/>
    <PackageReference Include="ManagedBass" Version="3.1.1" />
    <PackageReference Include="ManagedBass.Flac" Version="3.1.1" />
    <PackageReference Include="ManagedBass.Mix" Version="3.1.1" />
    <PackageReference Include="ManagedBass.Opus" Version="3.1.1" />
    <PackageReference Include="SharpHook" Version="5.3.7" />
    <PackageReference Include="System.Net.Http" Version="4.3.4" />
    <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
  </ItemGroup>
  <ItemGroup>
    <Compile Update="Localization\Language.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Language.resx</DependentUpon>
    </Compile>
    <Compile Update="Views\EditOutputProfile.axaml.cs">
      <DependentUpon>EditOutputProfile.axaml</DependentUpon>
    </Compile>
    <Compile Update="Views\UpdatePrompt.axaml.cs">
      <DependentUpon>UpdatePrompt.axaml</DependentUpon>
    </Compile>
    <Compile Update="Views\About.axaml.cs">
      <DependentUpon>About.axaml</DependentUpon>
    </Compile>
    <Compile Update="Views\GlobalSettings.axaml.cs">
      <DependentUpon>GlobalSettings.axaml</DependentUpon>
    </Compile>
    <Compile Update="Views\ErrorList.axaml.cs">
      <DependentUpon>ErrorList.axaml</DependentUpon>
    </Compile>
    <Compile Update="Views\SoundClipList.axaml.cs">
      <DependentUpon>SoundClipList.axaml</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Update="Localization\Language.hu.resx">
      <LastGenOutput>Language.Designer.cs</LastGenOutput>
      <Generator>ResXFileCodeGenerator</Generator>
    </EmbeddedResource>
    <EmbeddedResource Update="Localization\Language.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Language.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Assets\Styles\" />
    <Folder Include="Properties\" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Branding\Icon.png">
      <Pack>True</Pack>
      <PackagePath></PackagePath>
    </None>
  </ItemGroup>
  <ItemGroup>
    <Content Include="NOTICE.txt">
      <Link>Assets\Doc\NOTICE.txt</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="LICENSE.txt">
      <Link>Assets\Doc\LICENSE.txt</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
  </ItemGroup>
  <!--Windows-->
  <ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-x64'">
    <Content Include="$(ProjectDir)Libraries\BASS\Windows\bass.dll">
      <Link>bass.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Windows\bass_aac.dll">
      <Link>bass_aac.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Windows\bassalac.dll">
      <Link>bassalac.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Windows\bassflac.dll">
      <Link>bassflac.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Windows\bassmix.dll">
      <Link>bassmix.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Windows\bassopus.dll">
      <Link>bassopus.dll</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
  </ItemGroup>
  <!--MacOS-->
  <ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64'">
    <Content Include="$(ProjectDir)Libraries\BASS\MacOS\libbass.dylib">
      <Link>libbass.dylib</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\MacOS\libbassflac.dylib">
      <Link>libbassflac.dylib</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\MacOS\libbassmix.dylib">
      <Link>libbassmix.dylib</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\MacOS\libbassopus.dylib">
      <Link>libbassopus.dylib</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
  </ItemGroup>
  <!--Linux-->
  <ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64'">
    <Content Include="$(ProjectDir)Libraries\BASS\Linux\libbass.so">
      <Link>libbass.so</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Linux\libbass_aac.so">
      <Link>libbass_aac.so</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Linux\libbassalac.so">
      <Link>libbassalac.so</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Linux\libbassflac.so">
      <Link>libbassflac.so</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Linux\libbassmix.so">
      <Link>libbassmix.so</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
    <Content Include="$(ProjectDir)Libraries\BASS\Linux\libbassopus.so">
      <Link>libbassopus.so</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <CopyToPublishDirectory>Always</CopyToPublishDirectory>
    </Content>
  </ItemGroup>
  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
      <Output TaskParameter="Assemblies" ItemName="Targets" />
    </GetAssemblyIdentity>
    <ItemGroup>
      <VersionNumber Include="$([System.Text.RegularExpressions.Regex]::Replace(&quot;%(Targets.Version)&quot;, &quot;^(.+?)(\.0+)$&quot;, &quot;$1&quot;))" />
    </ItemGroup>
    <Exec Command="echo @(VersionNumber) &gt; $(ProjectDir)Publish/version.txt" />
  </Target>

</Project>