From 272ead9735ed6e8305fb35e645322aa1a5f2cff6 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Tue, 18 Nov 2025 14:36:52 -0500 Subject: [PATCH 1/6] bugfix(big): skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs --- .../Source/StdDevice/Common/StdBIGFileSystem.cpp | 8 ++++++++ .../Source/Win32Device/Common/Win32BIGFileSystem.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp index 2470d66912..561986e42b 100644 --- a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp @@ -215,6 +215,14 @@ Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fi Bool actuallyAdded = FALSE; FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { + AsciiString filePath = (*it); + filePath.toLower(); + // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs + if (strstr(filePath.str(), "data\\ini\\inizh.big") != NULL || strstr(filePath.str(), "data/ini/inizh.big") != NULL) { + it++; + continue; + } + ArchiveFile *archiveFile = openArchiveFile((*it).str()); if (archiveFile != NULL) { diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp index 95f9e7ef0e..2d60672a49 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp @@ -216,6 +216,14 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString Bool actuallyAdded = FALSE; FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { + AsciiString filePath = (*it); + filePath.toLower(); + // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs + if (strstr(filePath.str(), "data\\ini\\inizh.big") != NULL || strstr(filePath.str(), "data/ini/inizh.big") != NULL) { + it++; + continue; + } + ArchiveFile *archiveFile = openArchiveFile((*it).str()); if (archiveFile != NULL) { From 95cfca191e7a8ea4b8291aa2008d56de9929d3af Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Tue, 25 Nov 2025 13:49:29 -0500 Subject: [PATCH 2/6] build(big): wrap INIZH.big skip in RTS_ZEROHOUR preprocessor guard --- .../Source/StdDevice/Common/StdBIGFileSystem.cpp | 2 ++ .../Source/Win32Device/Common/Win32BIGFileSystem.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp index 561986e42b..a005117eec 100644 --- a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp @@ -215,6 +215,7 @@ Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fi Bool actuallyAdded = FALSE; FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { +#if RTS_ZEROHOUR AsciiString filePath = (*it); filePath.toLower(); // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs @@ -222,6 +223,7 @@ Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fi it++; continue; } +#endif ArchiveFile *archiveFile = openArchiveFile((*it).str()); diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp index 2d60672a49..5b897ba5b3 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp @@ -216,6 +216,7 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString Bool actuallyAdded = FALSE; FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { +#if RTS_ZEROHOUR AsciiString filePath = (*it); filePath.toLower(); // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs @@ -223,6 +224,7 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString it++; continue; } +#endif ArchiveFile *archiveFile = openArchiveFile((*it).str()); From 6deccd7693bdde63f5fc421a731fabd284fb9440 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Tue, 25 Nov 2025 13:49:46 -0500 Subject: [PATCH 3/6] refactor(big): use endsWithNoCase for INIZH.big path matching --- .../Source/StdDevice/Common/StdBIGFileSystem.cpp | 4 +--- .../Source/Win32Device/Common/Win32BIGFileSystem.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp index a005117eec..6ddab1fb02 100644 --- a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp @@ -216,10 +216,8 @@ Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fi FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { #if RTS_ZEROHOUR - AsciiString filePath = (*it); - filePath.toLower(); // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs - if (strstr(filePath.str(), "data\\ini\\inizh.big") != NULL || strstr(filePath.str(), "data/ini/inizh.big") != NULL) { + if ((*it).endsWithNoCase("data\\ini\\inizh.big") || (*it).endsWithNoCase("data/ini/inizh.big")) { it++; continue; } diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp index 5b897ba5b3..ee48c236b2 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp @@ -217,10 +217,8 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { #if RTS_ZEROHOUR - AsciiString filePath = (*it); - filePath.toLower(); // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs - if (strstr(filePath.str(), "data\\ini\\inizh.big") != NULL || strstr(filePath.str(), "data/ini/inizh.big") != NULL) { + if ((*it).endsWithNoCase("data\\ini\\inizh.big") || (*it).endsWithNoCase("data/ini/inizh.big")) { it++; continue; } From 2426e0bcfc79b910785b53cdc55bc709199a2132 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Sat, 29 Nov 2025 10:08:02 -0500 Subject: [PATCH 4/6] refactor(big): use arrow operator and @bugfix tag for INIZH.big skip --- .../Source/StdDevice/Common/StdBIGFileSystem.cpp | 4 ++-- .../Source/Win32Device/Common/Win32BIGFileSystem.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp index 6ddab1fb02..041e2e3567 100644 --- a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp @@ -216,8 +216,8 @@ Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fi FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { #if RTS_ZEROHOUR - // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs - if ((*it).endsWithNoCase("data\\ini\\inizh.big") || (*it).endsWithNoCase("data/ini/inizh.big")) { + // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs + if (it->endsWithNoCase("data\\ini\\inizh.big") || it->endsWithNoCase("data/ini/inizh.big")) { it++; continue; } diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp index ee48c236b2..441703bb0c 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp @@ -217,8 +217,8 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { #if RTS_ZEROHOUR - // TheSuperHackers @fix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs - if ((*it).endsWithNoCase("data\\ini\\inizh.big") || (*it).endsWithNoCase("data/ini/inizh.big")) { + // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs + if (it->endsWithNoCase("data\\ini\\inizh.big") || it->endsWithNoCase("data/ini/inizh.big")) { it++; continue; } From 85ae7f4a7c5efc0e932a96e5f3e1a2ca25cbc898 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Sat, 29 Nov 2025 10:26:40 -0500 Subject: [PATCH 5/6] refactor(big): remove DeleteFile hack and move comment to skip location --- .../Source/StdDevice/Common/StdBIGFileSystem.cpp | 4 +++- .../Source/Win32Device/Common/Win32BIGFileSystem.cpp | 4 +++- GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp | 6 ------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp index 041e2e3567..c73c0cf6ad 100644 --- a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp @@ -216,7 +216,9 @@ Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fi FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { #if RTS_ZEROHOUR - // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs + // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches. + // English, Chinese, and Korean SKUs shipped with two INIZH.big files (one in Run directory, one in Run\Data\INI). + // The DeleteFile cleanup doesn't work on EA App/Origin installs because the folder is not writable, so we skip loading it instead. if (it->endsWithNoCase("data\\ini\\inizh.big") || it->endsWithNoCase("data/ini/inizh.big")) { it++; continue; diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp index 441703bb0c..1b61d74172 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp @@ -217,7 +217,9 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString FilenameListIter it = filenameList.begin(); while (it != filenameList.end()) { #if RTS_ZEROHOUR - // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches on EA App/Origin installs + // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches. + // English, Chinese, and Korean SKUs shipped with two INIZH.big files (one in Run directory, one in Run\Data\INI). + // The DeleteFile cleanup doesn't work on EA App/Origin installs because the folder is not writable, so we skip loading it instead. if (it->endsWithNoCase("data\\ini\\inizh.big") || it->endsWithNoCase("data/ini/inizh.big")) { it++; continue; diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp index 7c7418a6a5..db78d7c55e 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp @@ -395,12 +395,6 @@ void GameEngine::init() // Create the low-level file system interface TheFileSystem = createFileSystem(); - //Kris: Patch 1.01 - November 17, 2003 - //I was unable to resolve the RTPatch method of deleting a shipped file. English, Chinese, and Korean - //SKU's shipped with two INIZH.big files. One properly in the Run directory and the other in Run\INI\Data. - //We need to toast the latter in order for the game to patch properly. - DeleteFile( "Data\\INI\\INIZH.big" ); - // not part of the subsystem list, because it should normally never be reset! TheNameKeyGenerator = MSGNEW("GameEngineSubsystem") NameKeyGenerator; TheNameKeyGenerator->init(); From c25c37790374c33b6591930278bbc0e45a109d73 Mon Sep 17 00:00:00 2001 From: Bobby Battista Date: Sun, 30 Nov 2025 14:05:31 -0500 Subject: [PATCH 6/6] preserve original case --- .../Source/StdDevice/Common/StdBIGFileSystem.cpp | 2 +- .../Source/Win32Device/Common/Win32BIGFileSystem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp index c73c0cf6ad..abbcfc9295 100644 --- a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp @@ -219,7 +219,7 @@ Bool StdBIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString fi // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches. // English, Chinese, and Korean SKUs shipped with two INIZH.big files (one in Run directory, one in Run\Data\INI). // The DeleteFile cleanup doesn't work on EA App/Origin installs because the folder is not writable, so we skip loading it instead. - if (it->endsWithNoCase("data\\ini\\inizh.big") || it->endsWithNoCase("data/ini/inizh.big")) { + if (it->endsWithNoCase("Data\\INI\\INIZH.big") || it->endsWithNoCase("Data/INI/INIZH.big")) { it++; continue; } diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp index 1b61d74172..b62fd5253f 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp @@ -220,7 +220,7 @@ Bool Win32BIGFileSystem::loadBigFilesFromDirectory(AsciiString dir, AsciiString // TheSuperHackers @bugfix bobtista 18/11/2025 Skip duplicate INIZH.big in Data\INI to prevent CRC mismatches. // English, Chinese, and Korean SKUs shipped with two INIZH.big files (one in Run directory, one in Run\Data\INI). // The DeleteFile cleanup doesn't work on EA App/Origin installs because the folder is not writable, so we skip loading it instead. - if (it->endsWithNoCase("data\\ini\\inizh.big") || it->endsWithNoCase("data/ini/inizh.big")) { + if (it->endsWithNoCase("Data\\INI\\INIZH.big") || it->endsWithNoCase("Data/INI/INIZH.big")) { it++; continue; }