A snapshot of the working tree for aelrynth.com/git/: the code, build files and public docs. Internal review notes and agent instructions are left out. MIT licensed; see LICENSE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
966 B
C#
39 lines
966 B
C#
using Avalonia;
|
|
using System;
|
|
using System.IO;
|
|
|
|
namespace RynthCore.MonsterEditor;
|
|
|
|
class Program
|
|
{
|
|
internal static readonly string LogPath =
|
|
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "MonsterEditor.log");
|
|
|
|
[STAThread]
|
|
public static void Main(string[] args)
|
|
{
|
|
AppDomain.CurrentDomain.UnhandledException += (_, e) =>
|
|
Log($"UNHANDLED: {e.ExceptionObject}");
|
|
|
|
try
|
|
{
|
|
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Log($"FATAL: {ex}");
|
|
throw;
|
|
}
|
|
}
|
|
|
|
internal static void Log(string msg)
|
|
{
|
|
try { File.AppendAllText(LogPath, $"[{DateTime.Now:HH:mm:ss}] {msg}\n"); }
|
|
catch { /* best-effort */ }
|
|
}
|
|
|
|
public static AppBuilder BuildAvaloniaApp() =>
|
|
AppBuilder.Configure<App>()
|
|
.UsePlatformDetect()
|
|
.LogToTrace();
|
|
}
|