Skip to content

Commit

Permalink
Move setupVelo logic higher up
Browse files Browse the repository at this point in the history
  • Loading branch information
smallketchup82 committed Jul 4, 2024
1 parent 461b791 commit 9e01cf7
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions osu.Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,9 @@ public static class Program
[STAThread]
public static void Main(string[] args)
{
/*
* WARNING: DO NOT PLACE **ANY** CODE ABOVE THE FOLLOWING BLOCK!
*
* Logic handling Squirrel MUST run before EVERYTHING if you do not want to break it.
* To be more precise: Squirrel is internally using a rather... crude method to determine whether it is running under NUnit,
* namely by checking loaded assemblies:
* https://github.com/clowd/Clowd.Squirrel/blob/24427217482deeeb9f2cacac555525edfc7bd9ac/src/Squirrel/SimpleSplat/PlatformModeDetector.cs#L17-L32
*
* If it finds ANY assembly from the ones listed above - REGARDLESS of the reason why it is loaded -
* the app will then do completely broken things like:
* - not creating system shortcuts (as the logic is if'd out if "running tests")
* - not exiting after the install / first-update / uninstall hooks are ran (as the `Environment.Exit()` calls are if'd out if "running tests")
*/
// Velopack needs to run before anything else
setupVelo();

if (OperatingSystem.IsWindows())
{
var windowsVersion = Environment.OSVersion.Version;
Expand All @@ -67,8 +57,6 @@ public static void Main(string[] args)
}
}

setupVelo();

// NVIDIA profiles are based on the executable name of a process.
// Lazer and stable share the same executable name.
// Stable sets this setting to "Off", which may not be what we want, so let's force it back to the default "Auto" on startup.
Expand Down

0 comments on commit 9e01cf7

Please sign in to comment.