mirror of
https://github.com/ppy/osu
synced 2025-02-06 13:22:14 +00:00
Fix file associations not updating & uninstalling
This commit is contained in:
parent
04d133832f
commit
575da0992f
@ -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();
|
||||
}).Run();
|
||||
if (OperatingSystem.IsWindows())
|
||||
WindowsAssociationManager.InstallAssociations();
|
||||
});
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
app.WithAfterUpdateFastCallback(_ =>
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
WindowsAssociationManager.UpdateAssociations();
|
||||
});
|
||||
|
||||
app.WithBeforeUninstallFastCallback(_ =>
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
WindowsAssociationManager.UninstallAssociations();
|
||||
});
|
||||
}
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user