Open main menu

Difference between revisions of "Advanced Detector"

1,800 bytes added ,  22:09, 3 November 2023
Added instructions for using the special prefixes in ADGameFileDescription. Added a comment to the ADGF_MACRESFORK game flag info, marking it as deprecated.
(Added instructions for using the special prefixes in ADGameFileDescription. Added a comment to the ADGF_MACRESFORK game flag info, marking it as deprecated.)
 
Line 170: Line 170:


'''fileSize''' -- file size in bytes. Optional too, set to -1 in order to match against any file size.
'''fileSize''' -- file size in bytes. Optional too, set to -1 in order to match against any file size.
=== Special prefixes ===
The structure can be used to request some additional detection features by adding the following prefixes to the '''md5''' field:
* <code>t:</code> The specified MD5 checksum is counted from the tail of the engine. Equivalent to the '''ADGF_TAILMD5''' ADGameFlag.
* <code>r:</code> The provided file is in MacBinary format. The provided md5 sum is of the file's Resource fork.
* <code>d:</code> The provided file is in MacBinary format. The provided md5 sum is of the file's Data fork.
* <code>A:</code> The provided checksum is for a file embedded inside an archive. See details below.
=== Scanning inside archives ===
In cases where a game was distributed in a compressed format and all its files have commonly-encountered names (e.g. "data1.cab"), we want to avoid adding the archive files to detection entries, since they can generate false positives when detecting, Thus, it becomes useful for the Advanced Detector to scan for files inside these archives. This is supported by doing the following:
* Adding an <code>A:</code> prefix to the '''md5''' field.
* Using the <code><archive type ID>:<archive name>:<file name></code> syntax in the '''fileName''' field.
As an example, the following structure will match with an InstallShield cabinet named "data1.cab", which contains a file named "file.dat". Advanced Detector will extract that file, calculate its checksum, and compare it against the one provided in the '''md5''' field:
{ "is:data1.cab:file.dat", 0, "A:0ea0755ce0254cbce1cd21841ab1b83a", 4480956 }
This is currently only supported for InstallShield v3 cabinets (using the <code>is3:</code> prefix), and InstallShield v5-v13 cabinets (using the <code>is:</code> prefix).


== Game Entry flags ADGameFlags ==
== Game Entry flags ADGameFlags ==
Line 189: Line 207:
'''ADGF_DVD''' -- Specifies a DVD version. Generated target will get '-dvd' suffix.
'''ADGF_DVD''' -- Specifies a DVD version. Generated target will get '-dvd' suffix.


'''ADGF_MACRESFORK''' -- The provided files checksum is in MacBinary (or another format). Thus, only the Mac Res fork is extracted and the MD5 calculated. Use it for all Mac releases.
'''ADGF_MACRESFORK''' -- The provided file's checksum is in MacBinary (or another format). Thus, only the Mac Res fork is extracted and the MD5 calculated. This flag is '''deprecated''', please use one of the special prefixes in the ADGameFileDescription structure.


'''ADGF_NO_FLAGS''' -- No flags are set.
'''ADGF_NO_FLAGS''' -- No flags are set.
37

edits