Added AzuresPackager as a dependency and MSBuild target to package wwwroot assets into root.dat with XOR encryption before build/run. Updated Program.cs to load UI assets from the packed root.dat using a custom scheme handler, replacing direct file access. This improves asset protection and streamlines deployment.
38 lines
1.4 KiB
XML
38 lines
1.4 KiB
XML
<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>
|
|
</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 "$(RendererSrc)" --output "$(RendererOut)" --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>
|