redromnon / HeroicBashLauncher

Directly launch any Epic Games Store and GOG game from anywhere without Heroic on Linux.
GNU General Public License v3.0
353 stars 17 forks source link

Heroic flatpak incorrectly detected as appimage #35

Closed eresonance closed 2 years ago

eresonance commented 2 years ago

I assume I'm doing something wrong here but the install instructions are pretty simple so I'm not sure what it is. I'm using the steam deck, 2.3.0 and 2.4.0 flatpak ver of the bash launcher, and I'm using heroic v2.2.6 installed from Discover. Both releases of the bash launcher show the exact same issue.

Failed message saying it looks like using heroic via appimage but there are no errors in the log.

Log (paraphrased):

Using Heroic... Flatpak version...
3.32.0
Checking if Zenity...:

Done! Now creating...

The Witcher 3... [1495134320]...

And that's it, no scripts are created in the GameFiles directory.

redromnon commented 2 years ago

What was the exact failed message that you got?

eresonance commented 2 years ago

Title: Failed

Looks like you are using Heroic via AppImage

Make sure to keep Heroic running and try again

I did of course try running Heroic and then launching the setup.sh script but that didn't work. If you have any suggestions let me know!

redromnon commented 2 years ago

Can you confirm if you have the following directory paths on your Deck? /var/lib/flatpak/app/com.heroicgameslauncher.hgl and home/deck/.var/app/com.heroicgameslauncher.hgl

eresonance commented 2 years ago

Yes, both of those seem to be available. /home/deck is obviously RW by the deck user. /var/lib one is owned by root and deck user has readonly.

As an aside, I need to get a USB-C hub or something so I can plug in a proper keyboard & mouse. It's really painful to use the little squares for navigating on this guy 😢

Supreeeme commented 2 years ago

I've been investigating this myself, it's the getbinary function (in checkbinary.py) I don't think the altLegendaryBin key exists in the default Heroic config. I got a KeyError when I checked the exception being thrown.

Supreeeme commented 2 years ago

I have no idea what changed but I can't get that KeyError to appear again, suddenly it went away... eresonance, would you be willing to post your config.json so I can tell if I'm going crazy? It's under /home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/config.json

redromnon commented 2 years ago

Can you both try using v2.4.1 and see if you can spot any errors in the log?

CJPrez commented 2 years ago

@redromnon, I was getting the same error while using the v2.4.1 release, but figured out what changed it.

The logs reported: KeyError: 'altLegendaryBin'

I checked the config file and altLegendaryBin was indeed missing. I went into the Heroic launcher and checked the settings, but didn't change any. After that the altLegendaryBin was automatically added to the config file.

Now I get a new error, that appears to be related to adding the artwork. The game does get added to the steam library though.

The new error from the logs is:

  File "steam.py", line 134, in addtosteam
  File "artwork.py", line 27, in addartwork
FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/.steam/steam/userdata/<USERID>/config/grid'

When I browse to that file path I can get all the way to the config folder, but there is no grid file in it.

CJPrez commented 2 years ago

Ummkay, I fixed the above error by just manually making the grid folder inside the steam config folder. So in short these are the things I did to unblock the script:

  1. Open the Heroic Launcher and go to settings so that the altLegendaryBin property gets added to the Heroic config.
  2. Go into your /home/deck/.steam/steam/userdata/<USERID>/config/ folder and create a new folder named grid

I would imagine it wouldn't be too difficult to fix both of those in the scripts. The altLegendaryBin property should just be treated as a blank string if it doesn't exist (it's default value is a blank string anyway). The config folder could be created if it doesn't already exist.

Side note - The artwork does show up in the library page, but it only contains the poster style artwork so it is a grey box for some aspects of the Steam UI (like the Recent Games first card).

redromnon commented 2 years ago

There's already a PR for creating the 'grid' if it doesn't exist - #37

As for altLegendarybin and altGogdlBin, it looks similar to an issue I encountered a long time ago. It was with the launch parameters. I'll handle that myself.

redromnon commented 2 years ago

Side note - The artwork does show up in the library page, but it only contains the poster style artwork so it is a grey box for some aspects of the Steam UI (like the Recent Games first card).

Yeah, I've just provided initial support for artwork so that your library doesn't feel empty. I'm working on that too. By the way, the Recent Games artwork is the same as the background right?

redromnon commented 2 years ago

Both issues should be fixed in v2.4.2.

eresonance commented 2 years ago

Tested from main, works great, thanks!