1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:07:25 +08:00

Fix file associations not updating & uninstalling

This commit is contained in:
smallketchup82 2024-09-06 16:16:40 -04:00
parent 04d133832f
commit 575da0992f
No known key found for this signature in database
GPG Key ID: A3D139FCF16859ED

View File

@ -168,12 +168,30 @@ namespace osu.Desktop
private static void setupVelopack()
{
VelopackApp
.Build()
.WithFirstRun(v =>
var app = VelopackApp.Build();
app.WithFirstRun(_ =>
{
if (OperatingSystem.IsWindows())
WindowsAssociationManager.InstallAssociations();
});
if (OperatingSystem.IsWindows())
{
app.WithAfterUpdateFastCallback(_ =>
{
if (OperatingSystem.IsWindows()) WindowsAssociationManager.InstallAssociations();
}).Run();
if (OperatingSystem.IsWindows())
WindowsAssociationManager.UpdateAssociations();
});
app.WithBeforeUninstallFastCallback(_ =>
{
if (OperatingSystem.IsWindows())
WindowsAssociationManager.UninstallAssociations();
});
}
app.Run();
}
}
}