Commandline: Add support for Non-Steam Games to getGameExe #969
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
More work for #960.
This PR adds support for getting the Game EXE for Non-Steam Games. It returns in the same format, and can also search on game name. This also removes the need for the Non-Steam Game hack of setting the game EXE.
This shouldn't break Steam games either, all existing functionality should be untouched. This just adds support for Non-Steam Games, the same way #963 added support in
gi
andgt
.There is also a small refactor to those functions in this PR. We disable searching on shortcuts by default, to prevent any breakages when trying to search for unknown games names and erroneously falling back to
shortcuts.vdf
when we shouldn't. Searching on Non-Steam Games for these functions is only enabled when we're running from the commandline.Side note: We don't write this out to the meta file, because the information in
shortcuts.vdf
is volatile, as the user can edit the game name or EXE at any time.This PR is ready for merging after a version bump and some more testing.