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

Implement a basic URL scheme. #308

Merged

Conversation

adityaruplaha
Copy link
Contributor

@adityaruplaha adityaruplaha commented Apr 15, 2021

Fixes #307.

Implementation based on what I read here:
electron-userland/electron-builder#4035
electron/electron#4857

Scheme is a lot like HTTP, except that there's no domain name.
Like heroic://launch?appName=Hazelnut.

@flavioislima
Copy link
Member

Maybe to test you just need to put
open heroic://
on the terminal
or xdg-open, like we are doing with the urls to open the epic login page.

@adityaruplaha adityaruplaha marked this pull request as ready for review April 15, 2021 13:40
@adityaruplaha
Copy link
Contributor Author

adityaruplaha commented Apr 15, 2021

Done. Should work perfectly.

Everything is broken. Fml.

electron/main.ts Outdated Show resolved Hide resolved
@adityaruplaha
Copy link
Contributor Author

adityaruplaha commented Apr 16, 2021

@flavioislima this is ready to be merged, but problem is that the frontend has no idea what just happened. I'll make the backend state-aware and the client can just query it. Would also reduce the global state.

That'll might have to be a seperate PR tho.

@adityaruplaha adityaruplaha added the pr:ready-to-merge This PR is fully ready for merge. label Apr 16, 2021
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'm just not 100% on the user confirmation because if the desktop file will be clicked, then I think it was on porpuse. Steam and lutris don't ask for confirmation for instance. So I think this might not be necessary. But merge it and we can think about that before release.

@adityaruplaha
Copy link
Contributor Author

I'm just not 100% on the user confirmation

I'm not either, but I did it just in case as its easier to remove something than to implement it pre-release.

@adityaruplaha adityaruplaha merged commit 0f55ec6 into Heroic-Games-Launcher:main Apr 17, 2021
@adityaruplaha adityaruplaha deleted the heroic-protocol branch April 17, 2021 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-to-merge This PR is fully ready for merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a registered Heroic protocol.
2 participants