From b137b66675c6567fdc84a423331f9a1e0379d7cc Mon Sep 17 00:00:00 2001 From: Rj Simas Date: Mon, 10 Aug 2026 21:00:35 -0700 Subject: [PATCH] Add install folder menu to Play button --- src/IntelOrca.OpenLauncher.Core/Shell.cs | 20 ++++++++ src/openlauncher/MainWindow.axaml | 26 ++++++++-- src/openlauncher/MainWindow.axaml.cs | 51 ++++++++++++++++++- .../Properties/Resources.Designer.cs | 20 ++++++++ src/openlauncher/Properties/Resources.resx | 12 +++++ 5 files changed, 123 insertions(+), 6 deletions(-) diff --git a/src/IntelOrca.OpenLauncher.Core/Shell.cs b/src/IntelOrca.OpenLauncher.Core/Shell.cs index cad7d88..4bcd06a 100644 --- a/src/IntelOrca.OpenLauncher.Core/Shell.cs +++ b/src/IntelOrca.OpenLauncher.Core/Shell.cs @@ -18,6 +18,26 @@ public void StartProcess(string name, params string[] args) Process.Start(psi); } + public void OpenDirectory(string path) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + Process.Start(new ProcessStartInfo(path) { UseShellExecute = true }); + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + StartProcess("open", path); + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + StartProcess("xdg-open", path); + } + else + { + throw new PlatformNotSupportedException(); + } + } + public int RunProcess(string name, params string[] args) { var psi = new ProcessStartInfo(name); diff --git a/src/openlauncher/MainWindow.axaml b/src/openlauncher/MainWindow.axaml index 268a24e..0cc9eef 100644 --- a/src/openlauncher/MainWindow.axaml +++ b/src/openlauncher/MainWindow.axaml @@ -77,11 +77,26 @@ Padding="4"> -