Skip to content

Commit 3f26b75

Browse files
halx99minggo
authored andcommitted
Upgrade minizip to 1.2.0 (#20158)
1 parent 835fec0 commit 3f26b75

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

cocos/base/ZipUtils.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@
4242
#include "platform/CCFileUtils.h"
4343
#include <map>
4444

45-
// FIXME: Other platforms should use upstream minizip like mingw-w64
46-
#ifdef MINIZIP_FROM_SYSTEM
45+
// minizip 1.2.0 is same with other platforms
4746
#define unzGoToFirstFile64(A,B,C,D) unzGoToFirstFile2(A,B,C,D, NULL, 0, NULL, 0)
4847
#define unzGoToNextFile64(A,B,C,D) unzGoToNextFile2(A,B,C,D, NULL, 0, NULL, 0)
49-
#endif
5048

5149
NS_CC_BEGIN
5250

cocos/platform/CCFileUtils.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -725,12 +725,9 @@ unsigned char* FileUtils::getFileDataFromZip(const std::string& zipFilePath, con
725725
file = unzOpen(FileUtils::getInstance()->getSuitableFOpen(zipFilePath).c_str());
726726
CC_BREAK_IF(!file);
727727

728-
// FIXME: Other platforms should use upstream minizip like mingw-w64
729-
#ifdef MINIZIP_FROM_SYSTEM
730-
int ret = unzLocateFile(file, filename.c_str(), NULL);
731-
#else
732-
int ret = unzLocateFile(file, filename.c_str(), 1);
733-
#endif
728+
// minizip 1.2.0 is same with other platforms
729+
int ret = unzLocateFile(file, filename.c_str(), nullptr);
730+
734731
CC_BREAK_IF(UNZ_OK != ret);
735732

736733
char filePathA[260];

external/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "v3-deps-163",
2+
"version": "v3-deps-166",
33
"zip_file_size": "141133955",
44
"repo_name": "cocos2d-x-3rd-party-libs-bin",
55
"repo_parent": "https://github.com/cocos2d/",

0 commit comments

Comments
 (0)