#Custom protocol
73 messages · Page 1 of 1 (latest)
i don't know what framework are you using, but what tauri does is just display a website as an application (and add rust code to it).
every web related thing that you want to do should stay the same as you would in a normal website
Sveltekit
then this should work https://kit.svelte.dev/docs/routing
so just check the protocol and return if it's the wrong protocol?
i don't think you understand how protocols quite work work
you don't "make" custom protocols
or register it
you can just look at it through window.location.protocol
No
unless i am misunderstanding you?
You register them
With the registry
I need to register the nxm:// custom protocol
A protocol used by nexusmods
ohhhh, now i think i understand what did you mean
i thought you meant creating the route for that url
i was the one who misunderstood you
i might not know how to register a protocol (i never thought about doing that sort of thing in tauri, that's for sure). but i can at least tell you that you probably don't need to do any rust
tauri just embeds rust into the final app, but it's just normal rust
then you probably just need to change the tauri.conf.json
@nova dew Is this possible?
yeah, i know that in the bundle area you can change the url and indentifier of the app, so i am assuming you can also change the registry
Can you link the doc that explains this?
it's extremly long, so good luck
Already read it, no mention to making a custom protocol
found it, there is an option to make and allow custom protocols
if you can allow it, you can register it
slightly bad news, i tried to find how to register it specifically. and i found this in the docs
Builds a Tauri application.
it's not to register protocols
but you can probably use this to register them as well
Yeah, i just dont know how
what system do you want to make the app for?
you probably need to pick one and follow its API
No, i have to work with NexusMods that works like this, it sucks, i know.
so what do you plan on doing? according to tauri the way they register the protocol is different on every OS
they just use a command from every API
The app is windows only
oh, that makes it a lot more simple
Cuz i dont give a shit about mac and linux
same lol. linux is easy to support so i do support it as well but fuck supporting mac lol
Linux users can just emulate that with their 50k pc and mac users can just afford to buy windows (the app is videogames related so wtf are u playing games on mac)
now this is less of a tauri thing and more of a windows issue
i tried looking at the docs
and i found this
Its a windows api reference
sadly you do need rust to register the protocol
yeah
it wont lead to anything
you need to manually create the function to register it
I already did registry stuff with the WinReg crate so we just have to make it able to create the protocol and give the data to the frontend
brb tomorrow sry i have stuff to do
no prob
sorry for ignoring the ping. I assume you mean you want to open that link in another application and have the os trigger your app (this is called a deep link)?
For tauri v1: https://github.com/FabianLars/tauri-plugin-deep-link
For tauri v2: https://github.com/tauri-apps/plugins-workspace/pull/916#issuecomment-2016570996
Thanks so much, sorry for the ping, saw that you where active in the community so i tried asking you for help.