[Scummvm-git-logs] scummvm master -> d3df2bfdbeff7485228359f0ea3d615ff69403e8
sev-
noreply at scummvm.org
Tue Jun 24 14:56:36 UTC 2025
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
bd4df48029 COMMON: Expose MacResManager mode
633f4c374b COMMON: Support .data files in MacResMan
0cea75b77d GUI: INTEGRITY: Produce macformat-agnostic checksums
d3df2bfdbe GUI: INTEGRITY: Fix JSON tags for full checksums
Commit: bd4df48029543762a74a861e799a4707bf491d13
https://github.com/scummvm/scummvm/commit/bd4df48029543762a74a861e799a4707bf491d13
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-06-24T16:54:26+02:00
Commit Message:
COMMON: Expose MacResManager mode
Changed paths:
common/macresman.h
diff --git a/common/macresman.h b/common/macresman.h
index c741ffb81fb..8f65eedac77 100644
--- a/common/macresman.h
+++ b/common/macresman.h
@@ -219,6 +219,8 @@ public:
*/
bool isMacFile() const { return _mode != kResForkNone; }
+ int getMode() const { return _mode; }
+
/**
* Read resource from the MacBinary file
* @param typeID FourCC of the type
@@ -333,6 +335,15 @@ public:
};
static MacVers *parseVers(SeekableReadStream *vvers);
+ enum {
+ kResForkNone = 0,
+ kResForkRaw,
+ kResForkMacBinary,
+ kResForkAppleDouble
+ } _mode;
+
+ static Path constructAppleDoubleName(const Path &name);
+
private:
SeekableReadStream *_stream;
Path _baseFileName;
@@ -354,7 +365,6 @@ private:
static bool readAndValidateMacBinaryHeader(SeekableReadStream &stream, byte (&outMacBinaryHeader)[MBI_INFOHDR]);
- static Path constructAppleDoubleName(const Path &name);
static Path disassembleAppleDoubleName(const Path &name, bool *isAppleDouble);
static SeekableReadStream *openAppleDoubleWithAppleOrOSXNaming(Archive& archive, const Path &fileName);
@@ -366,13 +376,6 @@ private:
*/
static bool isRawFork(SeekableReadStream &stream);
- enum {
- kResForkNone = 0,
- kResForkRaw,
- kResForkMacBinary,
- kResForkAppleDouble
- } _mode;
-
void readMap();
struct ResMap {
Commit: 633f4c374b401d15c0803753b83459f78c5b0d88
https://github.com/scummvm/scummvm/commit/633f4c374b401d15c0803753b83459f78c5b0d88
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-06-24T16:54:26+02:00
Commit Message:
COMMON: Support .data files in MacResMan
Changed paths:
common/macresman.cpp
diff --git a/common/macresman.cpp b/common/macresman.cpp
index 2d4478855e9..b05928e7cce 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -419,6 +419,11 @@ SeekableReadStream * MacResManager::openFileOrDataFork(const Path &fileName, Arc
delete stream;
}
+ // Maybe it is a raw data fork with ".data" extension?
+ stream = archive.createReadStreamForMember(fileName.append(".data"));
+ if (stream)
+ return stream;
+
// The file doesn't exist
return nullptr;
}
Commit: 0cea75b77d0772a5569231c5339d348f71759799
https://github.com/scummvm/scummvm/commit/0cea75b77d0772a5569231c5339d348f71759799
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-06-24T16:54:26+02:00
Commit Message:
GUI: INTEGRITY: Produce macformat-agnostic checksums
Changed paths:
gui/integrity-dialog.cpp
diff --git a/gui/integrity-dialog.cpp b/gui/integrity-dialog.cpp
index 14d818553d3..0f6535d5f46 100644
--- a/gui/integrity-dialog.cpp
+++ b/gui/integrity-dialog.cpp
@@ -354,7 +354,6 @@ Common::Array<Common::StringArray> IntegrityDialog::generateChecksums(Common::Pa
// First, we go through the list and check any Mac files
Common::HashMap<Common::Path, bool, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo> macFiles;
Common::HashMap<Common::Path, bool, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo> toRemove;
- Common::List<Common::Path> filteredFileList;
Common::List<Common::Path> tmpFileList;
for (const auto &entry : fileList) {
@@ -369,7 +368,24 @@ Common::Array<Common::StringArray> IntegrityDialog::generateChecksums(Common::Pa
auto macFile = Common::MacResManager();
if (macFile.open(filename) && macFile.isMacFile()) {
- macFiles[filename] = true;
+ macFiles[originalFileName] = true;
+
+ switch (macFile.getMode()) {
+ case Common::MacResManager::kResForkRaw:
+ toRemove[filename.append(".rsrc")] = true;
+ toRemove[filename.append(".data")] = true;
+ toRemove[filename.append(".finf")] = true;
+ break;
+ case Common::MacResManager::kResForkMacBinary:
+ toRemove[filename.append(".bin")] = true;
+ break;
+ case Common::MacResManager::kResForkAppleDouble:
+ toRemove[Common::MacResManager::constructAppleDoubleName(filename)] = true;
+ toRemove[filename.getParent().append("__MACOSX")] = true;
+ break;
+ default:
+ error("Unsupported MacResManager mode: %d", macFile.getMode());
+ }
tmpFileList.push_back(filename);
} else {
@@ -378,21 +394,24 @@ Common::Array<Common::StringArray> IntegrityDialog::generateChecksums(Common::Pa
}
}
- for (const auto &entry : tmpFileList) {
- if (!toRemove.contains(entry)) {
- filteredFileList.push_back(entry);
- }
- }
-
// Process the files and subdirectories in the current directory recursively
for (const auto &entry : fileList) {
+ Common::Path filename(entry.getPath().relativeTo(gamePath));
+
+ if (macFiles.contains(filename)) {
+ filename.removeExtension(".bin");
+ filename.removeExtension(".rsrc");
+ }
+
+ if (toRemove.contains(filename))
+ continue;
+
if (entry.isDirectory()) {
generateChecksums(entry.getPath(), fileChecksums, gamePath);
continue;
}
- const Common::Path filename(entry.getPath().relativeTo(gamePath));
auto macFile = Common::MacResManager();
if (macFile.open(filename) && macFile.isMacFile()) {
Commit: d3df2bfdbeff7485228359f0ea3d615ff69403e8
https://github.com/scummvm/scummvm/commit/d3df2bfdbeff7485228359f0ea3d615ff69403e8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-06-24T16:54:26+02:00
Commit Message:
GUI: INTEGRITY: Fix JSON tags for full checksums
Changed paths:
gui/integrity-dialog.cpp
diff --git a/gui/integrity-dialog.cpp b/gui/integrity-dialog.cpp
index 0f6535d5f46..0d239bd48d6 100644
--- a/gui/integrity-dialog.cpp
+++ b/gui/integrity-dialog.cpp
@@ -422,7 +422,8 @@ Common::Array<Common::StringArray> IntegrityDialog::generateChecksums(Common::Pa
// Data fork
// Various checksizes
for (auto size : {0, 5000, 1024 * 1024}) {
- fileChecksum.push_back(Common::String::format("md5-d-%d", size));
+ Common::String sz = size ? Common::String::format("-%d", size) : "";
+ fileChecksum.push_back(Common::String::format("md5-d%s", sz.c_str()));
fileChecksum.push_back(Common::computeStreamMD5AsString(*dataForkStream, size, progressUpdateCallback, this));
dataForkStream->seek(0);
}
@@ -435,7 +436,8 @@ Common::Array<Common::StringArray> IntegrityDialog::generateChecksums(Common::Pa
if (macFile.hasResFork()) {
// Various checksizes
for (auto size : {0, 5000, 1024 * 1024}) {
- fileChecksum.push_back(Common::String::format("md5-r-%d", size));
+ Common::String sz = size ? Common::String::format("-%d", size) : "";
+ fileChecksum.push_back(Common::String::format("md5-r%s", sz.c_str()));
fileChecksum.push_back(macFile.computeResForkMD5AsString(size, false, progressUpdateCallback, this));
}
// Tail checksums with checksize 5000
@@ -470,7 +472,8 @@ Common::Array<Common::StringArray> IntegrityDialog::generateChecksums(Common::Pa
Common::Array<Common::String> fileChecksum = {filename.toString()};
// Various checksizes
for (auto size : {0, 5000, 1024 * 1024}) {
- fileChecksum.push_back(Common::String::format("md5-%d", size));
+ Common::String sz = size ? Common::String::format("-%d", size) : "";
+ fileChecksum.push_back(Common::String::format("md5%s", sz.c_str()));
fileChecksum.push_back(Common::computeStreamMD5AsString(file, size, progressUpdateCallback, this).c_str());
file.seek(0);
}
More information about the Scummvm-git-logs
mailing list