mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Explicitly define constant
This commit is contained in:
parent
7cfca866e2
commit
e98d9e8a8c
@ -1 +1 @@
|
|||||||
Subproject commit b77ceb37e6186cbf6f5b8a72959d753fbb56f9a5
|
Subproject commit 6b305b3332cdc424ef7fc3c9499c21e174f9eec5
|
@ -11,7 +11,7 @@ using osu.Framework.Platform;
|
|||||||
using osu.Game;
|
using osu.Game;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
|
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace osu.Desktop
|
|||||||
{
|
{
|
||||||
Func<string, bool> checkExists = p => Directory.Exists(Path.Combine(p, "Songs"));
|
Func<string, bool> checkExists = p => Directory.Exists(Path.Combine(p, "Songs"));
|
||||||
|
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
string stableInstallPath;
|
string stableInstallPath;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -64,7 +64,7 @@ namespace osu.Desktop
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!");
|
stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!");
|
||||||
#else
|
#else
|
||||||
var stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!");
|
var stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!");
|
||||||
|
@ -19,7 +19,7 @@ using osu.Game.Overlays.Notifications;
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
using System;
|
using System;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
@ -30,7 +30,7 @@ namespace osu.Desktop.Overlays
|
|||||||
{
|
{
|
||||||
public class VersionManager : OverlayContainer
|
public class VersionManager : OverlayContainer
|
||||||
{
|
{
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
private UpdateManager updateManager;
|
private UpdateManager updateManager;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ namespace osu.Desktop.Overlays
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
if (game.IsDeployedBuild)
|
if (game.IsDeployedBuild)
|
||||||
checkForUpdateAsync();
|
checkForUpdateAsync();
|
||||||
#endif
|
#endif
|
||||||
@ -147,12 +147,12 @@ namespace osu.Desktop.Overlays
|
|||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
updateManager?.Dispose();
|
updateManager?.Dispose();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET461
|
#if NET_FRAMEWORK
|
||||||
private async void checkForUpdateAsync(bool useDeltaPatching = true, UpdateProgressNotification notification = null)
|
private async void checkForUpdateAsync(bool useDeltaPatching = true, UpdateProgressNotification notification = null)
|
||||||
{
|
{
|
||||||
//should we schedule a retry on completion of this check?
|
//should we schedule a retry on completion of this check?
|
||||||
@ -247,7 +247,7 @@ namespace osu.Desktop.Overlays
|
|||||||
Activated = () =>
|
Activated = () =>
|
||||||
{
|
{
|
||||||
// Squirrel returns execution to us after the update process is started, so it's safe to use Wait() here
|
// 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();
|
UpdateManager.RestartAppWhenExited().Wait();
|
||||||
#endif
|
#endif
|
||||||
game.GracefullyExit();
|
game.GracefullyExit();
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
<Version>0.0.0.0</Version>
|
<Version>0.0.0.0</Version>
|
||||||
<FileVersion>0.0.0.0</FileVersion>
|
<FileVersion>0.0.0.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="Defines">
|
||||||
|
<DefineConstants Condition="'$(TargetFramework)' == 'net461'">$(DefineConstants);NET_FRAMEWORK</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj" />
|
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj" />
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
||||||
|
Loading…
Reference in New Issue
Block a user