<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<OutputType>Exe</OutputType>
		<TargetFramework>net8.0</TargetFramework>
		<Platforms>AnyCPU</Platforms>
		<RootNamespace>Photino_Boilerplate</RootNamespace>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<PublishTrimmed>false</PublishTrimmed>
		<ApplicationIcon>src/resources/build/icon.ico</ApplicationIcon>
		<PublishSingleFile>true</PublishSingleFile>
		<SelfContained>true</SelfContained>
		<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
		<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
	</PropertyGroup>
	<Target Name="PackRenderer" BeforeTargets="DispatchToInnerBuild;BeforeBuild">
		<PropertyGroup>
			<BrikPackagerDll>$([System.IO.Path]::Combine('$(PkgBrikPackager)', 'lib', 'net8.0', 'BrikPackager.dll'))</BrikPackagerDll>
			<InputPath>$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', 'src', 'resources', 'renderer'))</InputPath>
			<OutputPathFile>$([System.IO.Path]::Combine('$(TargetDir)', 'root.dat'))</OutputPathFile>
		</PropertyGroup>
		<Message Importance="high" Text="[] Packaging renderer (Cross-Platform)..." />
		<Exec Command="dotnet &quot;$(BrikPackagerDll)&quot; --action pack --input &quot;$(InputPath)&quot; --output &quot;$(OutputPathFile)&quot; --key 66" />
		<Message Importance="high" Text="[] Renderer packed at: $(OutputPathFile)" />
	</Target>
	<ItemGroup>
		<Content Include="$(TargetDir)root.dat">
			<Pack>true</Pack>
			<PublishState>Included</PublishState>
			<CopyToOutputDirectory>Always</CopyToOutputDirectory>
			<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
			<ExcludeFromSingleFile>false</ExcludeFromSingleFile>
		</Content>
	</ItemGroup>
	<ItemGroup>
		<EmbeddedResource Include="$(OutputPath)root.dat">
			<LogicalName>root.dat</LogicalName>
			<DependentUpon>PackRenderer</DependentUpon>
		</EmbeddedResource>
	</ItemGroup>
	<PropertyGroup>
		<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
	</PropertyGroup>
	<ItemGroup>
		<PackageReference Include="BrikPackager" Version="0.0.1" GeneratePathProperty="true" />
		<PackageReference Include="Photino.NET" Version="4.0.16" />
	</ItemGroup>
</Project>