summaryrefslogtreecommitdiffstats
path: root/src/utau/openutau
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-06-14 07:13:27 +0200
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-06-14 07:13:27 +0200
commit712fbefa876ce7921f07dbd0d9fd2008ca92a909 (patch)
tree1b6f16d0df6acaf99da2cc7cfb4b1be92ba7e5e9 /src/utau/openutau
parente36285e238ab2216b93b83a33d9d74c95c017ce0 (diff)
downloadalpine-packages-712fbefa876ce7921f07dbd0d9fd2008ca92a909.tar.gz
alpine-packages-712fbefa876ce7921f07dbd0d9fd2008ca92a909.tar.bz2
alpine-packages-712fbefa876ce7921f07dbd0d9fd2008ca92a909.tar.lz
alpine-packages-712fbefa876ce7921f07dbd0d9fd2008ca92a909.zip

utau/openutau: Remove update checks

Diffstat (limited to 'src/utau/openutau')
-rw-r--r--src/utau/openutau/0001-Remove-remaining-update-check-shit.patch70
-rw-r--r--src/utau/openutau/APKBUILD14
-rw-r--r--src/utau/openutau/UpdaterDialog.axaml.cs27
3 files changed, 110 insertions, 1 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
+
diff --git a/src/utau/openutau/APKBUILD b/src/utau/openutau/APKBUILD
index 6257b75..af39f98 100644
--- a/src/utau/openutau/APKBUILD
+++ b/src/utau/openutau/APKBUILD
@@ -34,10 +34,20 @@ if [[ "${pkgver}" != "${_reporef}" ]] && [[ "${pkgver}" != "v${_reporef}" ]]; th
source="${_reponame}-${_reporef}.tar.gz::${_repourl}/archive/${_reporef}.tar.gz
build-worldline
openutau.desktop
- openutau.svg"
+ openutau.svg
+ UpdaterDialog.axaml.cs
+ 0001-Remove-remaining-update-check-shit.patch"
builddir="${srcdir}/${_reponame}-${_reporef}"
_outdir="${builddir}/OpenUtau/bin/${_buildtarget}"
+prepare() {
+ dos2unix "${builddir}/OpenUtau/ViewModels/UpdaterViewModel.cs"
+
+ default_prepare
+
+ cp "${srcdir}/UpdaterDialog.axaml.cs" "${builddir}/OpenUtau/Views/UpdaterDialog.axaml.cs"
+}
+
build() {
cd "${builddir}"
rm -rf runtimes/linux-*
@@ -93,4 +103,6 @@ d9fd1b694a7c204800a566e12c3b5ac755072236c6f86b59ee00c6762854e9b0982ae66a3d7bab07
49a405f189156c3873b49f3f3b9b5f95a1e432bcebd140d4a2a10d48eba1a7ed7bb8b0c9365f23f18a1f6adb067eb4027550bb44e1c4816d1b6ff4df2b520a89 build-worldline
ecd2480ef21ac77678f727f848120590e052c48b9027da98eabcbf3a6dcc4cc250b8528e9d4e82ba7ea787b8978f5d2ea14d20065dace516c93d25022570ff11 openutau.desktop
3c8118d019c02b3f5b49c5f714229f9687169b3a1943adf48bf3980b5fc3304852bfc568aa7166eae5ea91e6bd7ff3903927e6ad94c2e7dc8fd9d56bd02f82ee openutau.svg
+159c98095afcabc14824c2e0a7bdf67ee07d91eb7e1bfd9ea8e9296dbc98d062105e886cf763b3542b365bb0da5a8732ce3d97c0926230b0a0b2daeaef9a0997 UpdaterDialog.axaml.cs
+494cc5b679b60623df6a4d81df6175176486c8d603e2ff2333eb22d6d5afaa29295c3a37dbb5e4ed176bda9e22b2b84d4c79190c12c71020bf6ba9e958fd2706 0001-Remove-remaining-update-check-shit.patch
"
diff --git a/src/utau/openutau/UpdaterDialog.axaml.cs b/src/utau/openutau/UpdaterDialog.axaml.cs
new file mode 100644
index 0000000..6a14657
--- /dev/null
+++ b/src/utau/openutau/UpdaterDialog.axaml.cs
@@ -0,0 +1,27 @@
+// this really should be a patch file but ended up being easier like this
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Avalonia.Controls;
+using NetSparkleUpdater.Enums;
+using OpenUtau.App.ViewModels;
+using OpenUtau.Core.Util;
+using Serilog;
+
+namespace OpenUtau.App.Views {
+ public partial class UpdaterDialog : Window {
+ public readonly UpdaterViewModel ViewModel;
+ public UpdaterDialog() {
+ InitializeComponent();
+ DataContext = ViewModel = new UpdaterViewModel();
+ }
+
+ void OnClosing(object sender, WindowClosingEventArgs e) {
+ ViewModel.OnClosing();
+ }
+
+ public static void CheckForUpdate(Action<Window> showDialog, Action closeApplication, TaskScheduler scheduler) {
+ // No-op.
+ }
+ }
+}