feat(linux): gate graphical backends and capabilities
This commit is contained in:
parent
07bb1c5a74
commit
11501d52ca
13 changed files with 1924 additions and 32 deletions
|
|
@ -8,6 +8,7 @@ using Serilog;
|
|||
|
||||
GraphicalHostPlatformServices graphicalPlatform =
|
||||
GraphicalHostPlatformServices.Resolve();
|
||||
graphicalPlatform.ConfigureWindowBackend();
|
||||
ApplicationPathSet applicationPaths = graphicalPlatform.Paths;
|
||||
IReadOnlyList<string> migratedConfigurationFiles =
|
||||
GraphicalLegacyConfigurationMigrator.Migrate(applicationPaths);
|
||||
|
|
@ -18,8 +19,16 @@ if (args.Length >= 1 && args[0] == "ui-studio")
|
|||
using var sw = new AcDream.App.Studio.StudioWindow(
|
||||
so,
|
||||
applicationPaths);
|
||||
sw.Run();
|
||||
return 0;
|
||||
try
|
||||
{
|
||||
sw.Run();
|
||||
return 0;
|
||||
}
|
||||
catch (NotSupportedException error)
|
||||
{
|
||||
Console.Error.WriteLine(error.Message);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
|
|
@ -138,7 +147,15 @@ try
|
|||
catch (Exception ex) { Log.Error(ex, "plugin enable failed: {Id}", plugin.Manifest.Id); }
|
||||
}
|
||||
|
||||
window.Run();
|
||||
try
|
||||
{
|
||||
window.Run();
|
||||
}
|
||||
catch (NotSupportedException error)
|
||||
{
|
||||
Log.Error("{GraphicalStartupFailure}", error.Message);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue