diff --git a/ArchiSteamFarm/OS.cs b/ArchiSteamFarm/OS.cs index 785be09a1..68bc1c602 100644 --- a/ArchiSteamFarm/OS.cs +++ b/ArchiSteamFarm/OS.cs @@ -73,36 +73,6 @@ namespace ArchiSteamFarm { return new CrossProcessFileBasedSemaphore(resourceName); } - internal static bool VerifyEnvironment() { -#if NETFRAMEWORK - // This is .NET Framework build, we support that one only on mono for platforms not supported by .NET Core - - // We're not going to analyze source builds, as we don't know what changes the author has made, assume they have a point - if (SharedInfo.BuildInfo.IsCustomBuild) { - return true; - } - - // All windows variants have valid .NET Core build, and generic-netf is supported only on mono - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || !RuntimeCompatibility.IsRunningOnMono) { - return false; - } - - return RuntimeInformation.OSArchitecture switch { - // Sadly we can't tell a difference between ARMv6 and ARMv7 reliably, we'll believe that this linux-arm user knows what he's doing and he's indeed in need of generic-netf on ARMv6 - Architecture.Arm => true, - - // Apart from real x86, this also covers all unknown architectures, such as sparc, ppc64, and anything else Mono might support, we're fine with that - Architecture.X86 => true, - - // Everything else is covered by .NET Core - _ => false - }; -#else - // This is .NET Core build, we support all scenarios - return true; -#endif - } - internal static void Init(GlobalConfig.EOptimizationMode optimizationMode) { if (!Enum.IsDefined(typeof(GlobalConfig.EOptimizationMode), optimizationMode)) { throw new ArgumentNullException(nameof(optimizationMode)); @@ -181,6 +151,36 @@ namespace ArchiSteamFarm { SingleInstance = null; } + internal static bool VerifyEnvironment() { +#if NETFRAMEWORK + // This is .NET Framework build, we support that one only on mono for platforms not supported by .NET Core + + // We're not going to analyze source builds, as we don't know what changes the author has made, assume they have a point + if (SharedInfo.BuildInfo.IsCustomBuild) { + return true; + } + + // All windows variants have valid .NET Core build, and generic-netf is supported only on mono + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || !RuntimeCompatibility.IsRunningOnMono) { + return false; + } + + return RuntimeInformation.OSArchitecture switch { + // Sadly we can't tell a difference between ARMv6 and ARMv7 reliably, we'll believe that this linux-arm user knows what he's doing and he's indeed in need of generic-netf on ARMv6 + Architecture.Arm => true, + + // Apart from real x86, this also covers all unknown architectures, such as sparc, ppc64, and anything else Mono might support, we're fine with that + Architecture.X86 => true, + + // Everything else is covered by .NET Core + _ => false + }; +#else + // This is .NET Core build, we support all scenarios + return true; +#endif + } + private static string GetOsResourceName(string objectName) { if (string.IsNullOrEmpty(objectName)) { throw new ArgumentNullException(nameof(objectName));