<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFrameworks>net8-windows10.0.19041.0</TargetFrameworks>
    <Platforms>x64</Platforms>
    <UseWindowsForms>true</UseWindowsForms>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <AssemblyTitle>VRCX</AssemblyTitle>
    <Product>VRCX</Product>
    <Copyright>vrcx-team, pypy, natsumi</Copyright>
    <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <Title>VRCX</Title>
    <Description>VRCX</Description>
    <PackageIcon>VRCX.png</PackageIcon>
    <RepositoryUrl>https://github.com/vrcx-team/VRCX</RepositoryUrl>
    <ResourceLanguages>en</ResourceLanguages>
    <SatelliteResourceLanguages>en-US;en</SatelliteResourceLanguages>
    <EnableWindowsTargeting>true</EnableWindowsTargeting>
  </PropertyGroup>

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

  <PropertyGroup>
    <ApplicationIcon>VRCX.ico</ApplicationIcon>
  </PropertyGroup>
  
  <PropertyGroup>
    <StartupObject />
    <CefSharpExcludeSubProcessExe>true</CefSharpExcludeSubProcessExe>
  </PropertyGroup>
  <PropertyGroup Condition="'$(PlatformTarget)' == 'x64'">
    <RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-x64</RuntimeIdentifier>
    <SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained>
  </PropertyGroup>
  <PropertyGroup>
    <ApplicationManifest>app.manifest</ApplicationManifest>
  </PropertyGroup>
  <PropertyGroup>
    <ContentSQLiteInteropFiles>true</ContentSQLiteInteropFiles>
    <CopySQLiteInteropFiles>false</CopySQLiteInteropFiles>
    <CleanSQLiteInteropFiles>false</CleanSQLiteInteropFiles>
    <CollectSQLiteInteropFiles>false</CollectSQLiteInteropFiles>
  </PropertyGroup>
  <ItemGroup>
	  <Reference Include="Blake2Sharp">
		  <HintPath>libs\Blake2Sharp.dll</HintPath>
	  </Reference>
	  <Reference Include="librsync.net">
		  <HintPath>libs\librsync.net.dll</HintPath>
	  </Reference>
  </ItemGroup>
  <ItemGroup>
    <None Include="app.manifest" />
    <None Include="Version">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
	  <None Include="libs\openvr_api.dll">
		  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		  <TargetPath>openvr_api.dll</TargetPath>
	  </None>
	  <None Include="libs\sqlite3.dll">
		  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		  <TargetPath>sqlite3.dll</TargetPath>
	  </None>
    <Content Include="VRCX.ico">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="VRCX.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="CefSharp.OffScreen.NETCore" Version="130.1.90" />
    <PackageReference Include="CefSharp.WinForms.NETCore" Version="130.1.90" />
    <PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
    <PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
    <PackageReference Include="NLog" Version="5.3.4" />
    <PackageReference Include="SharpDX.Direct3D11" Version="4.2.0" />
    <PackageReference Include="SharpDX.Mathematics" Version="4.2.0" />
    <PackageReference Include="System.Data.SQLite.Core" Version="1.0.119" />
	<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
	<PackageReference Include="System.Management" Version="8.0.0" />
    <PackageReference Include="System.Net.Http" Version="4.3.4" />
    <PackageReference Include="System.Text.Json" Version="8.0.5" />
    <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
    <PackageReference Include="Websocket.Client" Version="5.1.2" />
  </ItemGroup>

  <Target Name="CefSharpAfterBuildDebug" AfterTargets="AfterBuild">
    <CallTarget Targets="CefSharpAfterBuildDiagnostic" />
  </Target>
  
  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="$(ProjectDir)/build-tools/Topten.nvpatch.exe --enable VRCX.exe" WorkingDirectory="$(OutDir)" />
  </Target>
</Project>