jaydenmilne / steamsync

Tool to automatically add games from the Epic Games Launcher to Steam
GNU Affero General Public License v3.0
157 stars 17 forks source link

GOG support #16

Open fyr77 opened 2 years ago

fyr77 commented 2 years ago

Hey there, this is a really neat project! I personally prefer Steam for organzing my library, so it would be quite cool if this would support GOG as well.

There is no official API documentation, but there is this: https://gogapidocs.readthedocs.io/en/latest/

Generally, this would probably make most sense to implement using GOG Galaxy installed on the PC, because it has a URL scheme to launch games. When using that you wouldn't need to know the location of the installed games themselves:

\path\to\GalaxyClient.exe /command=runGame /gameId=xxxxxxxxxx

For example, on my PC this would run Gato Roboto:

"C:\Program Files (x86)\GOG Galaxy\GalaxyClient.exe" /command=runGame /gameId=1727534143

For getting the game list, I suppose opening a browser window for authentication would make most sense, as detailed here. This doc here details how to get a listing of games owned by the signed-in account.

I guess you'd need to cache authentication somehow using an embedded browser. Or, to make it a lot easier to implement, just open the desktop browser and ask the user to copy-paste the json from requests.

I sadly do not know python, but if necessary I can try helping with this. If you don't want to do this or don't have time, that's totally fine too - just close the issue again.

Thanks for the cool project all in all!

jaydenmilne commented 2 years ago

Thanks for the interest! GOG has been on my “get to this eventually” list for a while.

Usually there is some local database of installed titles that the UI uses to display the list of launchable games (origin appears to be the exception). For example, with the EGS, it’s a bunch of JSON files in a directory.

If you’d like to help, figuring out where/if this info is recorded would be a huge boon. I’ve used Sysinternal’s Process Explorer for this in the past, you can set up filters and see what files a particular application is reading/writing.

Once we find that out it’s pretty straight forward to add support, as you pointed we just need to get the game ID and run the executable. (Finding the path to the actual game .exe tends to work better with Big Picture though)

On Nov 9, 2021, at 09:07, Jakob @.***> wrote:

 Hey there, this is a really neat project! I personally prefer Steam for organzing my library, so it would be quite cool if this would support GOG as well.

There is no official API documentation, but there is this: https://gogapidocs.readthedocs.io/en/latest/

Generally, this would probably make most sense to implement using GOG Galaxy installed on the PC, because it has a URL scheme to launch games. When using that you wouldn't need to know the location of the installed games themselves:

\path\to\GalaxyClient.exe /command=runGame /gameId=xxxxxxxxxx

For example, on my PC this would run Gato Roboto:

"C:\Program Files (x86)\GOG Galaxy\GalaxyClient.exe" /command=runGame /gameId=1727534143

For getting the game list, I suppose opening a browser window for authentication would make most sense, as detailed here. This doc here details how to get a listing of games owned by the signed-in account.

I guess you'd need to cache authentication somehow using an embedded browser. Or, to make it a lot easier to implement, just open the desktop browser and ask the user to copy-paste the json from requests.

I sadly do not know python, but if necessary I can try helping with this. If you don't want to do this or don't have time, that's totally fine too - just close the issue again.

Thanks for the cool project all in all!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Ugzuzg commented 2 years ago

A sqlite db is at C:\ProgramData\GOG.com\Galaxy\storage\galaxy-2.0.db on Windows. You can get the ids of installed games from InstalledProducts table.