From 243eaf3eca84c0e303ac95259b6338eecb533dfa Mon Sep 17 00:00:00 2001 From: Popax21 Date: Sat, 18 Nov 2023 18:34:01 +0100 Subject: [PATCH 1/2] Remove Core from available branch list --- Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs b/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs index caa9de64b..412e37aff 100644 --- a/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs +++ b/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs @@ -158,15 +158,6 @@ public void Clear() { Index = GetEverestUpdaterDatabaseURL, ParseData = UpdateListParser("dev") }, - new Source { - Name = "updater_src_core", - Description = "updater_src_buildbot_azure", - - UpdatePriority = UpdatePriority.None, - - Index = GetEverestUpdaterDatabaseURL, - ParseData = UpdateListParser("core") - }, }; public static Task RequestAll() { From e09645a27535d8c684e34a54c157ecd827fdd1db Mon Sep 17 00:00:00 2001 From: Popax21 Date: Sun, 19 Nov 2023 20:17:37 +0100 Subject: [PATCH 2/2] Remove .NET runtime check for Piton Core builds --- Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs | 117 +++++++++--------- 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs b/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs index 412e37aff..20240234d 100644 --- a/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs +++ b/Celeste.Mod.mm/Mod/Everest/Everest.Updater.cs @@ -462,65 +462,68 @@ private static bool _UpdateStart(OuiLoggedProgress progress, Entry version) { } } else { // Check if the .NET runtime is installed - Process dotnetProc = null; - try { - dotnetProc = Process.Start(new ProcessStartInfo() { - FileName = "dotnet", - Arguments = "--list-runtimes", - UseShellExecute = false, - RedirectStandardOutput = true - }); - } catch (Win32Exception) { - // Fallback to the default runtime path - string dotnetPath = null; - if (MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Windows)) { - if (Environment.Is64BitOperatingSystem) - dotnetPath = (Environment.GetEnvironmentVariable("ProgramFiles") ?? string.Empty) + "\\dotnet"; - else - dotnetPath = (Environment.GetEnvironmentVariable("ProgramFiles(x86)") ?? string.Empty) + "\\dotnet"; - } else if (MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Linux)) - dotnetPath = "/usr/share/dotnet"; - else if (MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.MacOS)) - dotnetPath = "/usr/local/share/dotnet"; - - if (File.Exists(dotnetPath)) { - try { - dotnetProc = Process.Start(new ProcessStartInfo() { - FileName = dotnetPath, - Arguments = "--list-runtimes", - UseShellExecute = false, - RedirectStandardOutput = true - }); - } catch (Win32Exception) { + // Build 4415 is the first one to use Piton, so a runtime check isn't required anymore + if (version.Build != 0 && version.Build < 4415) { + Process dotnetProc = null; + try { + dotnetProc = Process.Start(new ProcessStartInfo() { + FileName = "dotnet", + Arguments = "--list-runtimes", + UseShellExecute = false, + RedirectStandardOutput = true + }); + } catch (Win32Exception) { + // Fallback to the default runtime path + string dotnetPath = null; + if (MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Windows)) { + if (Environment.Is64BitOperatingSystem) + dotnetPath = (Environment.GetEnvironmentVariable("ProgramFiles") ?? string.Empty) + "\\dotnet"; + else + dotnetPath = (Environment.GetEnvironmentVariable("ProgramFiles(x86)") ?? string.Empty) + "\\dotnet"; + } else if (MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Linux)) + dotnetPath = "/usr/share/dotnet"; + else if (MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.MacOS)) + dotnetPath = "/usr/local/share/dotnet"; + + if (File.Exists(dotnetPath)) { + try { + dotnetProc = Process.Start(new ProcessStartInfo() { + FileName = dotnetPath, + Arguments = "--list-runtimes", + UseShellExecute = false, + RedirectStandardOutput = true + }); + } catch (Win32Exception) { + dotnetProc = null; + } + } else dotnetProc = null; - } - } else - dotnetProc = null; - } + } - dotnetProc?.WaitForExit(); - string runtimeOut = dotnetProc?.ExitCode == 0 ? dotnetProc?.StandardOutput?.ReadToEnd() : null; - - if (!(runtimeOut?.Contains("Microsoft.NETCore.App 7.") ?? false)) { - // The .NET Runtime is not installed - string installerLink = - MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Windows) ? - (Environment.Is64BitOperatingSystem ? - "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-7.0.9-windows-x64-installer" : - "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-7.0.9-windows-x86-installer" - ) : - MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Linux) ? - "https://learn.microsoft.com/en-us/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website" - : MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.MacOS) ? - "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-7.0.9-macos-x64-installer" - : "https://dotnet.microsoft.com/en-us/download/dotnet/7.0"; - - progress.LogLine(string.Empty); - progress.LogLine(Dialog.Clean("EVERESTUPDATER_MISSINGRUNTIME_A")); - progress.LogLine(string.Format(Dialog.Get("EVERESTUPDATER_MISSINGRUNTIME_B"), installerLink)); - progress.Progress = 0; - progress.ProgressMax = 1; - return false; + dotnetProc?.WaitForExit(); + string runtimeOut = dotnetProc?.ExitCode == 0 ? dotnetProc?.StandardOutput?.ReadToEnd() : null; + + if (!(runtimeOut?.Contains("Microsoft.NETCore.App 7.") ?? false)) { + // The .NET Runtime is not installed + string installerLink = + MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Windows) ? + (Environment.Is64BitOperatingSystem ? + "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-7.0.9-windows-x64-installer" : + "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-7.0.9-windows-x86-installer" + ) : + MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.Linux) ? + "https://learn.microsoft.com/en-us/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website" + : MonoMod.Utils.PlatformHelper.Is(MonoMod.Utils.Platform.MacOS) ? + "https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-7.0.9-macos-x64-installer" + : "https://dotnet.microsoft.com/en-us/download/dotnet/7.0"; + + progress.LogLine(string.Empty); + progress.LogLine(Dialog.Clean("EVERESTUPDATER_MISSINGRUNTIME_A")); + progress.LogLine(string.Format(Dialog.Get("EVERESTUPDATER_MISSINGRUNTIME_B"), installerLink)); + progress.Progress = 0; + progress.ProgressMax = 1; + return false; + } } // This build ships with native MiniInstaller binaries