276 Commits
Author SHA1 Message Date
Eugene Sandulenko d5702c810a ENGINES: Clarify ADGF_TESTING flag behavior
It appears that we never showed it, because it was shown only
in the release builds, and in the release builds we were removing
this flag.

This change introduces new message inviting users to report bugs,
it is shown always and could be disabled by the same
"enable_unsupported_game_warning" scummvm.ini key
2026-05-16 23:31:46 +02:00
Paul Gilbert 3713880be1 ENGINES: Added getGameId for getting gameId from a target 2026-04-20 15:23:19 +10:00
Miro Kropacek 8f5741a37a AD: Skip detection for engines with no matching filenames
When adding a game, every engine's detection table is traversed twice
(once for MD5 pre-computation, once for matching) even if the game
folder contains none of the files that engine cares about.

Build a set of all unique filenames referenced by each engine's
detection entries during preprocessDescriptions() (called once and
cached). Before entering the expensive detection loops, check if any
file in the game folder exists in this set. If not, skip the engine
entirely.

On the Atari backend with ~60 statically linked engines, this reduces
the "Add game" time by about 30-40%.
2026-04-19 13:36:54 +02:00
Eugene Sandulenko b665b19a29 AD: Enhance logic for computing candidates, added more debug output
Now we will always try to find candidate with biggest amount
of files and report that, instead of the first partially
matched version.
2026-03-03 01:13:47 +01:00
Łukasz Lenkiewicz aa9973aa98 GUI: Add gui options for additional platform detection 2025-09-06 14:10:59 +02:00
Łukasz Lenkiewicz 868a582fcf GUI: Restrict platform selection based on detection tables
Restrict platform selection if platform defined in detection tables is different
than kPlatformUnknown, otherwise allow all platforms to be selected.
2025-09-06 14:10:59 +02:00
Le Philousophe 0d549d86f9 DETECTION: Don't call appendComponent when it's not needed 2025-08-07 19:50:21 +02:00
Eugene Sandulenko c58e3a8a64 DETECTION: Dump engine name, not human-readable name 2025-07-24 12:01:50 +02:00
Simon Delamarre 087b6123b8 DETECTION: Add ADGF_ADDON flag
To be used with add-on games, that cannot be run independently without
their base game.
2025-07-21 14:13:28 +02:00
nirvairu 2baca911e0 AD: Expose sanitizeName in the base class 2025-06-19 23:47:33 +02:00
Eugene Sandulenko 31eac85ab9 AD: Use size-rd for MACRESFORK sizes in dumper
We are computing size of the data portion of the resource fork
2025-06-14 23:33:06 +02:00
Eugene Sandulenko 10d6059fb1 AD: Properly dump -1 size when requested 2025-06-14 23:33:06 +02:00
Eugene Sandulenko 359e7636f2 ENGINES: Removed usage of kMD5MacResOrDataFork
This is a bad syntax for ADGF_MACRESFORK, whuch by the previous
code version was computing only resource forks.

If we managed to mix files with resources and plain files in
a single detection entries, those entries must be fixed with
the respective md5 prefixes, e g. r: or d:
2025-06-14 23:12:32 +02:00
Orgad Shaneh a53c713eb0 ENGINES: Deduplicate escapeString and fix unused-function warnings
The code that uses them in glk and scumm is in #if 0.
2025-04-30 18:50:58 +03:00
Filippos Karapetis 1921ebf02e ENGINES: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Eugene Sandulenko e721bd540b AD: Fix debugC() usage 2025-02-22 21:24:19 +01:00
Vladimir Serbinenko 949eab7d21 DETECTOR: Support kADFlagCanTranscodeTraditionalChineseToSimplified 2024-09-13 00:11:38 +02:00
Cameron Cawley 6b9d40ee71 DETECTION: Support Clickteam installers in detection tables 2024-07-15 20:48:55 +03:00
Cameron Cawley 441b02d057 DETECTION: Use uint32 for ADGameFileDescription file size 2024-06-30 19:13:41 +02:00
Le Philousophe b61bd3ff85 ENGINES: Create a type aware advanced meta engine 2024-06-30 18:39:06 +02:00
Le Philousophe 90b886097f ENGINES: Create a type aware advanced detector 2024-06-30 18:39:06 +02:00
Le Philousophe 98d6f155d2 ENGINES: Split Engine::createInstance in two
This brings a cleaner separation between AdvancedMetaEngineDetection and
AdvancedMetaEngine.
2024-06-30 18:39:06 +02:00
Eugene Sandulenko 9610068217 AD: Added more filenames to gray list 2024-06-01 21:48:31 +02:00
Cameron Cawley 30b977c272 DETECTION: Mark more symbols as const 2023-12-26 20:23:59 +01:00
Le Philousophe 645a35c05b ENGINES: Migrate to Path class 2023-12-24 13:19:25 +01:00
Eugene Sandulenko 22e9f80162 AD: Added demo.ini to graylist 2023-12-16 00:34:45 +01:00
Eugene Sandulenko f5829aee43 AD: Print out engineid:gameid pairs for game references in sanity checks
These are now new canonical game names, thus, making it consistent.
2023-11-24 02:26:58 +01:00
Kaloyan Chehlarski fecfd1b462 AD: Improve archive scanning sanity check
Improved the game entry sanity check for entries with
archive scanning so it no longer assumes an A: prefix in the
md5 sum is unaccompanied by other prefixes.
2023-11-04 14:31:37 +02:00
Kaloyan Chehlarski 486b139d10 AD: Clean up detection prefix generation functions
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.
2023-11-02 18:20:44 +01:00
Kaloyan Chehlarski f7fe15ed42 AD: Add sanity checks for entries with archives
AdvancedMetaEngineDetection::detectClashes() now
performs a sanity check for entries with archive members,
making sure their filename schema contains exactly three
elements.
2023-11-02 18:20:44 +01:00
Kaloyan Chehlarski ad682243c4 AD: Support reading inside InstallShieldV3 archives
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.
2023-11-02 18:20:44 +01:00
Kaloyan Chehlarski c598e60e5e AD: Clear archive cache when starting game
This ensures we don't keep potentially expensive and
otherwise useless objects when a game is running
2023-11-02 18:20:44 +01:00
Kaloyan Chehlarski f77eca7c80 AD: Implement archive caching during detection
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.
2023-11-02 18:20:44 +01:00
Kaloyan Chehlarski 22553cb924 AD: Implement scanning inside InstallShield archives
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.
2023-11-02 18:20:44 +01:00
Miro Kropacek d52d7b202d ENGINES: Optimize string handling
[v]snprintf() / [v]fprintf() used in String::format() gets called
roughly a million times (!) when adding a game.

Reducing the number of calls into libc leads to about 10% speed
improvement on the atari backend (which is counting in seconds!)
2023-09-18 12:52:42 +02:00
Abhinav Chennubhotla dc2a5624c0 BASE: Dump engine desc in detection entry metadata 2023-08-21 15:40:25 +02:00
Abhinav Chennubhotla ad8be9d8d5 BASE: Add quotes to metadata while exporting 2023-08-21 15:40:25 +02:00
Eugene Sandulenko 925ef0f66f AD: Added "Double-click me" to the graylist 2023-07-25 14:11:13 +02:00
Eugene Sandulenko 9717100508 AD: Added more common file names to graylist 2023-07-19 10:48:41 +02:00
elasota d66fe413a1 ENGINES: Fix wrong printf format specifier (int64 is long long on Windows) 2023-07-10 16:59:38 +02:00
Abhinav Chennubhotla 967c8eaf5e BASE: Update dumpDetectionEntries() outputs
- Use printf() instead of debug()
 - Remove unnecessary type conversions
2023-07-03 13:54:50 +03:00
Abhinav Chennubhotla 41d9855273 BASE: Add metadata to dumped detection entries
- Add title, extra, platform and language to
   differentiate b/w different variants of a game
 - Create escapeString() func to add backslashes
   to strings containing certain special chars
2023-07-03 13:54:50 +03:00
Abhinav Chennubhotla c09ef64b7f BASE: Update dumpDetectionEntries() and md5PropToGameFile() 2023-07-03 13:54:50 +03:00
Abhinav Chennubhotla bb20579bee BASE: Add dumpAllDetectionEntries() to commandLine
- Add virtual function dumpDetectionEntries() to
   MetaEngine
 - Glk, Sky and SCUMM do not have proper
   definitions for dumpDetectionEntries()
 - Add md5PropToGameFile() to extract prefixes for
   md5s
 - AdvancedDetector writes content of DAT file to
   STDOUT
2023-07-03 13:54:50 +03:00
Eugene Sandulenko d1dcfb9508 AD: Set scan depth when adding globs generated from the entries. Default is 5 2023-02-02 18:23:55 +01:00
Eugene Sandulenko a69078149e AD: Do not add duplicate dorectories to SearchMan 2023-01-14 21:14:21 +01:00
Eugene Sandulenko d3f9ddcb44 AD: Move canPlayUnknownVariants() override to a flag. 2023-01-09 18:56:50 +01:00
sluicebox 39b7925c84 AD: Allow engines to prefer fallback detection 2023-01-09 18:42:26 +01:00
sluicebox 4d1107d992 ENGINES: Sort game file listings
The Unknown Game report and AdvancedMetaEngineDetection
logging statements are now sorted by file name, instead
of the HashMap iteration order.
2023-01-08 11:41:19 -08:00
Vladimir Serbinenko 5fd3c9b9b7 COMMON: Resync cache prefix with file md5 prefix 2022-12-28 12:56:22 +01:00