diff --git a/osu-framework b/osu-framework index b77ceb37e6..6b305b3332 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit b77ceb37e6186cbf6f5b8a72959d753fbb56f9a5 +Subproject commit 6b305b3332cdc424ef7fc3c9499c21e174f9eec5 diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs index ff4b37a8fb..d356fcf53d 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Desktop/OsuGameDesktop.cs @@ -11,7 +11,7 @@ using osu.Game; using OpenTK.Input; -#if NET461 +#if NET_FRAMEWORK using Microsoft.Win32; #endif @@ -48,7 +48,7 @@ protected override string LocateBasePath() { Func checkExists = p => Directory.Exists(Path.Combine(p, "Songs")); -#if NET461 +#if NET_FRAMEWORK string stableInstallPath; try @@ -64,7 +64,7 @@ protected override string LocateBasePath() } #endif -#if NET461 +#if NET_FRAMEWORK stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!"); #else var stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!"); diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Desktop/Overlays/VersionManager.cs index fef7e6d52a..3db7297385 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Desktop/Overlays/VersionManager.cs @@ -19,7 +19,7 @@ using OpenTK; using OpenTK.Graphics; -#if NET461 +#if NET_FRAMEWORK using System; using System.Net.Http; using osu.Framework.Logging; @@ -30,7 +30,7 @@ namespace osu.Desktop.Overlays { public class VersionManager : OverlayContainer { -#if NET461 +#if NET_FRAMEWORK private UpdateManager updateManager; #endif @@ -101,7 +101,7 @@ private void load(NotificationOverlay notification, OsuColour colours, TextureSt } }; -#if NET461 +#if NET_FRAMEWORK if (game.IsDeployedBuild) checkForUpdateAsync(); #endif @@ -147,12 +147,12 @@ protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); -#if NET461 +#if NET_FRAMEWORK updateManager?.Dispose(); #endif } -#if NET461 +#if NET_FRAMEWORK private async void checkForUpdateAsync(bool useDeltaPatching = true, UpdateProgressNotification notification = null) { //should we schedule a retry on completion of this check? @@ -247,7 +247,7 @@ private class UpdateProgressNotification : ProgressNotification Activated = () => { // Squirrel returns execution to us after the update process is started, so it's safe to use Wait() here -#if NET461 +#if NET_FRAMEWORK UpdateManager.RestartAppWhenExited().Wait(); #endif game.GracefullyExit(); diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj index 3b08715d2d..9fed566703 100644 --- a/osu.Desktop/osu.Desktop.csproj +++ b/osu.Desktop/osu.Desktop.csproj @@ -15,6 +15,9 @@ 0.0.0.0 0.0.0.0 + + $(DefineConstants);NET_FRAMEWORK +