Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gog): make sure game directory is mounted in container #4251

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

imLinguin
Copy link
Member

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@imLinguin imLinguin added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jan 7, 2025
@imLinguin imLinguin requested review from a team, arielj, flavioislima, CommandMC and Nocccer and removed request for a team January 7, 2025 23:49
@arielj
Copy link
Collaborator

arielj commented Jan 8, 2025

how can we test this? like, how can we reproduce the problem this is fixing to know what to look for?

@Etaash-mathamsetty
Copy link
Member

code looks fine, but is this only an issue with gog ?

@imLinguin
Copy link
Member Author

it might affect others as well, I haven't experienced any issues though...

@imLinguin
Copy link
Member Author

what this essentially does is allows to mount game directory during setup. This is crucial especially when mount point is in non-standard location that is not handled by pressure vessel out of the box

@arielj
Copy link
Collaborator

arielj commented Jan 8, 2025

Sorry, not sure what you mean by mount, you mean using the game's install folder as the current working directory?

@imLinguin
Copy link
Member Author

soldier and sniper runtimes are container based and have limited list of paths they expose in container by default. Adding STEAM_COMPAT_INSTALL_PATH env variable does exactly that, makes sure container exposes game directory.
Current working directory was another addition I had to make in order for setup to succeed.

@arielj
Copy link
Collaborator

arielj commented Jan 8, 2025

One more question, I see the installFolderName argument in runWineCommand is passed to setupWineEnvVars as the gameId argument (?) and then that's used as ret.SteamGameId = 'heroic-${gameId}' https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/main/src/backend/launcher.ts#L924, that one doesn't set STEAM_COMPAT_INSTALL_PATH.

The one that sets STEAM_COMPAT_INSTALL_PATH is the line above setupEnvVars https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/main/src/backend/launcher.ts#L767 but we are NOT passing the installFolderName there https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/main/src/backend/launcher.ts#L1156 (the second argument, which is the install dir, is not used)

So I'm really confused how this even works, but I guess it's just me not understanding the steam runtimes (they use the SteamGameId variable as a path? too). Or maybe the cwd change is the one that is fixing the issue you are seeing?

I think there's a problem, that we have to pass the install path to the correct method, I think that's a bug that we are passing the install folder as gameId

I also checked and we are already passing STEAM_COMPAT_INSTALL_PATH with the install path from a different place when launching a game https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/main/src/backend/storeManagers/gog/games.ts#L540

@imLinguin
Copy link
Member Author

Hmm, you are right. Guess that shows I looked into Heroic code long time ago....

@arielj
Copy link
Collaborator

arielj commented Jan 9, 2025

Is this PR meant to fix this Open-Wine-Components/umu-launcher#315 ? because if that's the case it's not working for me

I can run the game with Wine-GE creating the prefix, but I can't run the game with proton-ge+umu creating the prefix (I can't run the game either with proton-ge without umu creating the prefix)

@imLinguin
Copy link
Member Author

imLinguin commented Jan 9, 2025

Are you sure? For me a clean prefix with UMU + Proton-GE-latest works as expected and shows the launcher.
I'm using latest version of umu 1.1.4

obraz

@arielj
Copy link
Collaborator

arielj commented Jan 9, 2025

I'm using umu 1.1.3, maybe that's the issue for me? can heroic download 1.1.4? or I need to do it manually?

Copy link
Collaborator

@arielj arielj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, now that I got 1.1.4 it does work as expected for both witcher 2 and ghost master that I knew had issues 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants