How to associate compose desktop app with custom U...
# compose-desktop
a
How to associate compose desktop app with custom URL scheme? (I want to open it from browser using
myapp://
)
There will be some extra steps on macOS though.
a
As i know for Windows for example, i need to setup registry key for the application. Is this step required when using OpenUriHandler?
a
I’ve never used this myself, so I don’t know. The docs only mentions macOS, so either it doesn’t work on other platforms, or it doesn’t need an extra setup, or maybe it does after all and the docs just don’t mention it.
a
OK, thanks anyway
a
Also, Conveyor handles it for you, I think: https://conveyor.hydraulic.dev/10.1/configs/os-integration/
I see
jpackage
has
--file-associations
, but I don’t see anything about URLs.
a
I also looked for jpackage options but didn't find anything either. Only something called jDeploy but i guess it is something different
You have a paragraph about it in compose docs 😄 (at least for mac)
a
Let me know if it works on Windows. Keeping my fingers crossed.
a
Doesn't have windows machine to try right now. But there is still requirement to modify windows registry to do it. It seems there is no similar gradle option like for mac info.plist but for windows registry :(
a
Maybe the JVM does it when you first run the app, or maybe there’s some other mechanism; I’m not sure.
a
Yep, registry can be modified manually at runtime so there should not be a problem i guess
m
@Alexander Zhirkevich Conveyor uses the "new" Windows way to do things, which doesn't involve registry keys. It's more macOS like, you have an XML file that describes OS integration points.
So if you use that you can just add
app.url-schemes = [ my-app ]
to your config and then your app is launched for
my-app://
urls.
a
Ok, thanks, I’ll try it
Looks like it ts not free, right? :)
m
Free for open source apps.
👍 1
p
@Alexander Zhirkevich Did you find a way to make it work for all platforms? Because if im not wrong setOpenUriHandler is only for mac?
153 Views