Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions osu.Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.IO;
using System.Runtime.Versioning;
using System.Threading;
using osu.Desktop.LegacyIpc;
using osu.Desktop.Windows;
using osu.Framework;
Expand Down Expand Up @@ -180,13 +181,20 @@ private static void setupVelopack(string[] args)
// or is running with pending imports via file association or otherwise.
//
// In both these scenarios, we'd hope the game does not attempt to update.
// However, in the case for pending imports, we still need to initialize Velopack if this is the first launch of the game.
//
// Special consideration for velopack startup arguments, which must be handled during update.
// See https://docs.velopack.io/integrating/hooks#command-line-hooks.
if (args.Length > 0 && !args[0].StartsWith("--velo", StringComparison.Ordinal))
{
Logger.Log("Handling arguments, skipping velopack setup.");
return;
using (var _ = new Mutex(false, $"Global\\osu-framework-{OsuGame.IPC_PIPE_NAME}", out bool createdNew))
{
if (!createdNew)
{
Logger.Log("Handling arguments, not running as primary instance, skipping velopack setup.");
return;
}
}
}

if (OsuGameDesktop.IsPackageManaged)
Expand Down
Loading