Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show osu!(lazer) in windows "default apps" menus #31438

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

Susko3
Copy link
Member

@Susko3 Susko3 commented Jan 7, 2025

Implementation

Very simple, just sets the registry keys as defined in https://learn.microsoft.com/en-us/windows/win32/shell/default-programs. You can read the commits for more details. The specific keys/concepts used are: RegisteredApplications, Capabilities, ApplicationDescription, FileAssociations and UrlAssociations.
Previously, the default URI handler and file type handlers were set to osu!(lazer) when it was installed. This has now been removed. We trust that the windows explorer / shell will provide a sane default (works as expected from my testing).

End goal for the UX

Important: this doesn't work yet with this PR, changes to osu!(stable) are needed to get this working. Lazer will continue to steal association from stable at the moment.

osu! and osu!(lazer) appear in the "Open with" context menu

context menu

The user can choose default apps for each file type / URI in the Settings app

default apps

The user is presented with the "Select an app..." after installing osu!(lazer)

In this example, osu!(stable) was first installed, an .osk file was opened in stable, and then osu!(lazer) was installed and the .osk file double-clicked.

select an app where stable is the default

Same applies when opening an osu:// URI.

select an app for protocol

If the user never opened a file type in osu!(stable), both options are presented equally when lazer is installed.

slika

@Susko3 Susko3 added area:installer platform/windows priority:1 Very important. Feels bad without fix. Affects the majority of users. labels Jan 7, 2025
@Susko3 Susko3 requested a review from peppy January 7, 2025 02:14
@peppy peppy removed the priority:1 Very important. Feels bad without fix. Affects the majority of users. label Jan 7, 2025
peppy
peppy previously approved these changes Jan 7, 2025
Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No major issues with the code here. I'll setup the stable portion of this change and test before merging.

@peppy peppy self-requested a review January 8, 2025 07:01
@peppy peppy merged commit 26264d6 into ppy:master Jan 9, 2025
10 checks passed
@Susko3 Susko3 deleted the show-in-windows-association-menus branch January 9, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow users to explicitly choose whether to set up file associations
2 participants