YehudaKremer / msix

Create Msix installer for flutter windows-build files.
https://pub.dev/packages/msix
MIT License
280 stars 70 forks source link

[FEATURE REQUEST] Ability to specify additional `protocol_activation` #114

Closed imranismail closed 2 years ago

imranismail commented 2 years ago

:speech_balloon: Description

Allow additional protocol_activation to be specified,

Use-case:

Allow app to be assigned as default handlers for http and https protocol.

Although unrelated, I have a few more questions with regards to my request. Let's say the default browser was overridden, how do I add a function to reassign the default browser.

I have this sample code:

void configure() {
  final hkcu = Registry.currentUser;
  final http = hkcu.createKey(
      r'Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice');
  final https = hkcu.createKey(
      r'Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice');
  // setting the executable path does not work
  // it wants the ProgId and I have no clue where to get this from
  final progId = RegistryValue(
      'ProgId', RegistryValueType.string, Platform.resolvedExecutable);

  http.createValue(progId);
  https.createValue(progId);
}

:question: Platform

Windows

YehudaKremer commented 2 years ago

Hello @imranismail

You can now (version 3.4.0) add multiple protocols, see: changelog.

Thank you