Migrate desktop app to Avalonia and publish cross-platform releases
Build and Release / Publish Windows, Linux and macOS (push) Successful in 3m7s

This commit is contained in:
2026-07-19 08:51:41 +08:00 Unverified
parent 864feaf317
commit f61e298871
17 changed files with 1051 additions and 40 deletions
+31
View File
@@ -0,0 +1,31 @@
using System.Diagnostics;
namespace kcsj.Services;
public static class PlatformLauncher
{
public static void OpenFolder(string folderPath)
{
ProcessStartInfo startInfo;
if (OperatingSystem.IsWindows())
{
startInfo = new ProcessStartInfo
{
FileName = folderPath,
UseShellExecute = true
};
}
else
{
startInfo = new ProcessStartInfo
{
FileName = OperatingSystem.IsMacOS() ? "open" : "xdg-open",
UseShellExecute = false
};
startInfo.ArgumentList.Add(folderPath);
}
Process.Start(startInfo);
}
}