mirror of https://github.com/ppy/osu
Move environment variable logic to static bool in OsuGameDesktop
This commit is contained in:
parent
bf3597f711
commit
d451415d5c
|
@ -95,11 +95,11 @@ public OsuGameDesktop(string[]? args = null)
|
|||
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();
|
||||
|
|
|
@ -169,9 +169,7 @@ private static bool trySendIPCMessage(IIpcHost host, string cwd, string[] args)
|
|||
|
||||
private static void setupVelopack()
|
||||
{
|
||||
string? packageManaged = Environment.GetEnvironmentVariable("OSU_EXTERNAL_UPDATE_PROVIDER");
|
||||
|
||||
if (!string.IsNullOrEmpty(packageManaged))
|
||||
if (OsuGameDesktop.IsPackageManaged)
|
||||
{
|
||||
Logger.Log("Updates are being managed by an external provider. Skipping Velopack setup");
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue