AD: Extend detection code to scan inside archives #5239
Thank you for the review @sev- ! I've made the relevant fixes and left notes for the rest of your comments.
This is needed for cases where SearchMan is not applicable (e.g. during detection)
Added the A: prefix to detection md5 sums, which is used to signify that the desired file is embedded within an archive. Added support for similar prefixes in filenames, which should look like the following example: is:data1.cab:file.dat Where "is" is the identifier for InstallShield archives, "data1.cab" is the name of the archive container file, and "file.dat" is the name of the file whose md5 sum will actually be calculated.
Detection entries for compressed game variants now have an additional file entry for ciftree.dat, which uses the newly introduced feature for scanning inside archives. The few entries which I don't own have been temporarily disabled. Also, a couple new compressed entries have been added; these were previously put on hold for after the scanning feature was implemented.
Renamed MD5CacheManager to AdvancedDetectorCacheManager, and added facilities for storing open archives inside it. This way an archive that was opened by an AdvancedDetector will be kept in memory until the end of the detection, so other entries/engines that will look inside it won't have to reopen it and reread its data every time.
InstallShield V3 archives are a completely different format and have their own Archive subclass; this commit allows AdvancedDetector to look inside them. Also moved around some of the relevant logic and added more comments to make the code more readable.
Cleaned up the functions md5PropToGameFile() and md5PropToCachePrefix() so they no longer work through a tree of switches. Both functions have also been changed to return a Common::String.