<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<OutputType>Exe</OutputType>
		<TargetFramework>net8.0</TargetFramework>
		<Platforms>AnyCPU</Platforms>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<AssemblyName>LentiaLauncher</AssemblyName>
		<ApplicationIcon>./src/resources/icon.ico</ApplicationIcon>
		<PublishTrimmed>true</PublishTrimmed>
	</PropertyGroup>
	<Target Name="PackRenderer" BeforeTargets="BeforeBuild;BeforeRun">
		<PropertyGroup>
			<RendererSrc>$(ProjectDir)wwwroot</RendererSrc>
			<RendererOut>$(OutputPath)root.dat</RendererOut>
			<XorKey>66</XorKey>
		</PropertyGroup>
		<Message Importance="high" Text="[Lentia] Packaging renderer..." />
		<Exec Command="dotnet run --project ../AzuresPackager/AzuresPackager.csproj --action pack --input &quot;$(RendererSrc)&quot; --output &quot;$(RendererOut)&quot; --key $(XorKey)" />
		<Message Importance="high" Text="[Lentia] Renderer packed in : $(RendererOut)" />
	</Target>
	<ItemGroup>
		<Compile Remove="wwwroot\**" />
		<None Update="wwwroot\**">
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
		</None>
	</ItemGroup>
	<ItemGroup>
		<PackageReference Include="AzuresPackager" Version="0.0.2" />
		<PackageReference Include="Photino.NET" Version="4.0.16" />
		<PackageReference Include="System.Management" Version="10.0.2" />
	</ItemGroup>
	<ItemGroup>
		<None Update="src\resources\**">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		</None>
	</ItemGroup>
</Project>
