-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for discovering shortcuts #13
Add support for discovering shortcuts #13
Conversation
I potentially have a use case for |
Sure! I think a feature flag would be appropriate. I would also like to know if that shorter value is actually used anywhere. I see the longer value gets used in several places (I think the article in the linked issue referred to it as a legacy steam id). If the shorter value isn't used then I would prefer not to expose it at the moment at least
I should be able to add that too. Shouldn't be a problem |
I just tried adding a shortcut to a Windows program on Linux and enabling Proton (game -> properties -> compatibility), but I think because I'm using VirtualBox, Proton doesn't want to run and won't make the compatdata subfolder, so I can't verify what ID it would use :/ I can at least confirm that creating a desktop shortcut to a non-Steam game on Linux uses the same kind of ID as on Windows. |
I'll give it a shot on my machine later tonight and let you know! |
It looks like the App ID from So, it looks like all we need is to expose the longer of the two IDs as well as adding in parsing for the I'll try to get the changes out tomorrow. Always short on time on weekdays |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely stuff
@WilliamVenner feel free to cut a new release whenever. I already bumped the version |
Done - really sorry about the delay. Busy weekend. We need to get CI setup at some point to publish on tag pushes. |
Resolves #12
(Would love to get your feedback @mtkennerly)
This adds in some basic support for discovering shortcuts. This current implementation just adds a
.shortcuts()
method toSteamDir
that discovers and returns the full listing of shortcuts found (Note: this returns all user's shortcuts). There is an example that makes this easy to try outThe amount of information parsed for each shortcut is pretty slim. I just opted to parse the app id, app name, and executable (this looks like it is either the program name or path to the executable depending on how the user added it). Here is a full listing of some example information converted to JSON using Python's
vdf
package. This should give an idea of what all information is available. If something else seems important to parse then just lmk (Note: also I think Python'svdf
package botches the app id since docs I found say that it should be an unsigned 32-bit LE value. Would be good if someone could double-check that)You can see the information that is parsed out using this library from the new unit test