Difference between revisions of "Advanced Detector"

Jump to navigation Jump to search
1,806 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.
(→‎Game Entry flags ADGameFlags: -- described new flags, fixed some grammar)
(Added instructions for using the special prefixes in ADGameFileDescription. Added a comment to the ADGF_MACRESFORK game flag info, marking it as deprecated.)
 
(One intermediate revision by one other user not shown)
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.
Line 207: Line 225:
'''ADGF_UNSUPPORTED''' -- The game detection will not launch. Instead, a message from the '''extra''' field will be presented to the end-user. Used for knowingly broken versions or those that require additional code which is not yet implemented and we still want to document their presence.
'''ADGF_UNSUPPORTED''' -- The game detection will not launch. Instead, a message from the '''extra''' field will be presented to the end-user. Used for knowingly broken versions or those that require additional code which is not yet implemented and we still want to document their presence.


'''ADGF_USEEXTRAASTITLE''' -- Instead of '''description''' specified in ''PlainGameDescriptor'' table, '''extra''' field will be used as game description. Good example is AGI fan games where the game title is known, but it is not feasible to add it to ''PlainGameDescriptor'' table, or minor composer engine demos with games combined for the same reason.
'''ADGF_USEEXTRAASTITLE''' -- Instead of '''description''' specified in ''PlainGameDescriptor'' table, '''extra''' field will be used as game description. A good example is AGI fan games where the game title is known, but it is not feasible to add it to the ''PlainGameDescriptor'' table, or minor composer engine demos with games combined for the same reason.


'''ADGF_WARNING''' -- Specifies a game that produces a specified warning on launch. The warning is provided (usually in a translatable form) in the '''extra''' field. The game will proceed to be launched, in contrast to '''ADGF_UNSUPPORTED''' flag.
'''ADGF_WARNING''' -- Specifies a game that produces a specified warning on launch. The warning is provided (usually in a translatable form) in the ''extra'' field. The game will proceed to be launched, in contrast to the ''ADGF_UNSUPPORTED'' flag.


== Advanced Detector flags ADFlags ==
== Advanced Detector flags ADFlags ==
37

edits

Navigation menu