Commit Graph
99 Commits
Author SHA1 Message Date
Filippos Karapetis 177f04349a COMMON: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Vladimir Serbinenko 78859312f8 COMMON: Make Archive listable
This allows efficient listing of files in a subdir even if archive has
a large amount of unrelated files.
2025-01-11 14:20:56 +01:00
D G Turner 8eeabab034 COMMON: Remove Stray Semicolon From Common Archive Class
This causes a warning if -Wpedantic is passed to GCC.
2024-06-04 01:08:17 +01:00
Eugene Sandulenko 25577d4702 COMMON: Improved debug output for dumping archives 2024-05-24 18:29:08 +02:00
Le Philousophe 93a8f7f4d6 COMMON: Move Archive API to Path 2023-12-24 13:19:25 +01:00
Le Philousophe 56552fa282 COMMON: Various path related fixes in archives 2023-12-24 13:19:25 +01:00
elasota 7fc9afcf78 COMMON: Fix listMatchingMembers not working properly with non-default path separator 2023-12-18 11:51:37 +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
elasota 1155eb7894 COMMON: Add isPathDirectory to Archive, and isDirectory and listChildren to ArchiveMember 2023-09-17 19:17:33 +02:00
elasota 9892bedc61 COMMON: Add createReadStreamForAltStream to open Mac resource fork and metadata streams 2023-08-30 00:31:00 +02:00
Simon Delamarre c097a43a1f COMMON: Allow to know the archive name of matching members in SearchSet 2023-08-28 21:52:38 +02:00
Ankush Dutt 8150c720d3 COMMON: DumpArchive(): add check to skip directory, return error if a file cannot be opened 2023-08-09 18:15:43 +02:00
Ankush Dutt b90efbe47c COMMON: Handle writing failed in dumpArchive when not enough storage 2023-08-09 18:15:43 +02:00
Ankush Dutt ca7e41c4e0 COMMON: Use getPathInArchive() and Path::punycodeEncode() in dumpArchive() and fix directory issue
This commit will fix:
- The dumped games using dumpArchive() are not detected.
- The archive's contents were being dumped one directory back the destPath
2023-07-19 22:22:38 +02:00
elasota b8acbe6bee COMMON: Archive path refactoring, add getFileName and getPathInArchive that unambiguously return the filename or the full path 2023-07-19 18:51:37 +02:00
Le Philousophe 7880a660cf COMMON: Allow to know in which archive file was found in SearchSet 2023-07-09 21:41:58 +02:00
elasota e53d2ec594 COMMON: Add "getPathSeparator" to Archive and return ":" for Mac archive formats 2023-06-19 08:45:32 +03:00
Vladimir Serbinenko 6476e55aab COMMON: Allow memcaching archive to bypass caching part and return a stream
It's useful for patchers if they can easily create a stream in some cases but
not others.
2023-03-13 20:17:33 +01:00
Vladimir Serbinenko c33ce058f8 COMMON: Add createReadStreamForMemberNext for the ease of using patcher archives 2023-03-13 20:17:33 +01:00
Eugene Sandulenko 4d244d431f COMMON: Added helper method for dumping Common::Archive contents 2023-02-10 23:51:13 +01:00
Eugene Sandulenko b7b5ece6b5 COMMON: Added possibility to query archive from SearchSet 2023-02-10 01:19:34 +01:00
Eugene Sandulenko 5d08b1a0f3 COMMON: Add flag to match whole path for Archive::listMatchingMembers() 2023-01-08 01:15:52 +01:00
Vladimir Serbinenko 606a7a3e79 COMMON: Make MemcachingCaseInsensitiveArchive configurably to use weak pointers
This allows to keep memory footprint low on systems that are low on memory
2022-12-11 21:33:59 +01:00
Vladimir Serbinenko b2def0293c COMMON: Add MemcachingCaseInsensitiveArchive for caching archive contents
This allows to share code for caching decompressed contents.
2022-12-01 01:52:46 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01: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 2aa7e3e558 COMMON: Replace matchString pathMode with general wildcard exclusions
Different characters may need to be excluded for different path styles.
2021-08-09 17:43:12 -04:00
djsrv 7eb4841065 ALL: Use Path type in Archive functions 2021-08-07 10:44:37 +02:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
sluicebox 93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Thanasis Antoniou 0357293897 ANDROID: Fix crash due to adding '.' folder in SearchManager 2019-12-16 22:59:10 +02:00
Le Philousophe d62bb15d71 COMMON: Add ignoreClashes flag to SearchSet and FSDirectory
This lets engine mute warnings about name clashes when there are useless
for its case. This will be used by Versailles as the tree has
directories with the same name at various places.
Files are duplicated too in different directories but are identical.
2019-11-03 00:44:23 +01:00
Bastien Bouclet 955e18c648 COMMON: Use nullptr instead of NULL or 0 where appropriate 2018-05-10 08:35:46 +02:00
Adrian Frühwirth 3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Eugene Sandulenko 940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Johannes Schickel 01d3d02679 COMMON: Fix formatting issues in archive.cpp. 2016-02-09 12:10:04 +01:00
Johannes Schickel 854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Alyssa Milburn 7840b5e4b9 COMMON: Add depth/flat parameters to addSubDirectoryMatching. 2013-06-06 21:41:14 +02:00
Andrea Corna a6ec4f70da COMMON: Make more members of Archive constant. 2011-12-13 17:55:57 +01:00
Christoph Mallon 84220d2ca0 COMMON: Remove superfluous Common:: qualifiers. 2011-08-07 15:19:07 +02:00
Christoph Mallon 23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Ori Avtalion aa0f307e06 ALL: Require DECLARE_SINGLETON to be used in the Common namepsace
Silences the clang warning:

  static data member specialization of '_singleton' must
  originally be declared in namespace 'Common'; accepted as a C++0x
  extension [-Wc++0x-extensions]

Wrapping "namespace Common {}" around the macro assignment causes clang
to complain about a spurious semicolon, and removing the semicolon at
the end of the macro causes some editors to misbehave.

Changing the requirement of using the macro in one namespace (the
global) to another (Common) seems a small price to pay to
silence a warning.
2011-06-30 22:41:41 +03:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn abe1959d36 COMMON: Simplify DECLARE_SINGLETON macro
This makes it possible to write
  DECLARE_SINGLETON(foo);
instead of
  DECLARE_SINGLETON(foo)
without causing a warning about an extra semicolon.
The extra semicolon helps some editors at parsing the C++ code.

svn-id: r54258
2010-11-16 08:23:13 +00:00
Johannes Schickel 40562798d6 Fix our DECLARE_SINGLETON macro to conform to the C++ specs.
We need to use a namespace Common { } there to make strict C++ compilers
like clang++ and comeau happy. I also added a slight comment about why
that is needed to the macro definition and a note that you need to use
it from the global namespace.

svn-id: r48254
2010-03-13 21:55:49 +00:00
Johannes Schickel 1ba750063c Ooops...
svn-id: r46048
2009-11-21 20:26:55 +00:00
Johannes Schickel e8c67bda4b Change Archive::listMatchingMembers to match the pattern case-insensitively.
svn-id: r46046
2009-11-21 20:19:15 +00:00
Yotam Barnoy 1336b5464b Fixed bug in archive.cpp that caused at least one engine (SAGA) not to work
svn-id: r44560
2009-10-03 20:12:44 +00:00