Linux: Change how AppImage moving is handled, add support for vrcx:\\

This commit is contained in:
Natsumi
2025-02-28 09:53:43 +13:00
parent 641dba2fe9
commit 137608b705
9 changed files with 167 additions and 161 deletions

View File

@@ -11,6 +11,7 @@ using System.IO.Pipes;
using System.Linq;
using System.Management;
using System.Text;
using System.Text.Json;
using System.Threading;
#if !LINUX
@@ -24,9 +25,11 @@ namespace VRCX
{
private const string SubProcessTypeArgument = "--type";
public static VrcxLaunchArguments LaunchArguments = new();
public static string[] Args;
public static void ArgsCheck(string[] args)
{
Args = args;
Debug.Assert(Program.LaunchDebug = true);
LaunchArguments = ParseArgs(args);
@@ -77,6 +80,9 @@ namespace VRCX
if (arg.StartsWith(VrcxLaunchArguments.LaunchCommandPrefix) && arg.Length > VrcxLaunchArguments.LaunchCommandPrefix.Length)
arguments.LaunchCommand = arg.Substring(VrcxLaunchArguments.LaunchCommandPrefix.Length);
if (arg.StartsWith(VrcxLaunchArguments.LinuxLaunchCommandPrefix) && arg.Length > VrcxLaunchArguments.LinuxLaunchCommandPrefix.Length)
arguments.LaunchCommand = arg.Substring(VrcxLaunchArguments.LinuxLaunchCommandPrefix.Length);
if (arg.StartsWith(VrcxLaunchArguments.ConfigDirectoryPrefix) && arg.Length > VrcxLaunchArguments.ConfigDirectoryPrefix.Length)
arguments.ConfigDirectory = arg.Substring(VrcxLaunchArguments.ConfigDirectoryPrefix.Length + 1);
@@ -96,6 +102,7 @@ namespace VRCX
public bool IsDebug { get; set; } = false;
public const string LaunchCommandPrefix = "/uri=vrcx://";
public const string LinuxLaunchCommandPrefix = "vrcx://";
public string LaunchCommand { get; set; } = null;
public const string ConfigDirectoryPrefix = "--config";