1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 12:40:18 +08:00

Fix file associations not updating & uninstalling

This commit is contained in:
smallketchup82
2024-09-06 16:16:40 -04:00
Unverified
parent 04d133832f
commit 575da0992f
+23 -5
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();
}
}
}