dreamer / luxtorpeda

Steam Play compatibility tool to run games using native Linux engines
https://luxtorpeda.gitlab.io/
GNU General Public License v2.0
383 stars 9 forks source link

[Feature Request] Detect ports already on system & allow to create local packages #78

Closed GregTheMadMonk closed 3 years ago

GregTheMadMonk commented 3 years ago

It would be very nice to see an option to not re-download the same port for every game individually. For example, I already have GZDoom installed on my system, so it would make sense to run supported games through it. Addditionally, for games lacking an official package, it would be great to be able to write manifests manually in ~/.config/luxtorpeda subfolder.

The way it can work is by separating packages into "games" and "runners", kind of like in Lutris, with game first launch sequence looking something like this: 1) Click play. luxtorpeda downloads the game manifest. 2) Game manifest, instead of command, now contains an array of compatible "runners", and looks something like this:

{
    "supported_runners": [ "gzdoom", "zandronum" ],
    "options": {
        "wad": "base/DOOM.WAD"
    }
}

3) Popup: like windows "Open With": top items are runners marked compatible by game manifest, followed by a drop-down list of all other runners (we don't know, maybe game manifest wasn't updated to include a brand new runner in its supported list yet or you've written your own one and put its manifest into ~/.config/luxtorpeda subfolder). In this case, the popup should look like this:

┏━━━━━━━━━━━━━━━━┓
┃Select runner   ┃
┃━━━━━━━━━━━━━━━━┃
┃ GZDoom         ┃
┃ Zandronum      ┃
┃ 🮦 Other       ┃
┃ DoomRTX        ┃
┃ NotEvenDoom    ┃
┗━━━━━━━━━━━━━━━━┛

4) Download manifest for selected runner. It describes how to find one already present on the system, where to download binary from, and how to treat parameters. It may look something like this:

{
    "find_cmd": "whereis gzdoom",
    "source": "https://download.gzdoom/free/no/registration.tar.xz",
    "version": "0.0.0",
    "cmd": "%binary% -iwad %wad%" // %wad% implaces wad option passed from the game
}

5) Offer to download the runner or run an already installed version, if find_cmd found one. If find_cmd failed, maybe offer to pick binary manually from filesystem. 6) If needed download/install the runner 7) Gaming time 😎

It's already possible to run ports via steam by modifying the game command line. E.g., to play Shrine II, I do:

run-game gzdoom -iwad shrine2/ShrineII.ipk3 # %command%

to ignore Steam's attempts to run a GZDoom game in Proton and run native GZDoom (run-game is a script that runs the following command with MangoHud and Feral GameMode). And while this is certainly an option which doesn't even rely on luxtorpeda, for a project like this the feature I've described (IMO) is a must-have.

GregTheMadMonk commented 3 years ago

Duplicated this on luxtorpeda-dev