mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.Deployment.git
synced 2025-11-19 21:08:45 +08:00
Merge pull request #4 from DGP-Studio/fix/crash
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Snap.Hutao.Deployment.Runtime</id>
|
||||
<version>1.9.0</version>
|
||||
<version>1.10.0</version>
|
||||
<authors>DGP Studio</authors>
|
||||
<developmentDependency>true</developmentDependency>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
|
||||
Binary file not shown.
@@ -45,15 +45,26 @@ internal static partial class Invocation
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await Certificate.EnsureGlobalSignCodeSigningRootR45Async().ConfigureAwait(false);
|
||||
await WindowsAppSDKDependency.EnsureAsync(path).ConfigureAwait(false);
|
||||
await RunDeploymentCoreAsync(path, name, isUpdateMode).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"""
|
||||
Exception occured:
|
||||
{ex}
|
||||
""");
|
||||
}
|
||||
finally
|
||||
{
|
||||
await ExitAsync(isUpdateMode).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task RunDeploymentCoreAsync(string path, string? name, bool isUpdateMode)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine("Initializing PackageManager...");
|
||||
PackageManager packageManager = new();
|
||||
@@ -117,21 +128,13 @@ internal static partial class Invocation
|
||||
""");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"""
|
||||
Exception occured:
|
||||
{ex}
|
||||
""");
|
||||
}
|
||||
}
|
||||
|
||||
private static async ValueTask ExitAsync(bool isUpdateMode)
|
||||
{
|
||||
if (!isUpdateMode)
|
||||
{
|
||||
Console.WriteLine("Press any key to exit...");
|
||||
Console.ReadKey();
|
||||
Console.WriteLine("Press enter to exit...");
|
||||
while (Console.ReadKey(true).Key != ConsoleKey.Enter) ;
|
||||
FreeConsole();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user