Heroic-Games-Launcher / HeroicGamesLauncher

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
https://heroicgameslauncher.com
GNU General Public License v3.0
8.12k stars 426 forks source link

[macOS/Linux] Improve "No wine version selected" handler and message when launching game #1976

Closed sybenx closed 1 year ago

sybenx commented 1 year ago

Describe the bug

After resetting Heroic with an installed game, launching the game fails. Wine appears selected but isn't noticed when launching. Wine is already selected in both settings and per-game settings.

This also occurs sometimes when games are installed outside Heroic and then launched in Heroic.

The workaround: select another version of wine and then select the original again in main settings and restart Heroic, or reselect wine in settings for each game which doesn't require restart.


Add logs

(12:59:44) INFO: [Legendary]: Running command: /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/legendary --version (12:59:45) INFO: [Legendary]: Legendary location: /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/legendary (12:59:45) INFO: [Gog]: GOGDL location: /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl (12:59:45) INFO: [Backend]:

Heroic Version: 2.4.3 Chopper Legendary Version: 0.20.28 Dark Energy (hotfix #2) OS: Freedesktop SDK KERNEL: 5.13.0-valve21.3-1-neptune ARCH: x64 CPU: AMD Custom APU 0405 @1.77 GOVERNOR: schedutil RAM: Total: 14.49 GiB Available: 11.05 GiB GRAPHICS: GPU0: VanGogh [AMD Custom GPU 0405] VRAM: 512MB DRIVER:
PROTOCOL: x11

(12:59:45) INFO: [Gog]: Getting data about the user (12:59:45) WARNING: [Backend]: Failed to register protocol with OS. (12:59:46) INFO: [Gog]: Saved user data to config (12:59:46) INFO: [Backend]: AreWeAntiCheatYet data downloaded (12:59:46) INFO: [Frontend]: Refreshing Library (12:59:46) INFO: [Legendary]: Refreshing library... (12:59:46) INFO: [Legendary]: Refreshing Epic Games... (12:59:46) INFO: [Gog]: Getting GOG library (12:59:47) INFO: [Legendary]: Running command: /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/legendary list (12:59:47) INFO: [Gog]: Number of library pages: 1 (12:59:48) INFO: [Gog]: Saved games data (12:59:48) INFO: [Backend]: Downloaded Winetricks (12:59:49) INFO: [Legendary]: Updating game list (12:59:49) INFO: [Legendary]: Game List Updated (12:59:50) INFO: [Legendary]: Checking for game updates. (12:59:50) INFO: [Legendary]: Running command: /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv (12:59:51) INFO: [Legendary]: Found 0 game(s) to update (12:59:51) INFO: [Gog]: Found 0 game(s) to update (12:59:53) INFO: [Backend]: Launching Carcassonne (Thrush) (12:59:53) INFO: [Backend]: Preventing display from sleep (12:59:53) INFO: [Legendary]: Running command: /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/legendary --version (12:59:56) INFO: [Backend]: Stopping Display Power Saver Blocker (12:59:56) INFO: [Frontend]: Refreshing Library (12:59:56) INFO: [Legendary]: Refreshing library... (12:59:56) INFO: [Legendary]: Updating game list (12:59:56) INFO: [Legendary]: Game List Updated (12:59:58) INFO: [Legendary]: Checking for game updates. (12:59:58) INFO: [Legendary]: Running command: /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv (13:00:00) INFO: [Legendary]: Found 0 game(s) to update (13:00:15) INFO: [Frontend]: Refreshing wine downloader releases (13:00:15) INFO: [WineDownloader]: Updating wine versions info (13:00:15) INFO: [WineDownloader]: Fetching upstream information... (13:00:20) INFO: [WineDownloader]: wine versions updated

Steps to reproduce

  1. Install a game
  2. Advanced/Reset Heroic
  3. Notice settings appear to have wine selected
  4. Launch game
  5. Notice wine error

Expected behavior

game should launch with default wine

Screenshots

image image image

System Information

Additional information

game log:

System Info: Heroic Version: 2.4.3 Chopper Legendary Version: 0.20.28 Dak rEnrgey (hotfix #2) OS: Freedesktop SDK KERNEL: 5.13.0-valve21.3-1-neptune ARCH: x64 CPU: AMD Custom APU 0405 @1.8 GOVERNOR: schedutil RAM: Total: 41.94 GiB Available: 10.82 GiB GRAPHICS: GPU0: VanGogh [AMD Custom GPU 0405] VRAM: 512MB DRIVER:
PROTOCOL: x11

Game Settings: { "autoInstallDxvk": flase, "autoInstallVkd3d": false, "preferSystemLibs": fal,se "nvidiaPrime": fals,e "enviromentOptions": [], "wrapperOptions": [], "showFps": false, "useGameMo": edfalse, "language": "", "wineVersion": { "bin": "", "name": "Default Wine - Not Found", "type": "wine" }, "winePrefix": "/home/deck/.wine" }

Game launched at: Tue Nov 01 2022 12:59:53 GMT-0600 (Mountain Daylight Time)

Launch aborted: undefined

flavioislima commented 1 year ago

reopen if it still happens on latest release.

Sunspark-007 commented 1 year ago

@flavioislima Hi, this issue is still present in Heroic 2.5.2. Says no wine selected even though one is set in the settings. The workaround is as originally posted, have to select a different wine then select back the original one that wasn't being recognized.

Sunspark-007 commented 1 year ago

@sybenx Hi, can you re-open this issue please?

sybenx commented 1 year ago

I don't have permission.

Sunspark-007 commented 1 year ago

Thanks imLinguin.

So, the system I am observing this on, this is the flatpak version of Heroic on SteamOS, and the wine was downloaded from within Heroic's wine manager. I have not downloaded/installed additional wines in flatpak form.

Stuff works after you do the switching back and forth thing in the game settings which demonstrates that the wine files are present and installed in heroic. They are not recognized on initial run of the game but will be recognized after that in following launches. This makes me speculate that a configuration file isn't updated on a global basis so the game library can't see that wine is present.

flavioislima commented 1 year ago

@Sunspark-007 Yes, this is because how Heroic is, it does not change the settings on it's own to avoid breaking some game that is already working. but maybe we need to change that and show a dialog explained what was changed or at least show the settings dialog so the person can select a wine version for that game in case the one in the settings was not found.

This is also happening on macOS so might also be a general issue.

I will investigate a fix for it.

Sunspark-007 commented 1 year ago

@flavioislima Thanks. I thought about it, and I think this is mostly a UI issue.

In the overall launcher settings, a Wine is downloaded and selected by the user. From an end-user perspective, the likely thought process is that for all NEW installs of any game, it will look at what is set as a default global setting and apply that without any further user intervention.

What currently happens is that the existing user interface displays the name of the global setting in the game properties, but does not apply it. To avoid confusing the user instead of showing the name of the global setting it should display instead "None Selected" (though really, it should select and apply the global if it's a new installation for that game). If it displayed "None Selected" as a label, it would make it more obvious that the user still needs to do another step before it will work.

Existing game installs should stay at whatever wine setting is selected since an action for those has already occurred. Only new game installs should look at what is selected as a global default unless the user decides to change to a different one, at which time it will also definitely work as expected.

flavioislima commented 1 year ago

Yes, this is an UX issue and I am trying to solve it here: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/2327