mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 05:32:57 +08:00
Merge pull request #29805 from smallketchup82/complete-disable-velopack
Completely disable Velopack when using an external updater
This commit is contained in:
commit
fd887b24fa
@ -95,11 +95,11 @@ namespace osu.Desktop
|
|||||||
return key?.OpenSubKey(WindowsAssociationManager.SHELL_OPEN_COMMAND)?.GetValue(string.Empty)?.ToString()?.Split('"')[1].Replace("osu!.exe", "");
|
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()
|
protected override UpdateManager CreateUpdateManager()
|
||||||
{
|
{
|
||||||
string? packageManaged = Environment.GetEnvironmentVariable("OSU_EXTERNAL_UPDATE_PROVIDER");
|
if (IsPackageManaged)
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(packageManaged))
|
|
||||||
return new NoActionUpdateManager();
|
return new NoActionUpdateManager();
|
||||||
|
|
||||||
return new VelopackUpdateManager();
|
return new VelopackUpdateManager();
|
||||||
|
@ -169,6 +169,12 @@ namespace osu.Desktop
|
|||||||
|
|
||||||
private static void setupVelopack()
|
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();
|
var app = VelopackApp.Build();
|
||||||
|
|
||||||
if (OperatingSystem.IsWindows())
|
if (OperatingSystem.IsWindows())
|
||||||
|
Loading…
Reference in New Issue
Block a user