erri120 / GameFinder

.NET library for finding games.
GNU General Public License v3.0
57 stars 5 forks source link

Support Heroic Games Launcher #108

Open MattSturgeon opened 12 months ago

MattSturgeon commented 12 months ago

Many users prefer to use the Heroic Games Launcher, instead of the various official games launchers it replaces. This is especially true on Linux, where it is a native & well integrated application, unlike most official launchers.

Heroic makes use of store-specific tools (currently Legendary, gogdl & Nile). These tools can be used separately from Heroic to install & launch games owned on the respective store. However I don't think those tools keep track of and "manage" installed games, per-se. (Might be wrong about that, I've not used those tools directly).

Heroic can be installed via Flatpak, AppImage, via distro packages or manually from a tarball. This probably won't be too relevant since regardless of Heroic's installation method, users can install games to any location they wish on their system. Although, Heroic's cache & config will be at a different path when it's installed as a flatpak.

Since users can install games anywhere, would probably need to scan the relevant config/list/database that catalogs installed games.

erri120 commented 1 month ago

Some research notes:

Heroic writes data to app.getPath(userData). A list of installed GOG games can be found in gog_store/installed.json:

{
    "installed": [
        {
            "platform": "windows",
            "executable": "",
            "install_path": "/home/user/Games/Heroic/Treasure Adventure Game",
            "install_size": "105.91 MiB",
            "is_dlc": false,
            "version": "1.0",
            "appName": "1207659013",
            "installedDLCs": [],
            "language": "en-US",
            "versionEtag": "\"1232499704\"",
            "buildId": "51402546720039850",
            "pinnedVersion": false
        }
    ]
}
MattSturgeon commented 1 month ago

Heroic writes data to app.getPath(userData).

Note: when heroic is installed using flatpak, this won't be the same XDG_DATA_HOME that "normal" programs see (~/.local/share by default).

Flatpak gives its sandboxed apps a) an overlayed $HOME directory and b) custom XDG dirs, usually in ~/.var/app/com.heroicgameslauncher.hgl.


When NM.A is installed "normally" it should be trivial to also scan flatpak's sandbox locations from the host environment, however if NM.A ever supports being installed as a flatpak, then accessing the host system (or other flatpaks) becomes more difficult.

Though that's a much wider issue mostly unrelated to this one.