Skip to content

Automatically detect (some) non-steam games #33

@pinusc

Description

@pinusc

Thank you for making this amazing plugin!

While automatically detecting all non-steam games is obviously impossible, it should be possible to detect games added by certain managers such as lutris or bottles.

Bottles provides a CLI that can be used to extract paths of executables:

$ flatpak run --command=bottles-cli com.usebottles.bottles list bottles
Found 1 bottle:
- mygames
# then for each result
$ flatpak run --command=bottles-cli com.usebottles.bottles --json programs -b mygames
{"executable": "minit.exe", "arguments": null, "name": "minit", "path": "/run/media/mmcblk0p1/Games/minit/minit.exe", "folder": "/run/media/mmcblk0p1/Games/minit", "icon": "com.usebottles.bottles-program", "script": null, "dxvk": null, "vkd3d": null, "dxvk_nvapi": null, "fsr": null, "pulseaudio_latency": null, "virtual_desktop": null, "removed": null, "id": "7d401ec1-b261-40c0-a272-6d73df093c72"}]

Then steam games added via bottles (something that bottles itself does automagically) have target xdg-open and launch options e.g. bottles:run/'games'/'minit'

Lutris is even easier:

$ net.lutris.Lutris --list-games --json
[
  {
    "id": 15,
    "slug": "bloodlines",
    "name": "Bloodlines",
    "runner": "wine",
    "platform": "Windows",
    "year": null,
    "directory": "/run/media/mmcblk0p1/Games/Bloodlines",
    "playtime": "1:21:18.120709",
    "lastplayed": "2024-09-02 19:36:01"
  },
  {
    "id": 5,
    "slug": "celeste",
    "name": "Celeste",
    "runner": "linux",
    "platform": "Linux",
    "year": null,
    "directory": "/run/media/mmcblk0p1/Games/Bloodlines",
    "playtime": "0:00:12",
    "lastplayed": "2022-08-08 20:43:28"
  }]                                                    

The above information (both for lutris and bottles) doesn't conclusively identify which SD card a game is installed on, but MicroSDeck could in theory check for the existence of these files when run with a SD card inserted and do the rest.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions