From 3fb78c3159999c09982d7a5211c504a12289b793 Mon Sep 17 00:00:00 2001 From: rampaa Date: Thu, 11 May 2023 16:08:53 +0300 Subject: [PATCH] Correctly handle ARM64 release updates --- JL.Core/Network/Networking.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/JL.Core/Network/Networking.cs b/JL.Core/Network/Networking.cs index 67c873a4..4f0d3b11 100644 --- a/JL.Core/Network/Networking.cs +++ b/JL.Core/Network/Networking.cs @@ -1,3 +1,4 @@ +using System.Runtime.InteropServices; using System.Text.Json; using JL.Core.Utilities; @@ -29,7 +30,10 @@ public static async Task CheckForJLUpdates(bool isAutoCheck) if (latestJLVersion > Utils.JLVersion) { bool foundRelease = false; - string architecture = Environment.Is64BitProcess ? "x64" : "x86"; + string architecture = RuntimeInformation.ProcessArchitecture is Architecture.Arm64 + ? "arm64" + : Environment.Is64BitProcess ? "x64" : "x86"; + JsonElement assets = jsonDocument.RootElement.GetProperty("assets"); foreach (JsonElement asset in assets.EnumerateArray())