94 Commits

Author SHA1 Message Date
Eugene Sandulenko 19e703bd4f COMMON: Switch creator and type in FinderInfo to uint32
This makes it conformant with the MKTAG() macro and makes the usage
more convenient
2026-05-17 22:37:35 +02:00
SHANKHARAJ DATTA 7fc6c04597 COMMON: Add original filename extraction to MacResManager 2026-03-13 19:39:15 +01:00
Eugene Sandulenko 633f4c374b COMMON: Support .data files in MacResMan 2025-06-24 16:54:26 +02:00
ShivangNagta f06bf27950 COMMON: Use optional parameter instead of overload 2025-04-27 20:27:27 +08:00
ShivangNagta 68258a1ced COMMON: Add callback for progress update 2025-04-27 20:27:27 +08:00
ShivangNagta 065d5e6448 GUI: Fix integrity dialog freeze issue 2025-04-27 20:27:27 +08:00
Filippos Karapetis 5b1e2d502c COMMON: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Eugene Sandulenko bebaf73791 COMMON: Implement hasDataFork() method 2025-03-05 00:45:21 +01:00
Eugene Sandulenko 754827c68d COMMON: Avoid scanning out of game directory for AppleDouble files. Bug #15016
Also implement sanity check for paths containing drive, e.g. "Games:" on Amiga
or "D:" on Windows.
2024-11-12 01:10:47 +01:00
AndywinXp 384968ced2 COMMON: Add getResLength() to MacResManager 2024-10-04 12:40:12 +02:00
Le Philousophe 93a8f7f4d6 COMMON: Move Archive API to Path 2023-12-24 13:19:25 +01:00
elasota 69584d21c4 COMMON: Fix stream leak if res fork load fails 2023-12-16 22:33:23 +02:00
elasota 6ed3c946ff COMMON: Add a way to check if an archive member is in a Mac archive so we can avoid decompressing the data fork to check for MacBinary when the resource data is always in the alt stream. 2023-12-16 19:30:23 +01:00
sluicebox db11ff30fa COMMON: Fix MacResManager memory leak. PVS-Studio V773 2023-10-29 18:16:23 -07:00
elasota 9892bedc61 COMMON: Add createReadStreamForAltStream to open Mac resource fork and metadata streams 2023-08-30 00:31:00 +02:00
Misty De Meo b975da2335 COMMON: fix MacResManager native resource forks
These broke in the archive refactor,
b8acbe6bee730a9024e73acc769b54285be9afde/#5108, because it removed
the ability to directly convert an `ArchiveMember` to an `FSNode`.
As a result, it was no longer possible to directly open a resource
fork as a stream.
2023-07-27 11:02:29 +02:00
Vladimir Serbinenko 9874d200c8 COMMON: Fix logic error in macresman 2023-05-20 14:32:53 +02:00
Vladimir Serbinenko 088b14a83a COMMON: Add function to open data fork from macbinary stream 2023-05-10 22:44:04 +02:00
Eugene Sandulenko 7f426af872 COMMON: Fix warning 2023-01-10 22:44:06 +01:00
Vladimir Serbinenko 94944b8c8b COMMON: Downgrade AppleDouble and actual resource forks in macresman
They are created silently by various versions of OSX and may contain
garbage describing plain macbinary rather than historically dumped data from
disk.
2023-01-10 14:45:36 +01:00
Vladimir Serbinenko 187304f730 COMMON: Reject all-zero macbinary header 2023-01-07 19:44:37 +03:00
Vladimir Serbinenko 2ca39a0745 COMMON: Support resource fork coming from OSX zip or FAT 2022-12-16 22:59:34 +01:00
Vladimir Serbinenko ce55430f1c COMMON: Don't access DIR_SEPARATOR in macresman
DIR_SEPARATOR is an implementation detail of Common::Path, it should not
be accessed outside of it. Use public functions that do the same instead
2022-12-14 05:08:46 +01:00
Vladimir Serbinenko 382913b51d COMMON: Remove hasDataFork and getDataFork 2022-12-11 21:32:30 +01:00
Vladimir Serbinenko b8f3bc2732 COMMON: In getDataFork use SafeSeekableSubReadStream
It can be opened several times so re-seeking makes sense
2022-11-29 18:35:20 +01:00
Vladimir Serbinenko 3ed46d3484 COMMON: In openFileOrDataFork ensure to seek to the beginning 2022-11-29 18:35:12 +01:00
Vladimir Serbinenko 05f1a0df51 COMMON: Remove the need for most reflecting when initing reflected table
Instead reflect the polynomial and change the shifts. Also removes the
need for explicit init.

This makes our crc more similar to its standard implementation
2022-11-29 01:05:31 +01:00
elasota 78d26927a8 COMMON: Add functions to get Mac Finder metadata such as type/creator codes. 2022-11-29 00:25:50 +01:00
Vladimir Serbinenko c92ec629db COMMON: Convenience function for retrieving data fork 2022-11-20 17:21:44 +01:00
Vladimir Serbinenko 98f178c58f DETECTOR: Allow detecting with MacBinary with no resource fork 2022-11-20 17:21:44 +01:00
elasota b3c70aa1ba COMMON: Add Macintosh Finder Info types and add parsing of it to StuffItArchive. 2022-11-20 14:20:30 +01:00
Scott Percival 095ae06405 COMMON: Refactor MacResManager::load* methods to accept a pointer
Previously the methods would pass by reference, then convert to a
pointer on success and take ownership. This isn't ideal, as a
reference suggests no transferral of ownership, and doesn't suggest
it needs to be a heap resource allocated by new.
2022-09-25 10:35:03 +02:00
Orgad Shaneh 2e441b12e6 COMMON: Fix compiler warning on Win64
Amends 7d4d135b99.
2022-08-12 17:06:21 +03:00
Eugene Sandulenko 7d4d135b99 COMMON: Add sanity checks to MacResManager::readMap() 2022-08-08 02:06:08 +02:00
Eugene Sandulenko 74c253bef8 COMMON: Some programs store AppleDouble files in *.rsrc. Check for that 2022-08-08 02:05:06 +02:00
Misty De Meo b3df6c6f03 COMMON: macresman: handle macbinary with resource forks 2022-03-20 20:48:17 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 63870b65fa AD: Properly seek to the tail of file for md5 computation 2021-10-19 21:09:15 +03:00
Eugene Sandulenko 841254e6f1 AD: Fix seeking for tail md5 2021-10-19 13:05:22 +03:00
Eugene Sandulenko 91b91c0cba COMMON: Fix bug in Mac resfork data size calculation. This invalidates many detection entries 2021-10-17 20:48:02 +03:00
Eugene Sandulenko 4eea8524f7 COMMON: Add possibility to compute md5 for tail of resfork data 2021-10-17 20:48:01 +03:00
Eugene Sandulenko b72d6d89b9 COMMON: Proper check for MacBinary presence. This fixes false positives for QT movies 2021-08-10 19:33:27 +02:00
djsrv ba28d7fde6 ALL: Change listMatchingMembers pattern to a Path
This handles any potential differences in directory separators passed to
the function, as with the other Archive functions.
2021-08-09 17:47:30 -04:00
djsrv 763d2813a0 COMMON: Replace Path's += with append/join 2021-08-07 10:44:37 +02:00
djsrv 909595176a COMMON: Use Path type in MacResManager functions 2021-08-07 10:44:37 +02:00
Bastien Bouclet 0f2c6cd9ea ENGINES: Change mac resource fork file detection to use the file cache
Common::MacResMan is now able to open files from a specified
Common::Archive. This is a bit hacky as dynamic_cast is used to break
the Archive encapsulation to retreive the underlying FSNode. It should
however be more correct than the previous code that assumed files were
at the root of the currently running game's path.

AdvancedDetector constructs a Common::Archive from its FileMap based
filesystem cache and uses it to detect the mac resource fork files.

This cuts the time it takes to run the detection code with all the
engines enabled as dynamic plugins on the 3DS to 30 s from 280 s.
2020-09-20 16:33:45 +02:00
Eugene Sandulenko 1bb73862a1 COMMON: Lightened another MacBinary check so ISOBuster files really work 2020-08-01 22:38:09 +02:00
Eugene Sandulenko 4221c38167 COMMON: Support MacBinary3 files produced by ISOBuster 2020-08-01 20:25:39 +02:00
Eugene Sandulenko bcd1d3c688 COMMON: Add 'vers' resource parser to MacResMan 2020-07-08 11:42:59 +02:00
Eugene Sandulenko be388e644a COMMON: Give direct access to Data fork in MacResMan 2020-07-07 22:31:13 +02:00