diff options
Diffstat (limited to 'src/utau/openutau/0001-Remove-remaining-update-check-shit.patch')
-rw-r--r-- | src/utau/openutau/0001-Remove-remaining-update-check-shit.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/utau/openutau/0001-Remove-remaining-update-check-shit.patch b/src/utau/openutau/0001-Remove-remaining-update-check-shit.patch new file mode 100644 index 0000000..a8044fb --- /dev/null +++ b/src/utau/openutau/0001-Remove-remaining-update-check-shit.patch @@ -0,0 +1,70 @@ +From ed789c95cb0a46ec50337d869ee7b7936968fb19 Mon Sep 17 00:00:00 2001 +From: memdmp <memdmp@estrogen.zone> +Date: Sat, 14 Jun 2025 07:08:22 +0200 +Subject: [PATCH] Remove remaining update check shit + +--- + OpenUtau/ViewModels/UpdaterViewModel.cs | 40 ++----------------------- + 1 file changed, 3 insertions(+), 37 deletions(-) + +diff --git a/OpenUtau/ViewModels/UpdaterViewModel.cs b/OpenUtau/ViewModels/UpdaterViewModel.cs +index ff24dedd..2c9cc191 100644 +--- a/OpenUtau/ViewModels/UpdaterViewModel.cs ++++ b/OpenUtau/ViewModels/UpdaterViewModel.cs +@@ -80,21 +80,8 @@ public UpdaterViewModel() { + } + + static async Task<GithubRelease?> SelectRelease() { +- using var client = new HttpClient(); +- client.DefaultRequestHeaders.Add("Accept", "application/json"); +- client.DefaultRequestHeaders.Add("User-Agent", "Other"); +- client.Timeout = TimeSpan.FromSeconds(30); +- using var resposne = await client.GetAsync("https://api.github.com/repos/stakira/OpenUtau/releases"); +- resposne.EnsureSuccessStatusCode(); +- string respBody = await resposne.Content.ReadAsStringAsync(); +- List<GithubRelease>? releases = JsonConvert.DeserializeObject<List<GithubRelease>>(respBody); +- if (releases == null) { +- return null; +- } +- return releases +- .Where(r => !r.draft && r.prerelease == Preferences.Default.Beta) +- .OrderByDescending(r => r.id) +- .FirstOrDefault(); ++ await Task.Run(() => {}); ++ return null; + } + + static GithubReleaseAsset? SelectAppcast(GithubRelease release) { +@@ -218,28 +205,7 @@ public ZipUpdater(string appcastUrl, ISignatureVerifier signatureVerifier, strin + base(appcastUrl, signatureVerifier, referenceAssembly, factory) { } + + protected override string GetWindowsInstallerCommand(string downloadFilePath) { +- string installerExt = Path.GetExtension(downloadFilePath); +- if (DoExtensionsMatch(installerExt, ".exe")) { +- return $"\"{downloadFilePath}\""; +- } +- if (DoExtensionsMatch(installerExt, ".msi")) { +- return $"msiexec /i \"{downloadFilePath}\""; +- } +- if (DoExtensionsMatch(installerExt, ".msp")) { +- return $"msiexec /p \"{downloadFilePath}\""; +- } +- if (DoExtensionsMatch(installerExt, ".zip")) { +- string restart = RestartExecutablePath.TrimEnd('\\', '/'); +- if (Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 17063) { +- Log.Information("Starting update with tar."); +- return $"tar -x -f \"{downloadFilePath}\" -C \"{restart}\""; +- } +- var unzipperPath = Path.Combine(Path.GetDirectoryName(downloadFilePath) ?? Path.GetTempPath(), "Unzipper.exe"); +- File.WriteAllBytes(unzipperPath, Resources.Resources.Unzipper); +- Log.Information("Starting update with unzipper."); +- return $"{unzipperPath} \"{downloadFilePath}\" \"{restart}\""; +- } +- return downloadFilePath; ++ return ""; + } + } + } +-- +2.49.0 + |