Merge pull request #8642 from martell/minizip

mingw64: mirgrate to upstream minizip
This commit is contained in:
Ricardo Quesada 2014-10-10 21:30:11 -07:00
commit 1b6b91a63d
2 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,12 @@
#include "platform/CCFileUtils.h"
#include <map>
// FIXME: Other platforms should use upstream minizip like mingw-w64
#ifdef __MINGW32__
#define unzGoToFirstFile64(A,B,C,D) unzGoToFirstFile2(A,B,C,D, NULL, 0, NULL, 0)
#define unzGoToNextFile64(A,B,C,D) unzGoToNextFile2(A,B,C,D, NULL, 0, NULL, 0)
#endif
NS_CC_BEGIN
unsigned int ZipUtils::s_uEncryptedPvrKeyParts[4] = {0,0,0,0};

View File

@ -648,7 +648,12 @@ unsigned char* FileUtils::getFileDataFromZip(const std::string& zipFilePath, con
file = unzOpen(zipFilePath.c_str());
CC_BREAK_IF(!file);
// FIXME: Other platforms should use upstream minizip like mingw-w64
#ifdef __MINGW32__
int ret = unzLocateFile(file, filename.c_str(), NULL);
#else
int ret = unzLocateFile(file, filename.c_str(), 1);
#endif
CC_BREAK_IF(UNZ_OK != ret);
char filePathA[260];