FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Windows Custom URL Protocol Support by cyechow · Pull Request #480 · velopack/velopack · GitHub

Windows Custom URL Protocol Support - #480

Open
cyechow wants to merge 4 commits into
velopack:developfrom
cyechow:support-custom-url-protocols
Open

Windows Custom URL Protocol Support#480
cyechow wants to merge 4 commits into
velopack:developfrom
cyechow:support-custom-url-protocols

Conversation

cyechow commented Jan 24, 2025

Copy link
Copy Markdown

Added ability to specify custom URL protocols for Windows application, I don't know Linux/MacOS so wasn't sure what needed to be done there... I may take a look at it and see though.

This allows you to add multiple custom URL protocols and if you create a new version with a different set of protocols, it will remove the old ones and add the new ones.

The new pack command option is set at the shared level and removed from Linux & OSx, not sure if this makes sense since I'm not familiar with the code base.

I also modified the PackBuildsPackageWhichIsInstallable test and added a new test specifically for this (basically copied from the shortcuts one).

Let me know what you think!

contains customUrlProtocols.
Added registry function to register custom url protocols.
Added call to write register protocols in install file.

caesay commented Jan 24, 2025

Copy link
Copy Markdown
Member

This is awesome, thanks for your hard work on this!

It might be good to support file associations as well using the same approach (since the process should be the same), and finally the VelopackApp constructs should make it easy to provide a callback to handle these associations too.

If you don't have time to continue I'm happy to pick up from here. We'll also need to add in the MacOS support (but not Linux for now)

codecov Bot commented Jan 24, 2025
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.08696% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.34%. Comparing base (789913a) to head (69595af).
⚠️ Report is 819 commits behind head on develop.

Files with missing lines Patch % Lines
src/bins/src/windows/registry.rs 77.77% 16 Missing ⚠️
src/bins/src/commands/apply_windows_impl.rs 50.00% 3 Missing ⚠️
src/bins/src/commands/install.rs 75.00% 1 Missing ⚠️
src/bins/src/commands/uninstall.rs 66.66% 1 Missing ⚠️
src/lib-rust/src/bundle.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #480      +/-   ##
===========================================
+ Coverage    35.50%   38.34%   +2.84%     
===========================================
  Files          100       52      -48     
  Lines         8957     6181    -2776     
  Branches       528        0     -528     
===========================================
- Hits          3180     2370     -810     
+ Misses        5647     3811    -1836     
+ Partials       130        0     -130     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

caesay commented Jan 30, 2025

Copy link
Copy Markdown
Member

cyechow commented Jan 31, 2025

Copy link
Copy Markdown
Author

This is awesome, thanks for your hard work on this!

It might be good to support file associations as well using the same approach (since the process should be the same), and finally the VelopackApp constructs should make it easy to provide a callback to handle these associations too.

If you don't have time to continue I'm happy to pick up from here. We'll also need to add in the MacOS support (but not Linux for now)

No problem! It was interesting (: - sorry for the MIA, been a bit busy but should have a bit of free time this weekend

I can take a look at the file associations too, not sure about getting MacOS support though... I can do some research into this but if you have any ref links/pointers for what's needed then that would help

We may need to do a bit more here to do things properly on windows: https://learn.microsoft.com/en-us/windows/win32/shell/default-programs#registering-an-application-for-use-with-default-programs

that's a good find 🤔 I'm assuming we could just put this under HKCU rather than HKLM.. otherwise we deal with needing admin privileges

caesay commented Jan 31, 2025

Copy link
Copy Markdown
Member

Yes can register everything in hkcu, have a look at the osu implementation linked from the original issue also as they've done it the correct way.

cyechow commented Feb 7, 2025

Copy link
Copy Markdown
Author

I think I understand what's needed for file associations, based on the doc linked in the osu implementation, will take a bit of time slowly chipping away at it

The doc says that the whole page doesn't apply for Windows 10 though so I wonder if it's actually needed? https://blogs.windows.com/windows-insider/2015/05/20/announcing-windows-10-insider-preview-build-10122-for-pcs/

Makes me think that it's actually much simpler for Windows 10 onwards, just a single location for each file type 🤔

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL