Skip to content

Look for game data in usual Steam/GOG installation paths #691

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

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

Conversation

Lgt2x
Copy link
Member

@Lgt2x Lgt2x commented Mar 25, 2025

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

Add standard platform paths to look for game data. This makes the game automatically look for not included proprietary game data in classic vendor installation location on all platforms. The objective is not to cover all possible cases, but make the experience seamless for the majority of people.

Tested on Windows 11 with Steam & GoG installation, Linux Mint 22, Fedora 41 & MacOS Sonoma with Steam

Related Issues

Follow up to #628 , also related to #659

cc @Jayman2000 @winterheart

Lgt2x added 4 commits March 25, 2025 20:44
This makes the game automatically look for not included proprietary game data in classic vendor installation location on all platforms. The objective is not to cover all possible cases, but make the experience seamless for the majority of people.
@winterheart
Copy link
Collaborator

I was intended to implement some run-time discovery for installation paths of GOG / Steam since in user environment they may be literally anywhere. For example, mine Steam installation in Windows is placed in C:\Games\Steam directory. Hardcoded paths are OK, but there is much room to improvement.

@Lgt2x
Copy link
Member Author

Lgt2x commented Mar 26, 2025

I could not really think of a better approach than put the default installation path if the user keeps the defaults when installing steam of GOG, and hope for the best. Looking up online, most people seemed to also have games installed at the same location as I did on Windows, did you change the default (or use an older system)?

And how would one dynamically discover steam path without scanning the whole drive, which I don't think is a good idea?

If that works for some/most users that keep the defaults, it's already a valuable improvement in my opinion.

As a fallback, I plan to have a nice GUI using Sdl3 dialog (next PR) to pick up manually the installation path.

@winterheart
Copy link
Collaborator

Well, at least for Windows we can read some Registry paths. Both Steam and GOG (and even legacy standalone installation) has own settings in Registry including installation path. For Linux and macOS it's little more complicated.

And here lies second caveat of hardcoded values: even in Steam with known installation we cannot predict where data actually is: user can add/change storage location for game data. So for Steam case we need make two actions: retrieve installation path and parse libraryfolders.vdf file (it's looks like JSON, but this is not a JSON, we need custom parser) in order to retrieve actual path. Yeah, that's heavy.

@Lgt2x
Copy link
Member Author

Lgt2x commented Mar 27, 2025

That indeed looks tedious, I'm not sure we want to go that far...

@Lgt2x Lgt2x mentioned this pull request Mar 27, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants