wasili Posted June 12, 2018 Share Posted June 12, 2018 (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 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 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? Edited June 12, 2018 by wasili 5 Quote Link to comment Share on other sites More sharing options...
Klopjero Posted June 18, 2018 Share Posted June 18, 2018 Looking forward to this keep the spirits up! 1 Quote Link to comment Share on other sites More sharing options...
wasili Posted June 24, 2018 Author Share Posted June 24, 2018 (edited) Here it is, the first version of the plugin! I was able to resolve the problem with plugin loading by simply pointing to the CefSharp binary that already comes with Launchbox. Also working with the galaxy client turned out to be much easier, so for now the full functionality requires it to be installed. You can still import the games without but there will be no automatic replacement of the installer download link with the executable path of the game. For more Info see the github page here: https://github.com/GrafWasili/gogPluginForLaunchbox Edited November 1, 2018 by wasili Updated link to file 2 Quote Link to comment Share on other sites More sharing options...
Klopjero Posted June 25, 2018 Share Posted June 25, 2018 I must be doing something wrong... it's not loading. I've extracted the files to the plugins folder, unblocked the files using powershell. firedup LB... nothing.. how do i know if the plug in works ? Quote Link to comment Share on other sites More sharing options...
wasili Posted June 26, 2018 Author Share Posted June 26, 2018 (edited) You only need the files in the bin folder, copy to them to a new subfolder in the plugins folder. (should be gogplugin.dll, gogplugin.dll.config and newtonsoft.json.dll) Than you should find "Add games from gog.com" in the tools menu. Also it only works on 64bit right now, forgot to mention that, sorry . If you need a 32bit version let me know... Please let me know if it still won't work. Edited June 26, 2018 by wasili Quote Link to comment Share on other sites More sharing options...
Bunglezbawb Posted June 26, 2018 Share Posted June 26, 2018 This is working great for me. Thank you. 1 Quote Link to comment Share on other sites More sharing options...
Klopjero Posted July 3, 2018 Share Posted July 3, 2018 (edited) Sorry for not reporting back.. it works now.. this hairless ape that is sitting behind the keyboard was working out of launchbox.next it works, it works in launchbox! thanks ! Edited July 3, 2018 by Klopjero Quote Link to comment Share on other sites More sharing options...
Strathos70 Posted October 31, 2018 Share Posted October 31, 2018 Thank you for this plugin. Now that the launchbox next became the default launchbox, are you planning to make this compatible? Quote Link to comment Share on other sites More sharing options...
wasili Posted November 1, 2018 Author Share Posted November 1, 2018 You're welcome! I would, but the plugin API documentation hasn't been updated for Launchbox Next and there's no info on how to make plugins compatible, at least when I last checked. If anybody could point me in the right direction tough... Quote Link to comment Share on other sites More sharing options...
Klopjero Posted November 1, 2018 Share Posted November 1, 2018 maybe @Jason Carr can shed light on the subject Quote Link to comment Share on other sites More sharing options...
wasili Posted November 1, 2018 Author Share Posted November 1, 2018 (edited) I think I found the reason From skimming the thread I take that the plugin should work with the latest beta release. Did anybody try? Edited November 1, 2018 by wasili Quote Link to comment Share on other sites More sharing options...
Strathos70 Posted November 1, 2018 Share Posted November 1, 2018 I use launchbox version 9 beta 7 and here is what i get : Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted November 1, 2018 Share Posted November 1, 2018 Everything in the plugin API documentation is definitely still accurate, but it does need updated with a few new things. Really the only thing missing now is that you can't directly access the main form (because it no longer exists). Most plugins should also already be fully compatible as long as they're using the advertised/documented features and not diving into undocumented stuff. Looking at the error above, it looks to be unrelated to differences between .Next and the OG interface. 1 Quote Link to comment Share on other sites More sharing options...
wasili Posted November 1, 2018 Author Share Posted November 1, 2018 (edited) Thanks @Jason Carr for clarifying and and thanks @Strathos70 for confirming that the plugin does work with the current Launchbox Next version. I updated the file description accordingly. I could not have tested it myself since I''m using Big Box and didn't renew my license for a while... Regarding your Problem: Could you post your output of https://embed.gog.com/account/gameDetails/2.json ? Edited November 1, 2018 by wasili Quote Link to comment Share on other sites More sharing options...
Strathos70 Posted November 1, 2018 Share Posted November 1, 2018 (edited) My screenshot show one error, but i actually get that error that all games until i close launchbox. Here it is: { "title": "Fallout 2 Classic", "backgroundImage": "//images-1.gog.com/2405d078c16fc6b25414d2f08725596b955f5ca899ae30f317de7269dfefa22b", "cdKey": "", "textInformation": "", "downloads": [ [ "English", { "windows": [ { "manualUrl": "/downloads/fallout_2_classic/en1installer0", "downloaderUrl": "gogdownloader://fallout_2_classic/installer_win_en", "name": "Fallout 2 Classic", "version": null, "date": "", "size": "721 MB" } ], "mac": [ { "manualUrl": "/downloads/fallout_2_classic/en2installer1", "downloaderUrl": "gogdownloader://fallout_2_classic/installer__en", "name": "Fallout 2 Classic", "version": null, "date": "", "size": "591 MB" } ] } ], [ "français", { "windows": [ { "manualUrl": "/downloads/fallout_2_classic/fr1installer1", "downloaderUrl": "gogdownloader://fallout_2_classic/installer_win_fr", "name": "Fallout 2 Classic", "version": null, "date": "", "size": "721 MB" } ] } ], [ "Deutsch", { "windows": [ { "manualUrl": "/downloads/fallout_2_classic/de1installer1", "downloaderUrl": "gogdownloader://fallout_2_classic/installer_win_de", "name": "Fallout 2 Classic", "version": null, "date": "", "size": "689 MB" } ] } ] ], "galaxyDownloads": [], "extras": [ { "manualUrl": "/downloads/fallout_2_classic/2233", "downloaderUrl": "gogdownloader://fallout_2_classic/2233", "name": "manual (166 pages)", "type": "manuals", "info": 1, "size": "1 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2253", "downloaderUrl": "gogdownloader://fallout_2_classic/2253", "name": "HD wallpaper", "type": "wallpapers", "info": 1, "size": "6 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2283", "downloaderUrl": "gogdownloader://fallout_2_classic/2283", "name": "Fallout series wallpaper", "type": "wallpapers", "info": 1, "size": "7 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2243", "downloaderUrl": "gogdownloader://fallout_2_classic/2243", "name": "reference card", "type": "guides & reference ", "info": 1, "size": "1 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2303", "downloaderUrl": "gogdownloader://fallout_2_classic/2303", "name": "Fallout Bible (205 pages)", "type": "guides & reference ", "info": 1, "size": "54 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2263", "downloaderUrl": "gogdownloader://fallout_2_classic/2263", "name": "original soundtrack", "type": "audio", "info": 1, "size": "83 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2273", "downloaderUrl": "gogdownloader://fallout_2_classic/2273", "name": "avatars", "type": "avatars", "info": 13, "size": "1 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2313", "downloaderUrl": "gogdownloader://fallout_2_classic/2313", "name": "Vault Boy avatars", "type": "avatars", "info": 5, "size": "1 MB" }, { "manualUrl": "/downloads/fallout_2_classic/2293", "downloaderUrl": "gogdownloader://fallout_2_classic/2293", "name": "artworks", "type": "artworks", "info": 2, "size": "2 MB" } ], "dlcs": [], "tags": [ { "id": "427940348", "name": "3RPG ----- BAZ", "productCount": "65" } ], "isPreOrder": false, "releaseTimestamp": 0, "messages": [], "changelog": "", "forumLink": "https://embed.gog.com/forum/fallout_series", "isBaseProductMissing": false, "missingBaseProduct": null, "features": [], "simpleGalaxyInstallers": [ { "path": "/downloads/fallout_2_classic/b1b67858e6701ddb76a1b6c1a04e7bd3", "os": "windows" }, { "path": "/downloads/fallout_2_classic/e671c7410bdf555092ff79fc43b2deb7", "os": "mac" } ] } Edited November 1, 2018 by Strathos70 Quote Link to comment Share on other sites More sharing options...
wasili Posted November 3, 2018 Author Share Posted November 3, 2018 It fails at "tags": [ { "id": "427940348", "name": "3RPG ----- BAZ", "productCount": "65" } ], There's no official specification of the api responses but this seems more like a messed up entry in gogs database anyway. I'm working on implementing error handling for the json parser right now to make the plugin more robust and allow the import of games with incomplete or unexpected game information which should prevent such errors. Quote Link to comment Share on other sites More sharing options...
Jade Aislin Posted January 14, 2019 Share Posted January 14, 2019 On 11/3/2018 at 2:18 PM, wasili said: It fails at "tags": [ { "id": "427940348", "name": "3RPG ----- BAZ", "productCount": "65" } ], There's no official specification of the api responses but this seems more like a messed up entry in gogs database anyway. I'm working on implementing error handling for the json parser right now to make the plugin more robust and allow the import of games with incomplete or unexpected game information which should prevent such errors. First, I want to thank you for making this plugin. I have many GOG games and this plugin makes it very easy to get them into launchBox. However, like the steam import, I am unable to get a few games. I cannot seem to get 4 of my GOG games and I get 4 errors when I use the plugin. So, I was wondering if you had made any progress on the error handling? If not, it's still a great plugin. 1 Quote Link to comment Share on other sites More sharing options...
wasili Posted February 2, 2019 Author Share Posted February 2, 2019 Thanks I just uploaded the last version of the plugin that was sitting on my hard drive for the last three months. Parsing errors should now be skipped and logged @Strathos70, but games with incomplete or ill-formed information will still be skipped @Jade Aislin. I didn't have the time to further improve the plugin (and won't have it in the near future...). So as long as nobody else does the job we will have to content ourselves with the basic functionality it provides and handle the games that can't be imported manually... Quote Link to comment Share on other sites More sharing options...
Kuvenant Posted April 25, 2019 Share Posted April 25, 2019 Just discovered this today. Like the idea. My collection on GOG is still quite small, though I am certain there are more than a few out there with massive collections that would find this VERY useful. Perhaps you could get the word out by seeing if this could be covered in one of the semi-regular Launchbox videos? Quote Link to comment Share on other sites More sharing options...
wasili Posted May 14, 2019 Author Share Posted May 14, 2019 Thanks If the Launchbox team wants to do a video on it they are free to do so and I would be humbled But I think the plugin also shows up if you search for launchbox and gog.com on google so i guess people who are looking for something like this should find it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.