Refactored package own dep
This commit is contained in:
parent
28f18b9971
commit
eb5d29af89
@ -7,18 +7,21 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AssemblyName>LentiaLauncher</AssemblyName>
|
<AssemblyName>LentiaLauncher</AssemblyName>
|
||||||
<ApplicationIcon>./src/resources/icon.ico</ApplicationIcon>
|
<ApplicationIcon>./src/resources/icon.ico</ApplicationIcon>
|
||||||
<PublishTrimmed>true</PublishTrimmed>
|
<PublishTrimmed>false</PublishTrimmed>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="PackRenderer" BeforeTargets="BeforeBuild;BeforeRun">
|
<Target Name="PackRenderer" BeforeTargets="DispatchToInnerBuild;BeforeBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RendererSrc>$(ProjectDir)wwwroot</RendererSrc>
|
<BrikPackagerDll>$([System.IO.Path]::Combine('$(PkgBrikPackager)', 'lib', 'net8.0', 'BrikPackager.dll'))</BrikPackagerDll>
|
||||||
<RendererOut>$(OutputPath)root.dat</RendererOut>
|
<InputPath>$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', 'wwwroot'))</InputPath>
|
||||||
<XorKey>66</XorKey>
|
<OutputPathFile>$([System.IO.Path]::Combine('$(TargetDir)', 'root.dat'))</OutputPathFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Message Importance="high" Text="[Lentia] Packaging renderer..." />
|
<Message Importance="high" Text="[] Packaging renderer (Cross-Platform)..." />
|
||||||
<Exec Command="dotnet run --project ../AzuresPackager/AzuresPackager.csproj --action pack --input "$(RendererSrc)" --output "$(RendererOut)" --key $(XorKey)" />
|
<Exec Command="dotnet "$(BrikPackagerDll)" --action pack --input "$(InputPath)" --output "$(OutputPathFile)" --key 66" />
|
||||||
<Message Importance="high" Text="[Lentia] Renderer packed in : $(RendererOut)" />
|
<Message Importance="high" Text="[] Renderer packed at: $(OutputPathFile)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<ItemGroup>
|
||||||
|
<TrimmerRootDescriptor Include="Roots.xml" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="wwwroot\**" />
|
<Compile Remove="wwwroot\**" />
|
||||||
<None Update="wwwroot\**">
|
<None Update="wwwroot\**">
|
||||||
@ -26,7 +29,7 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AzuresPackager" Version="0.0.2" />
|
<PackageReference Include="BrikPackager" Version="0.0.1" GeneratePathProperty="true" />
|
||||||
<PackageReference Include="Photino.NET" Version="4.0.16" />
|
<PackageReference Include="Photino.NET" Version="4.0.16" />
|
||||||
<PackageReference Include="System.Management" Version="10.0.2" />
|
<PackageReference Include="System.Management" Version="10.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
6
Roots.xml
Normal file
6
Roots.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<linker>
|
||||||
|
<assembly fullname="LentiaLauncher">
|
||||||
|
<type fullname="Lentia.Core.*" preserve="all" />
|
||||||
|
<type fullname="Lentia.Utils.*" preserve="all" />
|
||||||
|
</assembly>
|
||||||
|
</linker>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
using AzuresPackager;
|
using BrikPackager;
|
||||||
using Lentia.Core.Auth.OAuth2;
|
using Lentia.Core.Auth.OAuth2;
|
||||||
using Lentia.Core.Constants;
|
using Lentia.Core.Constants;
|
||||||
using Lentia.Core.Game;
|
using Lentia.Core.Game;
|
||||||
@ -26,8 +26,8 @@ class Program {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static PhotinoWindow CreateLoginWindow() {
|
public static PhotinoWindow CreateLoginWindow() {
|
||||||
AzuresPackage azp = new AzuresPackage(Path.Combine(__dirname, "root.dat"), 66);
|
BrikPackage bpkg = new BrikPackage(Path.Combine(__dirname, "root.dat"), 66);
|
||||||
List<string> entries = azp.ListEntries();
|
List<string> entries = bpkg.ListEntries();
|
||||||
var window = new PhotinoWindow()
|
var window = new PhotinoWindow()
|
||||||
.SetUseOsDefaultLocation(false)
|
.SetUseOsDefaultLocation(false)
|
||||||
.SetUseOsDefaultSize(false)
|
.SetUseOsDefaultSize(false)
|
||||||
@ -38,7 +38,7 @@ class Program {
|
|||||||
if (uri.Host == "internal") {
|
if (uri.Host == "internal") {
|
||||||
string internalPath = uri.AbsolutePath;
|
string internalPath = uri.AbsolutePath;
|
||||||
contentType = MimeHelper.GetMimeType(uri.AbsolutePath);
|
contentType = MimeHelper.GetMimeType(uri.AbsolutePath);
|
||||||
byte[] fileData = azp.GetFileBytes(internalPath.TrimStart('/'));
|
byte[] fileData = bpkg.GetFileBytes(internalPath.TrimStart('/'));
|
||||||
return fileData != null ? new MemoryStream(fileData) : null;
|
return fileData != null ? new MemoryStream(fileData) : null;
|
||||||
}
|
}
|
||||||
contentType = null!;
|
contentType = null!;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user