Magnitus: Installers should always have a checksum (even if it means having the workaround applied to them), unless the gog api is treating them like extras for some reason (the way gogcli currently differentiates are that extras return a 403/404 on the xml metadata path if I recall while installers with bad checksums will return something different and invalid).
I'm currently in Japan for 5 weeks visiting my inlaws and not on the computer a lot, but I'll look when I can.
However, if gog doesn't provide a checksum, no rectification on my end will make it so. The main thing I'd do is make sure it behave like other installers with a bad checksum: Either return an error or apply the workaround (ie, mock download the installer to get the checksum which will be verified again for consistency when downloading to storage) depending on what the end-user specifies in the command's flags.
Enjoy your family holiday. :)
Yep, clearly an empty checksum return is not seen as invalid, so I have now catered for that with my GUI, and while I know that your work-around could help, it doesn't for me and might confuse a user of my GUI, if they don't understand all the ins and outs, so I have opted for using a
7-Zip test instead, and if that is successful, then if desired a checksum value is also created. But that only currently applies to Mac and Linux installer files. If a Windows installer file is missing a checksum, then I recommend using
InnoExtract to test the file, or my
GOGPlus Download Checker program, which uses
InnoExtract or
UnRAR or
7-Zip.
Alas InnoExtract testing is much slower than just using the API provided checksum, and in the case where you have one file only, without a checksum, out of several linked installer files, the whole lot is tested, which could result in a very long test, hours potentially, depending on the PC and total game files size.
Still, with the crappy download speed I get with GOG (Fastly CDN), we could be talking a long time anyway to secretly download an installer file without a checksum, to compute one. A 10 GB Linux file for instance would take most of the day to download with
gogcli, and no guarantee it is okay. In fact, I would be better off downloading such files myself twice using the faster downloading options I have access to (i.e.
aria2 or
FDM5 with
curl), and then comparing them.
The good thing about using InnoExtract etc, is that that can occur after the fact, when all downloading is done. I haven't implemented it in my GUI, because of the complexity involved, where it might be just one BIN file or the EXE that is missing a checksum. InnoExtract, as far as I am aware checks all or none. So with 20 linked installer files for instance, you can just imagine how many hours of testing could be involved.
UnRAR (or 7-Zip) can usually check a single BIN file, and 7-Zip an EXE file.
GOGPlus Download Checker cannot currently be forced to check an EXE file with 7-Zip. It will only do that, if the EXE file is not recognized as an InnoExtract one. I could cater for that, but I am yet to come across a scenario, where the EXE is missing a checksum value but any linked BIN files do have checksums. The first time that ever happens, I will of course modify my
GOGPlus Download Checker program.
P.S. Of course, I am usually not relying just on 7-Zip testing for this rare instance of a missing checksum, as we are also using a bytes check for the file. So long as the bytes value isn't also missing, we should be good.
P.S.S. While my GUI uses the 7-Zip test by default, the user can opt for your work-around method instead, via program settings. I do present my reasoning not to, but if the user understands the situation and has a good download speed with
gogcli, then I don't prevent that.