diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs index a4270f22b4..79ac24a1da 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Desktop/OsuGameDesktop.cs @@ -13,6 +13,7 @@ using osu.Game; using OpenTK.Input; using Microsoft.Win32; using osu.Desktop.Updater; +using osu.Framework; using osu.Framework.Platform.Windows; namespace osu.Desktop @@ -51,11 +52,10 @@ namespace osu.Desktop v.State = Visibility.Visible; }); -#if NET_FRAMEWORK - Add(new SquirrelUpdateManager()); -#else - Add(new SimpleUpdateManager()); -#endif + if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows) + Add(new SquirrelUpdateManager()); + else + Add(new SimpleUpdateManager()); } } diff --git a/osu.Desktop/Updater/SquirrelUpdateManager.cs b/osu.Desktop/Updater/SquirrelUpdateManager.cs index 81da26cff2..1f8bff74f4 100644 --- a/osu.Desktop/Updater/SquirrelUpdateManager.cs +++ b/osu.Desktop/Updater/SquirrelUpdateManager.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -#if NET_FRAMEWORK using System; using System.Threading.Tasks; using osu.Framework.Allocation; @@ -162,4 +161,3 @@ namespace osu.Desktop.Updater } } } -#endif diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj index 1d9928134d..880ef3b2a9 100644 --- a/osu.Desktop/osu.Desktop.csproj +++ b/osu.Desktop/osu.Desktop.csproj @@ -13,9 +13,6 @@ <Version>0.0.0</Version> <FileVersion>0.0.0</FileVersion> </PropertyGroup> - <PropertyGroup Label="Defines"> - <DefineConstants Condition="'$(TargetFramework)' == 'net471'">$(DefineConstants);NET_FRAMEWORK</DefineConstants> - </PropertyGroup> <PropertyGroup> <StartupObject>osu.Desktop.Program</StartupObject> </PropertyGroup> @@ -29,11 +26,12 @@ <PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" /> </ItemGroup> <ItemGroup Label="Package References"> + <PackageReference Include="System.IO.Packaging" Version="4.5.0" /> + <PackageReference Include="squirrel.windows" Version="1.8.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" /> - <PackageReference Include="squirrel.windows" Version="1.8.0" Condition="'$(TargetFramework)' == 'net471'" /> </ItemGroup> <ItemGroup Label="Resources"> <EmbeddedResource Include="lazer.ico" /> </ItemGroup> -</Project> \ No newline at end of file +</Project>