mirror of
https://github.com/ppy/osu
synced 2025-01-16 02:51:20 +00:00
Fix windows check weirdness
This commit is contained in:
parent
575da0992f
commit
9b189fd244
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using osu.Desktop.LegacyIpc;
|
||||
using osu.Desktop.Windows;
|
||||
using osu.Framework;
|
||||
@ -170,28 +171,18 @@ namespace osu.Desktop
|
||||
{
|
||||
var app = VelopackApp.Build();
|
||||
|
||||
app.WithFirstRun(_ =>
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
WindowsAssociationManager.InstallAssociations();
|
||||
});
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
app.WithAfterUpdateFastCallback(_ =>
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
WindowsAssociationManager.UpdateAssociations();
|
||||
});
|
||||
|
||||
app.WithBeforeUninstallFastCallback(_ =>
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
WindowsAssociationManager.UninstallAssociations();
|
||||
});
|
||||
}
|
||||
configureWindows(app);
|
||||
|
||||
app.Run();
|
||||
}
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
private static void configureWindows(VelopackApp app)
|
||||
{
|
||||
app.WithFirstRun(_ => WindowsAssociationManager.InstallAssociations());
|
||||
app.WithAfterUpdateFastCallback(_ => WindowsAssociationManager.UpdateAssociations());
|
||||
app.WithBeforeUninstallFastCallback(_ => WindowsAssociationManager.UninstallAssociations());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user