using System; using CommandLine; namespace StabilityMatrix.Avalonia.Models; /// /// Command line arguments passed to the application. /// public class AppArgs { /// /// Whether to enable debug mode /// [Option("debug", HelpText = "Enable debug mode")] public bool DebugMode { get; set; } /// /// Whether to use the exception dialog while debugger is attached. /// When no debugger is attached, the exception dialog is always used. /// [Option("debug-exception-dialog", HelpText = "Use exception dialog while debugger is attached")] public bool DebugExceptionDialog { get; set; } /// /// Whether to use Sentry when a debugger is attached. /// [Option("debug-sentry", HelpText = "Use Sentry when debugger is attached")] public bool DebugSentry { get; set; } /// /// Whether to force show the one-click install dialog. /// [Option("debug-one-click-install", HelpText = "Force show the one-click install dialog")] public bool DebugOneClickInstall { get; set; } /// /// Whether to disable Sentry. /// [Option("no-sentry", HelpText = "Disable Sentry")] public bool NoSentry { get; set; } /// /// Whether to disable window chrome effects /// [Option("no-window-chrome-effects", HelpText = "Disable window chrome effects")] public bool NoWindowChromeEffects { get; set; } /// /// Flag to indicate if we should reset the saved window position back to (O,0) /// [Option("reset-window-position", HelpText = "Reset the saved window position back to (0,0)")] public bool ResetWindowPosition { get; set; } /// /// Flag for disabling hardware acceleration / GPU rendering /// [Option("disable-gpu-rendering", HelpText = "Disable hardware acceleration / GPU rendering")] public bool DisableGpuRendering { get; set; } /// /// Flag to use OpenGL rendering /// [Option("opengl", HelpText = "Prefer OpenGL rendering")] public bool UseOpenGlRendering { get; set; } /// /// Override global app home directory /// Defaults to (%APPDATA%|~/.config)/StabilityMatrix /// [Option("home-dir", HelpText = "Override global app home directory")] public string? HomeDirectoryOverride { get; set; } /// /// Override data directory /// This takes precedence over relative portable directory and global directory /// [Option("data-dir", HelpText = "Override data directory")] public string? DataDirectoryOverride { get; set; } /// /// Launch an installed package on startup /// Can use package ID or name /// [Option("launch-package", HelpText = "Package ID or name to launch on startup")] public string? LaunchPackageName { get; set; } /// /// Custom Uri protocol handler /// This will send the Uri to the running instance of the app via IPC and exit /// [Option("uri", Hidden = true)] public string? Uri { get; set; } /// /// If provided, the app will wait for the process with this PID to exit /// before starting up. Mainly used by the updater. /// [Option("wait-for-exit-pid", Hidden = true)] public int? WaitForExitPid { get; set; } }