mirror of
https://github.com/ppy/osu.git
synced 2024-12-17 04:32:53 +08:00
Merge pull request #29743 from smallketchup82/fix-file-associations
Fix file associations not updating or uninstalling
This commit is contained in:
commit
f3a07654d1
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.Versioning;
|
||||||
using osu.Desktop.LegacyIpc;
|
using osu.Desktop.LegacyIpc;
|
||||||
using osu.Desktop.Windows;
|
using osu.Desktop.Windows;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
@ -168,12 +169,20 @@ namespace osu.Desktop
|
|||||||
|
|
||||||
private static void setupVelopack()
|
private static void setupVelopack()
|
||||||
{
|
{
|
||||||
VelopackApp
|
var app = VelopackApp.Build();
|
||||||
.Build()
|
|
||||||
.WithFirstRun(v =>
|
if (OperatingSystem.IsWindows())
|
||||||
|
configureWindows(app);
|
||||||
|
|
||||||
|
app.Run();
|
||||||
|
}
|
||||||
|
|
||||||
|
[SupportedOSPlatform("windows")]
|
||||||
|
private static void configureWindows(VelopackApp app)
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsWindows()) WindowsAssociationManager.InstallAssociations();
|
app.WithFirstRun(_ => WindowsAssociationManager.InstallAssociations());
|
||||||
}).Run();
|
app.WithAfterUpdateFastCallback(_ => WindowsAssociationManager.UpdateAssociations());
|
||||||
|
app.WithBeforeUninstallFastCallback(_ => WindowsAssociationManager.UninstallAssociations());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user