1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 03:02:54 +08:00

Merge pull request #29805 from smallketchup82/complete-disable-velopack

Completely disable Velopack when using an external updater
This commit is contained in:
Dan Balasescu 2024-09-11 16:27:24 +09:00 committed by GitHub
commit fd887b24fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -95,11 +95,11 @@ namespace osu.Desktop
return key?.OpenSubKey(WindowsAssociationManager.SHELL_OPEN_COMMAND)?.GetValue(string.Empty)?.ToString()?.Split('"')[1].Replace("osu!.exe", "");
}
public static bool IsPackageManaged => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("OSU_EXTERNAL_UPDATE_PROVIDER"));
protected override UpdateManager CreateUpdateManager()
{
string? packageManaged = Environment.GetEnvironmentVariable("OSU_EXTERNAL_UPDATE_PROVIDER");
if (!string.IsNullOrEmpty(packageManaged))
if (IsPackageManaged)
return new NoActionUpdateManager();
return new VelopackUpdateManager();

View File

@ -169,6 +169,12 @@ namespace osu.Desktop
private static void setupVelopack()
{
if (OsuGameDesktop.IsPackageManaged)
{
Logger.Log("Updates are being managed by an external provider. Skipping Velopack setup.");
return;
}
var app = VelopackApp.Build();
if (OperatingSystem.IsWindows())