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

URI handler #52

Open
int-72h opened this issue Dec 24, 2024 · 1 comment
Open

URI handler #52

int-72h opened this issue Dec 24, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@int-72h
Copy link
Contributor

int-72h commented Dec 24, 2024

Just a handler that's of the form adastral://[run,verify,install]/[game_id] that allows direct links into Adastral.

@int-72h int-72h converted this from a draft issue Dec 24, 2024
@int-72h int-72h added enhancement New feature or request good first issue Good for newcomers labels Dec 24, 2024
@ktwrd
Copy link
Member

ktwrd commented Dec 27, 2024

The following .reg file can be used as an example for how URI Handlers can be created in Windows. Replace HKEY_CURRENT_USER with HKEY_LOCAL_MACHINE for machine-wide installations, and absolut executable location with the actual location to the executable.

When launched via a URI, the full URI is passed to the program in the 0th item in argv (specified as %1 in the following file)

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Classes\adastral-osprey]
@="URL:Adastral Launcher (Osprey)"
"URL Protocol"=""

[HKEY_CURRENT_USER\SOFTWARE\Classes\adastral-osprey\DefaultIcon]
@="\"C:\\Windows\\System32\\calc.exe\",1"

[HKEY_CURRENT_USER\SOFTWARE\Classes\adastral-osprey\shell]

[HKEY_CURRENT_USER\SOFTWARE\Classes\adastral-osprey\shell\open]

[HKEY_CURRENT_USER\SOFTWARE\Classes\adastral-osprey\shell\open\command]
@="\"absolute executable location\" \"%1\""

This is (most likely) not all the things that are required, since I'm going through some old projects that used a custom URI provider and this is one out of 3 registry keys added, and the launcher would have to be made a single-instance application and some sort of IPC to make sure that URIs get processed by the application. (I'd be willing to help out with this feature btw)

@int-72h int-72h added this to the Beta 1 milestone Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Backlog
Development

No branches or pull requests

2 participants