joveian: fd -g 'setup*.exe' -x echo '{}:' \; -x innoextract --test --gog --silent
timppu: So this was on linux, to test the Windows installers?
Yes, however both
fd (
zip) and
innoextract (
zip) are available for Windows so it should just work there as well (or GOGPlus as you mentioned). Well, the --gog thing on innoextract is that some .bin files are just RAR format so you might need
unrar (
exe) as well, although I'm not sure how often that is actually used.
timppu: Did this give you the information of which games or even files have the problem?
Yes, it echos the name of the file and then the output from innoextract, which will either be just a newline (if it tests ok) or the error message. You can then run innoextract --test --gog (without --silent) to get detailed information about the contents depending on the error (for some reason I see empty brackets without file names but highlighting between the brackets shows the file name).
Actually, I found one other error: one random file in Kerbal Space Program 1.12.2 Breaking Ground extracted to the wrong size. It didn't say which one was the correct size. Possibly that might be from a very slightly truncated file as well, although it was well before I noticed issues with any other files so possibly it was just an issue with the build (or I ran out of disk space when downloading, which I've also done several times :/). Since I can't get that file any more, I checked the detailed file info and can get that particular file from a different version if necessary (I think 1.12.2 is the last version before they changed something about the docking that some people didn't like so I wanted to keep it just in case).
timppu: Does it search/test recursively from all subdirectories too, or only the current directory?
The form I gave is recursive, add --max-depth 1 to just search the current directory.
The xe command I gave for testing the Linux installers is not recursive but could be made recursive by:
fd -g '*.sh' | xe -s 'echo -n "$1: "; bash "$1" --check'
I should note that both versions just run all the .sh files with the --check option, so it is good to be careful that all the .sh files are actually GOG installers. It wouldn't be too hard to extract the MD5, figure out the offset (the MD5 applies after the first 519 lines it seems) and check it without executing the script.
Braggadar: Everyone's first stop should be a simple checksum comparison.
Yeah, that would be ideal. I'm not sure what innoextract tests exactly, although from installer description it sounds like there are checksums for the .bin files at least. Looking at the
gogcli description it sounds like the Galaxy API has checksums for the main game files but not the extras. Is that what you mean by the xml files? I checked the API links from gogdb but they don't seem to have file checksums. Most zip files just have a basic CRC I think, which can detect some things but is not reliable.
I've looked at the different downloaders that generous community members have made but I like having everything in one giant directory and that helps me use minimal disk space, although as my collection continues to increase the automated management gets more tempting. There are some used large drives that aren't that expensive.
If anyone from GOG is reading,
blake3 and
bao are the state of the art (bao is the streaming form of blake3 and would allow testing parts of downloads). But even just basic file name + sha256 hash would be great to be able to easily detect CDN issues.