From 329a46ab9cd3695a65b5e3b0017b157e9b2d78c3 Mon Sep 17 00:00:00 2001 From: JieXu Date: Fri, 12 Sep 2025 11:58:30 +0800 Subject: [PATCH] Update Utils.cs --- v2rayN/AmazTool/Utils.cs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/v2rayN/AmazTool/Utils.cs b/v2rayN/AmazTool/Utils.cs index 1d9fdb33..df13ecf6 100644 --- a/v2rayN/AmazTool/Utils.cs +++ b/v2rayN/AmazTool/Utils.cs @@ -1,7 +1,4 @@ -using System; using System.Diagnostics; -using System.IO; -using System.Threading; namespace AmazTool; @@ -51,31 +48,4 @@ internal class Utils Thread.Sleep(1000); } } - - public static bool IsPackagedInstall() - { - try - { - if (OperatingSystem.IsWindows() || OperatingSystem.IsMacOS()) - return false; - - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APPIMAGE"))) - return true; - - var sp = StartupPath()?.Replace('\\', '/'); - if (!string.IsNullOrEmpty(sp) && sp.StartsWith("/opt/v2rayN", StringComparison.Ordinal)) - return true; - - var procPath = Environment.ProcessPath; - var procDir = string.IsNullOrEmpty(procPath) - ? "" - : Path.GetDirectoryName(procPath)?.Replace('\\', '/'); - if (!string.IsNullOrEmpty(procDir) && procDir.StartsWith("/opt/v2rayN", StringComparison.Ordinal)) - return true; - } - catch - { - } - return false; - } }