tkashkin / GameHub

All your games in one place
https://tkashkin.github.io/projects/gamehub
GNU General Public License v3.0
2.23k stars 128 forks source link

Use Lutris' install scripts #425

Open poperigby opened 4 years ago

poperigby commented 4 years ago

It would be a good idea to pull from Lutris' library of runners, which are scripts that users can create to make installation of games easier.

tkashkin commented 4 years ago

That would likely require to reimplement parts of Lutris' functionality in GameHub. I think it would be better to interact with Lutris and import games from it instead of reimplementing its parts.

Related: #395

poperigby commented 4 years ago

Shouldn't GameHub be able to stand on it's own without requiring Lutris to be installed?

tkashkin commented 4 years ago

I haven't looked into Lutris code too much, but if I understand it correctly, runners are Python scripts that are part of Lutris and they depend on most of the its codebase.

The easiest and probably the only way to support them is to just delegate it to Lutris itself and implement games import and interaction with Lutris. Essentally GameHub becomes a "frontend" for Lutris and calls it to manage everything in this case.

appoloin commented 4 years ago

I think the term Runner has been missed used here, a Lutris Runner is ScummVM, Dosbox, or Wine. The game install scripts are not Runners, all the scripts do it described install procedure. The script below will create a wine prefix named aagent, then ask for the path too and run the setup.exe using wine.

name: aagent game_slug: aagent version: Installer slug: aagent runner: wine

script: game: exe: $GAMEDIR/drive_c/GOG Games/Agent A A Puzzle in Disguise/AgentA.exe prefix: $GAMEDIR

files:

poperigby commented 4 years ago

You're right. I meant to say install scripts.

tkashkin commented 4 years ago

Maybe GameHub could support at least some subset of install scripts, but that would probably also require at least some parts of Lutris to be reimplemented.

Lutris probably allows to run custom scripts, but I think most users will download them from the Lutris website. GameHub currently does not depend on anything other than game sources (Steam/GOG/Humble/...), metadata providers and WineWrap wrappers if user wants to use them.

These scripts also mention Lutris runners and tasks directly by name, essentially using Lutris as a kind of API. GameHub would need to somehow map Lutris' runners and tasks to similar existing GameHub things and/or have some sort of compatibility layer to handle install scripts.

In my opinion the easiest and the best way to fully support them it to just let Lutris handle them.

appoloin commented 4 years ago

That was a simple script, I've seen scripts that can change the version wine, or dxvk, install patches/cracks, download and run Cdrtools to rip a cd, there's a script that uses Dosbox to extract the game files for Scummvm.

What about adding tutorials on how to install games, or how to write WineWrappers? Can WineWrappers be used to install a Dosbox, ScummVM, ResidualVM games, or extract AGS game files so they can run natively?