Jump to content
LaunchBox Community Forums

Recommended Posts

Posted (edited)

I've been waiting for years for the Launchbox devs to include gog.com support as it already exists for Steam and when the plugin API came about I hoped somebody would make a plugin for it.

Since this didn't happen I started doing it myself. It will be another two weeks or so until it's in a state fit for a first release, but until that I thought I show you my progress and maybe somebody can answer some of my questions along the way or want to give some input.

While in theory - with the introduction of the gog Galaxy client and user profiles - everything we are used from steam integration could be implementet in a similar fashion for gog.com, the documentation for this isn't quite complete and also I wanted to start out with the assumption that you don't need to have Galaxy installed for the plugin to work.

So my first challenge was user authentification. Since this is only possible with a browser supporting JavaScipt I shopped for libraries and ended up with CefSharp, a wrapper for the Chrome Embedded Framework for Visula Studio/.Net. After loging in for the first time we receive an acces token for further API calls. To make life (and debugging) easier the token is refreshed before every API call of the plugin and stored in a file in the plugin folder so the session can be kept alive when restarting Launchbox.

Spoiler

gog2.thumb.PNG.2230059279b2e6c6a9a17d4e5fd728d5.PNGgog3.thumb.PNG.e988c993801eca9a055dec7c5f054557.PNG

After that we can get all the game data from gog.com including download paths not only for the game but also for manuals and all the extra stuff!

Spoiler

gog5.thumb.PNG.6a9fea1916d5c69ec636605fe35cf186.PNGgog6.thumb.PNG.88cd46371fee9e222369f4e04b2caf67.PNG

The next step will be adding the games to the Launchbox collection and implementing a hook to ask for the download of a game when attempting to play it and set the proper application path after that. A lot of other stuff is imaginable, like downloading and adding extras like manuals and wallpapers from the context menu, proper integration with Galaxy client if installed, implementing gog.com Achievments in the Retro Achievments API and so on...

At the moment I still have a problem with plugin loading: CefSharp comes with it's own binary and a lot of additional class libraries. It seems Launchbox tries to load them as plugins (even after moving them to a subfolder of the plugin folder). While it doesn't break anything it causes a ton of pop ups like the one below. Is there a way to prevent this?

gog1.thumb.PNG.a9459280a5eea6ca5ba3a39160f195fe.PNG

Edited by wasili
  • Like 4

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×