-
-
Notifications
You must be signed in to change notification settings - Fork 530
[Feat] Added Custom libraries runner #4870
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
base: main
Are you sure you want to change the base?
[Feat] Added Custom libraries runner #4870
Conversation
Can be reused for sideload, i've experienced the same bug running games there
Sorry for all the extra commits everyone. Found a couple more relatively small issues that I wanted to fix which would make the implementation a bit cleaner. Hope you guys weren't in the middle of a review yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea of making it easy to add custom runners is great, however I'm not sure I like the approach this PR took. In my mind, a runner provides games from the same general source that work the same way
What I would like better (and have worked on in the past): Heroic loads "runner plugins" from a directory in its config folder. Every runner plugin is a JavaScript file exporting an object of a certain shape (your work in #4897 comes to mind there, although I'd like to simplify the library/game managers a lot first). They also get a "context" (somehow, perhaps in an init
method?), containing common functions (like downloading or extracting files) they can then use as they wish, similar to the "install tasks" introduced here
With that model, you may create one "runner plugin" for every game you've described in your PR description, with a lot more flexibility (in this PR, the second a game install/launch/etc deviates from the described schema even slightly, you'd need to edit Heroic's source to add new handling, while plugins can be updated independently). The downside there is of course more boilerplate (especially with the current shape of game & library managers; as mentioned, I'd like to slim those down first before a feature like this could be implemented)
Anyways, I'm not really sure where I'm going here. I guess we just both had the same idea at the same time? Let me know what you think of my approach, perhaps we can find something in the middle of both solutions?
On a somewhat related note: As you can tell by this rant, I obviously had an idea like this in mind before already, and have actually worked on code for it (albeit on a local branch). To avoid duplicate/wasted work, would you mind contacting us (ideally on Discord, although an issue in this repo would also be fine) if you have plans for more changes like this, just to allow discussion before the actual code writing starts?
That's ok @CommandMC :) I like your idea of runner plugins, although that would mean you would need more technical knowledge about heroic to create those, while my idea of this implementation was: "Anyone could create a library with only some JSON knowledge and a small readme to understand how to add games". You could ofcourse just do a simple task system in a javascript file like I did in my implementation as well. And then if people would want something more complicated they could create use a "custom task" for more complex stuff. That way you would have the best of both worlds.
Feel free to grab any code from this PR that would fit the need for the runner plugin implementation. I'm just happy to help out :) love the project. Also, I'm already in the Discord. Just not really active there but if you wanna have a chat just ping me. Always up for a chat about this subject, it would be cool to have any similar to this in Heroic. |
This feature adds support for custom JSON-based game libraries to Heroic Games Launcher. You can now add games from any source by providing JSON configuration files that describe your games, their installation tasks, and launch information.
This would allow us to make custom repos of online (and local) game installs that are not available on game platforms like Steam and GOG.
Example JSON:
A more thorough explanation on how it works can be found in the doc file I've included in the PR.
https://github.com/unbelievableflavour/HeroicGamesLauncher/blob/custom-libraries/doc/custom_libraries.md
Use the following Checklist if you have changed something on the Backend or Frontend: