1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 06:52:55 +08:00
Commit Graph

716 Commits

Author SHA1 Message Date
Susko3
3df32638c2 Fix association descriptions never being written on update 2024-03-01 16:06:30 +01:00
Dean Herbert
91483bdc2f
Merge pull request #27001 from Susko3/windows-file-uri-association
Associate with files and URIs on windows
2024-03-01 11:26:44 +08:00
Dean Herbert
61cc5d6f29
Fix typos in xmldoc 2024-03-01 11:24:12 +08:00
Salman Ahmed
c69c881cd3 Combine conditionals and remove "InLobby" check 2024-02-28 07:58:02 +03:00
jvyden
e2a364332b
Merge branch 'master' into discord-dnd-fix 2024-02-27 16:23:56 -05:00
jvyden
e053c08f6b
Hide social interactions while in Do Not Disturb 2024-02-27 16:23:36 -05:00
Bartłomiej Dach
87509fbf6e
Privatise registry-related constants
Don't see any reason for them to be public.
2024-02-27 14:07:49 +01:00
Dan Balasescu
069b400dd0
Move manager to desktop game 2024-02-27 19:36:03 +09:00
Susko3
9b3ec64f41 Inline HKCU\Software\Classes usage 2024-02-26 13:10:37 +01:00
Susko3
f2807470ef Inline EXE_PATH usage 2024-02-26 13:03:23 +01:00
Susko3
6dbba705b3 Refine uninstall logic to account for legacy windows features 2024-02-26 12:27:02 +01:00
jvyden
8934cf33f0
Apply Discord RPC changes regardless of user's status 2024-02-23 22:29:09 -05:00
Joseph Madamba
27ce965dd2 Update unsupported windows startup blocker comment 2024-02-15 22:52:27 -08:00
Dean Herbert
e705190664
Update windows icon metrics to match previous icon 2024-02-15 23:23:49 +08:00
Susko3
6ded79cf07 Make NotifyShellUpdate() public to ease testing 2024-02-08 01:15:37 +01:00
Susko3
1dc54d6f25 Fix stable install path lookup
`osu` is the `osu://` protocol handler, which gets overriden by lazer.
Instead, use `osu!` which is the stable file handler.
2024-02-08 00:54:48 +01:00
Susko3
dfa0c51bc8 Copy icons to nuget and install package
Don't ask me why this uses the folder for .NET Framework 4.5
2024-02-08 00:23:46 +01:00
Susko3
7864810fc9 Merge branch 'master' into windows-file-uri-association 2024-02-07 23:10:13 +01:00
Susko3
8049270ad2 Remove unused param 2024-02-07 22:45:58 +01:00
Susko3
bf47221594 Make things testable via 'Run static method' in Rider 2024-02-07 22:42:42 +01:00
Susko3
139072fa81 Standardise using declaration 2024-02-07 22:29:20 +01:00
Susko3
3419b8ffa8 Standardise using declaration 2024-02-07 22:28:54 +01:00
Susko3
7f5dedc118 Refactor ProgID logic so it's more visible 2024-02-07 22:23:59 +01:00
Susko3
da8c4541db Use Logger.Error 2024-02-07 22:21:04 +01:00
Susko3
ffdefbc742 Move public methods closer together 2024-02-07 22:18:12 +01:00
Susko3
738c28755c Refactor public methods 2024-02-07 22:17:13 +01:00
Susko3
6bdb076027 Move update/install logic into helper 2024-02-07 22:06:09 +01:00
Susko3
0563507295 Remove duplicate try-catch and move NotifyShellUpdate() to less hidden place 2024-02-07 22:03:16 +01:00
Susko3
f9d257b99e Install associations as part of initial squirrel install 2024-02-07 21:56:39 +01:00
Susko3
eeba937686 Make WindowsAssociationManager static
Usages/localisation logic TBD
2024-02-07 21:55:42 +01:00
Susko3
57d5717e6a Remove Win32Icon class and use plain strings instead 2024-02-07 21:33:23 +01:00
Susko3
17033e09f6 Change to class to satisfy CFS hopefully 2024-02-05 14:29:17 +01:00
Susko3
4ec9d26657 Inline constants 2024-02-05 14:16:35 +01:00
Susko3
7789cc01eb Copy .ico files when publishing
These icons should appear in end-user installation folder.
2024-02-05 14:03:16 +01:00
Susko3
01efd1b353 Move WindowsAssociationManager to osu.Desktop 2024-02-05 13:44:12 +01:00
Susko3
2f4211249e Use cleaner way to specify .exe path 2024-02-05 13:12:03 +01:00
Susko3
cdcf5bddda Uninstall associations when uninstalling from squirrel 2024-02-03 17:56:14 +01:00
Susko3
2bac09ee00 Only associate on a deployed build
Helps to reduce clutter when developing
2024-02-03 17:23:59 +01:00
Susko3
03578821c0 Associate on startup 2024-02-03 17:04:06 +01:00
Dan Balasescu
8e8ba9e77f
Fix more CI inspections 2024-02-02 21:36:41 +09:00
Dan Balasescu
dda691b8c2
Fix NVAPI compile error 2024-02-02 21:28:52 +09:00
Dan Balasescu
6e4d52863c
Upgrade to .NET 8 SDK 2024-02-02 21:28:51 +09:00
Bartłomiej Dach
6931af664e
Add missing icon.png entry to nuspec
This is only half of the deployment fix, the other half will be in
`osu-deploy` (making sure the icon is actually in the staging
directory).
2024-01-30 12:05:31 +01:00
Dean Herbert
f54e1418ae
Update to v4 2024-01-27 01:42:47 +09:00
Dean Herbert
84a0291c85
Update icon in nuspec file 2024-01-26 12:32:18 +09:00
Dean Herbert
2941787f5e
Update windows logo 2024-01-25 20:37:50 +09:00
Dean Herbert
7e8b3d03fa
Update copyright years 2024-01-25 20:37:50 +09:00
Dean Herbert
a69fd8198d
Update framework and other nuget packages
- Moq held back because dicks
- NUnit held back because large API changes (trivial but effort)
- SignalR held back due to api deprecations
2024-01-21 11:00:53 +09:00
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