From f06d22d6f01e657ebbc0c8ef082739cd468e47b5 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> Date: Sun, 11 Feb 2024 02:09:18 +0000 Subject: Infra: Capitalisation Consistency (#6296) * Rename Ryujinx.UI.Common * Rename Ryujinx.UI.LocaleGenerator * Update in Files AboutWindow * Configuration State * Rename projects * Ryujinx/UI * Fix build * Main remaining inconsistencies * HLE.UI Namespace * HLE.UI Files * Namespace * Ryujinx.UI.Common.Configuration.UI * Ryujinx.UI.Common,Configuration.UI Files * More instances --- src/Ryujinx.Ui.Common/Helper/LinuxHelper.cs | 62 ----------------------------- 1 file changed, 62 deletions(-) delete mode 100644 src/Ryujinx.Ui.Common/Helper/LinuxHelper.cs (limited to 'src/Ryujinx.Ui.Common/Helper/LinuxHelper.cs') diff --git a/src/Ryujinx.Ui.Common/Helper/LinuxHelper.cs b/src/Ryujinx.Ui.Common/Helper/LinuxHelper.cs deleted file mode 100644 index bf647719..00000000 --- a/src/Ryujinx.Ui.Common/Helper/LinuxHelper.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Runtime.Versioning; - -namespace Ryujinx.Ui.Common.Helper -{ - [SupportedOSPlatform("linux")] - public static class LinuxHelper - { - // NOTE: This value was determined by manual tests and might need to be increased again. - public const int RecommendedVmMaxMapCount = 524288; - public const string VmMaxMapCountPath = "/proc/sys/vm/max_map_count"; - public const string SysCtlConfigPath = "/etc/sysctl.d/99-Ryujinx.conf"; - public static int VmMaxMapCount => int.Parse(File.ReadAllText(VmMaxMapCountPath)); - public static string PkExecPath { get; } = GetBinaryPath("pkexec"); - - private static string GetBinaryPath(string binary) - { - string pathVar = Environment.GetEnvironmentVariable("PATH"); - - if (pathVar is null || string.IsNullOrEmpty(binary)) - { - return null; - } - - foreach (var searchPath in pathVar.Split(":", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) - { - string binaryPath = Path.Combine(searchPath, binary); - - if (File.Exists(binaryPath)) - { - return binaryPath; - } - } - - return null; - } - - public static int RunPkExec(string command) - { - if (PkExecPath == null) - { - return 1; - } - - using Process process = new() - { - StartInfo = - { - FileName = PkExecPath, - ArgumentList = { "sh", "-c", command }, - }, - }; - - process.Start(); - process.WaitForExit(); - - return process.ExitCode; - } - } -} -- cgit v1.2.3