1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 10:32:55 +08:00
Commit Graph

102 Commits

Author SHA1 Message Date
Dean Herbert
82e7643df5
Update IPC usages
Of note, I've disabled IPC on visual test runners as we generally don't
use IPC in these cases. Having it set means that the game will not open
while visual tests are open, which has been a complaint from devs in the
past.
2024-01-18 19:45:36 +09:00
Bartłomiej Dach
1e3c332658
Fix broken installer
Closes https://github.com/ppy/osu/issues/26510.

Time for a rant.

Technically, this "broke" with 9e8d07d314,
but it is actually an end result of upstream behaviours that I am
failing to find a better description for than "utterly broken".

Squirrel (the installer we use) has unit tests. Which is great, power
to them. However, the method in which that testing is implemented leads
to epic levels of WTF breakage.

To determine whether Squirrel is being tested right now, it is checking
all currently loaded assemblies, and determining that if any loaded
assembly contains the magic string of "NUNIT" - among others - it must
be being tested right now:

    2442721748/src/Squirrel/SimpleSplat/PlatformModeDetector.cs (L17-L32)

If one assumes that there is no conceivable way that an NUnit assembly
*may* be loaded *without* it being a test context, this *may* seem sane.
Foreshadowing.

(Now, to avoid being hypocritical, we also do this, *but* we do this
by checking if the *entry* assembly is an NUnit:

    92db55a527/osu.Framework/Development/DebugUtils.cs (L16-L34)

which seems *much* saner, no?)

Now, why did this break with 9e8d07d314
*specifically*, you might wonder?

Well the reason is this line:

    3d3f58c252/osu.Desktop/NVAPI.cs (L183)

Yes you are reading this correctly, it's not NVAPI anything itself that
breaks this, it is *a log statement*. To be precise, what the log
statement *does* to provoke this, is calling into framework. That causes
the framework assembly to load, *which* transitively loads the
`nunit.framework` assembly.

(If you ever find yourself wanting to find out this sort of cursed
knowledge - I hope you never need to - you can run something along
the lines of

    dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:4 -- .\osu!.exe

then open the resulting trace in PerfView, and then search the
`Microsoft-Windows-DotNETRuntime/AssemblyLoader/Start` log for
the cursed assembly. In this case, the relevant entry said something
along the lines of

    HasStack="True"
    ThreadID="23,924"
    ProcessorNumber="0"
    ClrInstanceID="6"
    AssemblyName="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb"
    AssemblyPath=""
    RequestingAssembly="osu.Framework, Version=2024.113.0.0, Culture=neutral, PublicKeyToken=null"
    AssemblyLoadContext="Default"
    RequestingAssemblyLoadContext="Default"
    ActivityID="/#21032/1/26/"

Either that or just comment the log line for kicks. But the above
is *much* faster.)

Now, what *happens* if Squirrel "detects" that it is being "tested"?
Well, it will refuse to close after executing the "hooks" defined via
`SquirrelAwareApp`:

    2442721748/src/Squirrel/SquirrelAwareApp.cs (L85-L88)

and it will also refuse to create version shortcuts:

    2442721748/src/Squirrel/UpdateManager.Shortcuts.cs (L63-L65)

Sounds familiar, don't it?

There are days on which I tire of computers. Today is one of them.
2024-01-13 22:04:21 +01:00
Dean Herbert
d38f8d9c78
Change threaded optimisations setting to "Auto" on startup 2024-01-03 15:41:08 +09:00
Dean Herbert
9e8d07d314
Add NVAPI and force thread optimisations on
This undoes what stable does to force this setting off.
2024-01-03 15:41:08 +09:00
Dean Herbert
56a4989f71 Disable IPC binding in tournament client to allow running concurrently 2023-08-16 16:55:48 +09:00
andy840119
78cc28d75f Remove nullable disable annotation and fix the api broken. 2022-08-02 22:29:54 +08:00
Dean Herbert
a5f48e336a Isolate development builds' storage from release builds 2022-08-01 14:38:02 +09:00
Dean Herbert
09613f1af3 Add mention of "compatibility mode" in windows version check error message 2022-07-19 17:25:52 +09:00
Salman Ahmed
c046585842 Fix unsupported OS message stating Windows 8 to be supported 2022-07-12 18:29:17 +03:00
Dean Herbert
a36f786725 Change minimum version to Windows 8.1 instead of Windows 8 2022-07-12 16:16:46 +09:00
Dean Herbert
10a14f39ed Show an error message on startup when attempting to run on an unsupported version of windows
A lot of sentry error reports are coming from realm / EF failures due to the host operating system being too old. Let's give the user some proper feedback rather than a silent crash and error report hitting our logging.
2022-07-12 15:48:36 +09:00
Dean Herbert
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +09:00
Bartłomiej Dach
330af7ec74
Handle osu:// scheme links via IPC in desktop game 2022-06-20 21:26:22 +02:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Joseph Madamba
e3418f570a Fix app version not updating on windows uninstaller entry 2022-06-10 20:01:45 -07:00
Salman Ahmed
bcd91ac743 Move exception soft-handling logic to OsuGameBase 2022-05-10 10:02:32 +03:00
Dean Herbert
7e9d51f33f Fix windows taskbar context menu not popping up correctly
Closes https://github.com/ppy/osu/issues/17965.

Note that this will cause a second osu! icon to appear after running the
application (after any update). As per the inline comment, this will
eventually be resolved via https://github.com/clowd/Clowd.Squirrel/issues/24.

I do think having context menus working is more important than duplicate
icons.

Note that for anyone who already has a pinned taskbar icon, it will need
to be manually unpinned and repinned after a future update to actually
fix this issue.

Thanks to @caesay for help with investigation.
2022-04-25 18:37:41 +09:00
Dean Herbert
b286122413 Move uninstaller registry operation to onInitialInstall 2022-03-03 03:54:39 +09:00
Dean Herbert
3aa2d4548a Add startup squirrel icon/association handling 2022-03-02 17:55:35 +09:00
Dean Herbert
5872dabf60 Fix incorrect flag to options conversion 2022-01-25 14:16:15 +09:00
Dean Herbert
dd2caea694 Update GetSuitableHost usages in line with new HostOptions 2022-01-25 13:52:02 +09:00
Dean Herbert
c08b6cf160 Remove unnecessary StartAsync call on TcpIpcProvider 2021-12-16 19:53:22 +09:00
Dan Balasescu
4ee2063683 Move event handlign internal to LegacyTcpIpcProvider 2021-11-28 23:02:57 +09:00
Dan Balasescu
18a0a791fd Refactor 2021-11-28 22:24:42 +09:00
Dan Balasescu
36fffbd917 Refactoring 2021-11-28 21:31:22 +09:00
Dan Balasescu
f506cb35bc Bind legacy IPC on startup 2021-11-28 21:15:29 +09:00
Dan Balasescu
ef24780642 Use IPC via TCP 2021-11-28 18:24:00 +09:00
Dan Balasescu
e5dcfc3113 Use console IPC 2021-11-28 14:03:21 +09:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Dean Herbert
5e53058fbc Use same method of exiting execution as previously for safety 2021-09-21 18:03:43 +09:00
Dean Herbert
3b174a71a3 Move startup concurrency check to higher level
Makes more sense to perform this check outside of the game itself now
that we can.
2021-09-21 18:00:55 +09:00
Henry Lin
88d9e2ec06 Guard against IndexOutOfRange when parsing launch args 2021-07-23 10:23:31 +08:00
Dean Herbert
3dddcf3582 Remove unused using statement 2021-07-21 15:11:01 +09:00
Dean Herbert
4148d3fdac Add a bit more safety to argument parsing logic 2021-07-21 15:02:15 +09:00
Salman Ahmed
ebd555129f Change to int-only debug client ID 2021-07-21 07:53:24 +03:00
Salman Ahmed
37393a8432 Allow defining custom storage name for debug builds of osu!lazer 2021-07-21 03:12:44 +03:00
Dean Herbert
b5954a55ad Remove empty <returns> xmldoc 2021-04-12 17:46:14 +09:00
Dean Herbert
79041c1c4b Remove osuTK reference 2021-03-17 18:07:42 +09:00
Dean Herbert
6eadae8aaf Remove remnants of OsuTK 2021-03-12 18:35:42 +09:00
Dean Herbert
285e62be9a Bring code in line with SDL2 defaults 2020-12-01 17:47:07 +09:00
Salman Ahmed
82fe99cf4a
Replace any potential usage of Environment.CurrentDirectory with a new RuntimeInfo.StartupDirectory
Using `Environment.CurrentDirectory` for storing / reading files is dangerous as the current directory is mutable and can be changed when performing a certain operation (like opening solutions in roslyn type reference builder for example).
2020-05-31 02:24:49 +03:00
Shane Woolcock
54a8c00bb8 Add support for --sdl command line arg 2019-11-28 17:10:39 +10:30
Dean Herbert
292bd22f92 Allow multiple instances of osu! when running under debug 2019-07-23 13:38:05 +09:00
Dean Herbert
7b56180b8b Merge remote-tracking branch 'upstream/master' into tournament-tools 2019-05-15 12:08:23 +09:00
Dean Herbert
612db31c38 Apply newline additions 2019-04-01 12:16:32 +09:00
Dean Herbert
482a01e7ba Merge branch 'master' into tournament-tools
# Conflicts:
#	osu.Game/Online/API/Requests/Responses/APIBeatmap.cs
#	osu.Game/OsuGameBase.cs
#	osu.Game/Overlays/ChatOverlay.cs
#	osu.Game/Screens/Menu/MainMenu.cs
#	osu.Game/Screens/Tournament/Drawings.cs
#	osu.Game/Screens/Tournament/Teams/DrawingsTeam.cs
#	osu.Game/osu.Game.csproj
#	osu.sln
2019-02-02 19:09:48 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
Dean Herbert
9c5eddea54 Allow running tournament tools from main executable 2018-11-06 14:49:09 +09:00
smoogipoo
da13266ae9 Fix missed string interpolation 2018-08-21 09:17:44 +09:00
Dean Herbert
583e026906 Don’t suppress unhandled exceptions in debug builds 2018-08-17 13:28:35 +09:00