diff --git a/3party/minizip/CMakeLists.txt b/3party/minizip/CMakeLists.txt index 8e41eafbaa..d7b439732a 100644 --- a/3party/minizip/CMakeLists.txt +++ b/3party/minizip/CMakeLists.txt @@ -7,12 +7,14 @@ add_gcc_compile_options("-Wno-unused-value") set( SRC - ioapi.c - ioapi.h - unzip.c - unzip.h - zip.c - zip.h + minizip.cpp + minizip.hpp + src/ioapi.c + src/ioapi.h + src/unzip.c + src/unzip.h + src/zip.c + src/zip.h ) add_library(${PROJECT_NAME} ${SRC}) diff --git a/3party/minizip/minizip.cpp b/3party/minizip/minizip.cpp new file mode 100644 index 0000000000..82ef6d5488 --- /dev/null +++ b/3party/minizip/minizip.cpp @@ -0,0 +1,87 @@ +#include "minizip.hpp" + +namespace unzip +{ +File Open(std::string const & filename) +{ + return unzOpen64(filename.c_str()); +} + +Code Close(File file) +{ + return static_cast(unzClose(file)); +} + +Code SeekToFirstFile(File file) +{ + return static_cast(unzGoToFirstFile(file)); +} + +Code SeekToNextFile(File file) +{ + return static_cast(unzGoToNextFile(file)); +} + +Code SeekToFile(File file, std::string const & filename) +{ + return static_cast(unzLocateFile(file, filename.c_str(), 1 /* iCaseSensitivity */)); +} + +Code OpenCurrentFile(File file) +{ + return static_cast(unzOpenCurrentFile(file)); +} + +FilePos GetCurrentFileFilePos(File file) +{ + return unzGetCurrentFileZStreamPos64(file); +} + +Code CloseCurrentFile(File file) +{ + return static_cast(unzCloseCurrentFile(file)); +} + +Code GetCurrentFileInfo(File file, FileInfo & info) +{ + int constexpr kArraySize = 256; + char fileName[kArraySize]; + auto const result = unzGetCurrentFileInfo64(file, &info.m_info, fileName, + kArraySize, nullptr, 0, nullptr, 0); + info.m_filename = fileName; + return static_cast(result); +} + +int ReadCurrentFile(unzFile file, Buffer & result) +{ + auto const readCount = unzReadCurrentFile(file, result.data(), kFileBufferSize); + return readCount; +} +} // namespace unzip + +namespace zip +{ +File Create(std::string const & filename) +{ + return zipOpen(filename.c_str(), APPEND_STATUS_CREATE); +} + +Code Close(File file) +{ + return static_cast(zipClose(file, nullptr)); +} + +Code OpenNewFileInZip(File file, std::string const & filename, FileInfo const & fileInfo, + std::string const & comment, int method, int level) +{ + auto result = zipOpenNewFileInZip(file, filename.c_str(), &fileInfo, nullptr, 0, + nullptr, 0, comment.c_str(), Z_DEFLATED, Z_DEFAULT_COMPRESSION); + return result == 0 ? Code::Ok : Code::InternalError; +} + +Code WriteInFileInZip(File file, Buffer const & buf, size_t count) +{ + auto result = zipWriteInFileInZip(file, buf.data(), static_cast(count)); + return result == 0 ? Code::Ok : Code::InternalError; +} +} // namespace zip diff --git a/3party/minizip/minizip.hpp b/3party/minizip/minizip.hpp new file mode 100644 index 0000000000..431c96d26e --- /dev/null +++ b/3party/minizip/minizip.hpp @@ -0,0 +1,85 @@ +#pragma once + +#include "3party/minizip/src/unzip.h" +#include "3party/minizip/src/zip.h" + +#include +#include +#include + +namespace unzip +{ +unsigned int static constexpr kFileBufferSize = 64 * 1024; +static_assert(std::numeric_limits::max() > kFileBufferSize, ""); + +using File = unzFile; +using FilePos = ZPOS64_T; +using Buffer = std::array; + +struct FileInfo +{ + std::string m_filename; + unz_file_info64 m_info; +}; + +enum class Code : int8_t +{ + Ok = UNZ_OK, + EndOfListOfFile = UNZ_END_OF_LIST_OF_FILE, + ErrNo = UNZ_ERRNO, + Eof = UNZ_OK, + ParamError = UNZ_PARAMERROR, + BadZipFile = UNZ_BADZIPFILE, + InternalError = UNZ_INTERNALERROR, + CrcError = UNZ_CRCERROR, +}; + +File Open(std::string const & filename); + +Code Close(File file); + +Code SeekToFirstFile(File file); + +Code SeekToNextFile(File file); + +Code SeekToFile(File file, std::string const & filename); + +Code OpenCurrentFile(File file); + +FilePos GetCurrentFileFilePos(File file); + +Code CloseCurrentFile(File file); + +Code GetCurrentFileInfo(File file, FileInfo & info); + +int ReadCurrentFile(File file, Buffer & result); +} // namespace unzip + +namespace zip +{ +unsigned int constexpr kFileBufferSize = 64 * 1024; + +using File = zipFile; +using FileInfo = zip_fileinfo; +using DateTime = tm_zip; +using Buffer = std::array; + +enum class Code : int8_t +{ + Ok = ZIP_OK, + Eof = ZIP_EOF, + ErrNo = ZIP_ERRNO, + ParamError = ZIP_PARAMERROR, + BadZipFile = ZIP_BADZIPFILE, + InternalError = ZIP_INTERNALERROR, +}; + +File Create(std::string const & filename); + +Code Close(File file); + +Code OpenNewFileInZip(File file, std::string const & filename, FileInfo const & fileInfo, + std::string const & comment, int method, int level); + +Code WriteInFileInZip(File file, Buffer const & buf, size_t count); +} // namespace zip diff --git a/3party/minizip/Makefile.am b/3party/minizip/src/Makefile.am similarity index 100% rename from 3party/minizip/Makefile.am rename to 3party/minizip/src/Makefile.am diff --git a/3party/minizip/MiniZip64_Changes.txt b/3party/minizip/src/MiniZip64_Changes.txt similarity index 100% rename from 3party/minizip/MiniZip64_Changes.txt rename to 3party/minizip/src/MiniZip64_Changes.txt diff --git a/3party/minizip/MiniZip64_info.txt b/3party/minizip/src/MiniZip64_info.txt similarity index 100% rename from 3party/minizip/MiniZip64_info.txt rename to 3party/minizip/src/MiniZip64_info.txt diff --git a/3party/minizip/configure.ac b/3party/minizip/src/configure.ac similarity index 100% rename from 3party/minizip/configure.ac rename to 3party/minizip/src/configure.ac diff --git a/3party/minizip/crypt.h b/3party/minizip/src/crypt.h similarity index 100% rename from 3party/minizip/crypt.h rename to 3party/minizip/src/crypt.h diff --git a/3party/minizip/ioapi.c b/3party/minizip/src/ioapi.c similarity index 100% rename from 3party/minizip/ioapi.c rename to 3party/minizip/src/ioapi.c diff --git a/3party/minizip/ioapi.h b/3party/minizip/src/ioapi.h similarity index 100% rename from 3party/minizip/ioapi.h rename to 3party/minizip/src/ioapi.h diff --git a/3party/minizip/iowin32.c b/3party/minizip/src/iowin32.c similarity index 100% rename from 3party/minizip/iowin32.c rename to 3party/minizip/src/iowin32.c diff --git a/3party/minizip/iowin32.h b/3party/minizip/src/iowin32.h similarity index 100% rename from 3party/minizip/iowin32.h rename to 3party/minizip/src/iowin32.h diff --git a/3party/minizip/make_vms.com b/3party/minizip/src/make_vms.com similarity index 100% rename from 3party/minizip/make_vms.com rename to 3party/minizip/src/make_vms.com diff --git a/3party/minizip/miniunz.c b/3party/minizip/src/miniunz.c similarity index 100% rename from 3party/minizip/miniunz.c rename to 3party/minizip/src/miniunz.c diff --git a/3party/minizip/miniunzip.1 b/3party/minizip/src/miniunzip.1 similarity index 100% rename from 3party/minizip/miniunzip.1 rename to 3party/minizip/src/miniunzip.1 diff --git a/3party/minizip/minizip.1 b/3party/minizip/src/minizip.1 similarity index 100% rename from 3party/minizip/minizip.1 rename to 3party/minizip/src/minizip.1 diff --git a/3party/minizip/minizip.c b/3party/minizip/src/minizip.c similarity index 100% rename from 3party/minizip/minizip.c rename to 3party/minizip/src/minizip.c diff --git a/3party/minizip/minizip.pc.in b/3party/minizip/src/minizip.pc.in similarity index 100% rename from 3party/minizip/minizip.pc.in rename to 3party/minizip/src/minizip.pc.in diff --git a/3party/minizip/mztools.c b/3party/minizip/src/mztools.c similarity index 100% rename from 3party/minizip/mztools.c rename to 3party/minizip/src/mztools.c diff --git a/3party/minizip/mztools.h b/3party/minizip/src/mztools.h similarity index 100% rename from 3party/minizip/mztools.h rename to 3party/minizip/src/mztools.h diff --git a/3party/minizip/unzip.c b/3party/minizip/src/unzip.c similarity index 100% rename from 3party/minizip/unzip.c rename to 3party/minizip/src/unzip.c diff --git a/3party/minizip/unzip.h b/3party/minizip/src/unzip.h similarity index 100% rename from 3party/minizip/unzip.h rename to 3party/minizip/src/unzip.h diff --git a/3party/minizip/zip.c b/3party/minizip/src/zip.c similarity index 100% rename from 3party/minizip/zip.c rename to 3party/minizip/src/zip.c diff --git a/3party/minizip/zip.h b/3party/minizip/src/zip.h similarity index 100% rename from 3party/minizip/zip.h rename to 3party/minizip/src/zip.h diff --git a/coding/zip_creator.cpp b/coding/zip_creator.cpp index 6ad71e0c6a..c201303754 100644 --- a/coding/zip_creator.cpp +++ b/coding/zip_creator.cpp @@ -10,7 +10,7 @@ #include "base/logging.hpp" #include "base/scope_guard.hpp" -#include "3party/minizip/zip.h" +#include "3party/minizip/minizip.hpp" #include #include @@ -22,24 +22,24 @@ namespace { class ZipHandle { - zipFile m_zipFileHandle; + zip::File m_zipFileHandle; public: explicit ZipHandle(std::string const & filePath) { - m_zipFileHandle = zipOpen(filePath.c_str(), 0); + m_zipFileHandle = zip::Create(filePath); } ~ZipHandle() { if (m_zipFileHandle) - zipClose(m_zipFileHandle, NULL); + zip::Close(m_zipFileHandle); } - zipFile Handle() const { return m_zipFileHandle; } + zip::File Handle() const { return m_zipFileHandle; } }; -void CreateTMZip(tm_zip & res) +void CreateTMZip(zip::DateTime & res) { time_t rawtime; struct tm * timeinfo; @@ -77,7 +77,7 @@ bool CreateZipFromPathDeflatedAndDefaultCompression(std::string const & filePath if (!zip.Handle()) return false; - zip_fileinfo zipInfo = {}; + zip::FileInfo zipInfo = {}; CreateTMZip(zipInfo.tmz_date); std::string fileName = filePath; @@ -85,8 +85,8 @@ bool CreateZipFromPathDeflatedAndDefaultCompression(std::string const & filePath if (!strings::IsASCIIString(fileName)) fileName = "MapsMe.kml"; - if (zipOpenNewFileInZip(zip.Handle(), fileName.c_str(), &zipInfo, nullptr, 0, nullptr, 0, - "ZIP from MapsWithMe", Z_DEFLATED, Z_DEFAULT_COMPRESSION) < 0) + if (zip::Code::Ok != zip::OpenNewFileInZip(zip.Handle(), fileName, zipInfo, "ZIP from MapsWithMe", + Z_DEFLATED, Z_DEFAULT_COMPRESSION)) { return false; } @@ -98,14 +98,13 @@ bool CreateZipFromPathDeflatedAndDefaultCompression(std::string const & filePath uint64_t const fileSize = file.Size(); uint64_t currSize = 0; - char buffer[ZIP_FILE_BUFFER_SIZE]; + std::array buffer; while (currSize < fileSize) { - unsigned int const toRead = - std::min(ZIP_FILE_BUFFER_SIZE, static_cast(fileSize - currSize)); - file.Read(currSize, buffer, toRead); + auto const toRead = std::min(buffer.size(), static_cast(fileSize - currSize)); + file.Read(currSize, buffer.data(), toRead); - if (ZIP_OK != zipWriteInFileInZip(zip.Handle(), buffer, toRead)) + if (zip::Code::Ok != zip::WriteInFileInZip(zip.Handle(), buffer, toRead)) return false; currSize += toRead; @@ -131,14 +130,14 @@ bool CreateZipFromFiles(std::vector const & files, std::string cons return false; auto const compressionLevel = GetCompressionLevel(compression); - zip_fileinfo const fileInfo = {}; + zip::FileInfo const fileInfo = {}; try { for (auto const & filePath : files) { - if (zipOpenNewFileInZip(zip.Handle(), filePath.c_str(), &fileInfo, nullptr, 0, nullptr, 0, "", - Z_DEFLATED, compressionLevel) != Z_OK) + if (zip::Code::Ok != zip::OpenNewFileInZip(zip.Handle(), filePath, fileInfo, "", + Z_DEFLATED, compressionLevel)) { return false; } @@ -146,15 +145,15 @@ bool CreateZipFromFiles(std::vector const & files, std::string cons base::FileData file(filePath, base::FileData::OP_READ); uint64_t const fileSize = file.Size(); uint64_t writtenSize = 0; - std::array bufferForZip; + zip::Buffer buffer; while (writtenSize < fileSize) { - unsigned int const filePartSize = - std::min(ZIP_FILE_BUFFER_SIZE, static_cast(fileSize - writtenSize)); - file.Read(writtenSize, bufferForZip.data(), filePartSize); + auto const filePartSize = + std::min(buffer.size(), static_cast(fileSize - writtenSize)); + file.Read(writtenSize, buffer.data(), filePartSize); - if (zipWriteInFileInZip(zip.Handle(), bufferForZip.data(), filePartSize) != ZIP_OK) + if (zip::Code::Ok != zip::WriteInFileInZip(zip.Handle(), buffer, filePartSize)) return false; writtenSize += filePartSize; diff --git a/coding/zip_reader.cpp b/coding/zip_reader.cpp index 114d5d9037..e9d449d434 100644 --- a/coding/zip_reader.cpp +++ b/coding/zip_reader.cpp @@ -5,7 +5,9 @@ #include "base/logging.hpp" #include "base/scope_guard.hpp" -#include "3party/minizip/unzip.h" +#include + +#include "3party/minizip/minizip.hpp" using namespace std; @@ -44,61 +46,60 @@ ZipFileReader::ZipFileReader(string const & container, string const & file, uint uint32_t logPageCount) : FileReader(container, logPageSize, logPageCount), m_uncompressedFileSize(0) { - unzFile zip = unzOpen64(container.c_str()); + auto zip = unzip::Open(container.c_str()); if (!zip) MYTHROW(OpenZipException, ("Can't get zip file handle", container)); SCOPE_GUARD(zipGuard, bind(&unzClose, zip)); - if (UNZ_OK != unzLocateFile(zip, file.c_str(), 1)) + if (unzip::Code::Ok != unzip::SeekToFile(zip, file.c_str())) MYTHROW(LocateZipException, ("Can't locate file inside zip", file)); - if (UNZ_OK != unzOpenCurrentFile(zip)) + if (unzip::Code::Ok != unzip::OpenCurrentFile(zip)) MYTHROW(LocateZipException, ("Can't open file inside zip", file)); - uint64_t const offset = unzGetCurrentFileZStreamPos64(zip); - (void) unzCloseCurrentFile(zip); + auto const offset = unzip::GetCurrentFileFilePos(zip); + unzip::CloseCurrentFile(zip); if (offset == 0 || offset > Size()) MYTHROW(LocateZipException, ("Invalid offset inside zip", file)); - unz_file_info64 fileInfo; - if (UNZ_OK != unzGetCurrentFileInfo64(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0)) + unzip::FileInfo fileInfo; + if (unzip::Code::Ok != unzip::GetCurrentFileInfo(zip, fileInfo)) MYTHROW(LocateZipException, ("Can't get compressed file size inside zip", file)); - SetOffsetAndSize(offset, fileInfo.compressed_size); - m_uncompressedFileSize = fileInfo.uncompressed_size; + SetOffsetAndSize(offset, fileInfo.m_info.compressed_size); + m_uncompressedFileSize = fileInfo.m_info.uncompressed_size; } void ZipFileReader::FilesList(string const & zipContainer, FileList & filesList) { - unzFile const zip = unzOpen64(zipContainer.c_str()); + auto const zip = unzip::Open(zipContainer.c_str()); if (!zip) MYTHROW(OpenZipException, ("Can't get zip file handle", zipContainer)); SCOPE_GUARD(zipGuard, bind(&unzClose, zip)); - if (UNZ_OK != unzGoToFirstFile(zip)) + if (unzip::Code::Ok != unzip::SeekToFirstFile(zip)) MYTHROW(LocateZipException, ("Can't find first file inside zip", zipContainer)); do { - char fileName[256]; - unz_file_info64 fileInfo; - if (UNZ_OK != unzGetCurrentFileInfo64(zip, &fileInfo, fileName, ARRAY_SIZE(fileName), NULL, 0, NULL, 0)) + unzip::FileInfo fileInfo; + if (unzip::Code::Ok != unzip::GetCurrentFileInfo(zip, fileInfo)) MYTHROW(LocateZipException, ("Can't get file name inside zip", zipContainer)); - filesList.push_back(make_pair(fileName, fileInfo.uncompressed_size)); + filesList.push_back(make_pair(fileInfo.m_filename, fileInfo.m_info.uncompressed_size)); - } while (UNZ_OK == unzGoToNextFile(zip)); + } while (unzip::Code::Ok == unzip::SeekToNextFile(zip)); } bool ZipFileReader::IsZip(string const & zipContainer) { - unzFile zip = unzOpen64(zipContainer.c_str()); + auto zip = unzip::Open(zipContainer); if (!zip) return false; - unzClose(zip); + unzip::Close(zip); return true; } @@ -106,36 +107,36 @@ bool ZipFileReader::IsZip(string const & zipContainer) void ZipFileReader::UnzipFile(string const & zipContainer, string const & fileInZip, Delegate & delegate) { - unzFile zip = unzOpen64(zipContainer.c_str()); + auto zip = unzip::Open(zipContainer); if (!zip) MYTHROW(OpenZipException, ("Can't get zip file handle", zipContainer)); - SCOPE_GUARD(zipGuard, bind(&unzClose, zip)); + SCOPE_GUARD(zipGuard, bind(&unzip::Close, zip)); - if (UNZ_OK != unzLocateFile(zip, fileInZip.c_str(), 1)) + if (unzip::Code::Ok != unzip::SeekToFile(zip, fileInZip)) MYTHROW(LocateZipException, ("Can't locate file inside zip", fileInZip)); - if (UNZ_OK != unzOpenCurrentFile(zip)) + if (unzip::Code::Ok != unzip::OpenCurrentFile(zip)) MYTHROW(LocateZipException, ("Can't open file inside zip", fileInZip)); - SCOPE_GUARD(currentFileGuard, bind(&unzCloseCurrentFile, zip)); + SCOPE_GUARD(currentFileGuard, bind(&unzip::CloseCurrentFile, zip)); - unz_file_info64 fileInfo; - if (UNZ_OK != unzGetCurrentFileInfo64(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0)) + unzip::FileInfo fileInfo; + if (unzip::Code::Ok != unzip::GetCurrentFileInfo(zip, fileInfo)) MYTHROW(LocateZipException, ("Can't get uncompressed file size inside zip", fileInZip)); - char buf[ZIP_FILE_BUFFER_SIZE]; + std::array buf; int readBytes = 0; delegate.OnStarted(); do { - readBytes = unzReadCurrentFile(zip, buf, ZIP_FILE_BUFFER_SIZE); + readBytes = unzip::ReadCurrentFile(zip, buf); if (readBytes < 0) { MYTHROW(InvalidZipException, ("Error", readBytes, "while unzipping", fileInZip, "from", zipContainer)); } - delegate.OnBlockUnzipped(static_cast(readBytes), buf); + delegate.OnBlockUnzipped(static_cast(readBytes), buf.data()); } while (readBytes != 0); delegate.OnCompleted(); } diff --git a/generator/srtm_parser.cpp b/generator/srtm_parser.cpp index 2b71cbf3b2..d26a0e19d8 100644 --- a/generator/srtm_parser.cpp +++ b/generator/srtm_parser.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace generator { diff --git a/xcode/minizip/minizip.xcodeproj/project.pbxproj b/xcode/minizip/minizip.xcodeproj/project.pbxproj index 0f03e3b1af..b0886e5ae9 100644 --- a/xcode/minizip/minizip.xcodeproj/project.pbxproj +++ b/xcode/minizip/minizip.xcodeproj/project.pbxproj @@ -7,32 +7,24 @@ objects = { /* Begin PBXBuildFile section */ - 671F59221B8759350032311E /* crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 671F59151B8759350032311E /* crypt.h */; }; - 671F59231B8759350032311E /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 671F59161B8759350032311E /* ioapi.c */; }; - 671F59241B8759350032311E /* ioapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 671F59171B8759350032311E /* ioapi.h */; }; - 671F59281B8759350032311E /* minizip.c in Sources */ = {isa = PBXBuildFile; fileRef = 671F591B1B8759350032311E /* minizip.c */; }; - 671F59291B8759350032311E /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 671F591C1B8759350032311E /* mztools.c */; }; - 671F592A1B8759350032311E /* mztools.h in Headers */ = {isa = PBXBuildFile; fileRef = 671F591D1B8759350032311E /* mztools.h */; }; - 671F592B1B8759350032311E /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 671F591E1B8759350032311E /* unzip.c */; }; - 671F592C1B8759350032311E /* unzip.h in Headers */ = {isa = PBXBuildFile; fileRef = 671F591F1B8759350032311E /* unzip.h */; }; - 671F592D1B8759350032311E /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 671F59201B8759350032311E /* zip.c */; }; - 671F592E1B8759350032311E /* zip.h in Headers */ = {isa = PBXBuildFile; fileRef = 671F59211B8759350032311E /* zip.h */; }; + 3D40DEBB23EB5E0100A0153A /* minizip.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D40DEA223EB5E0100A0153A /* minizip.hpp */; }; + 3D40DECA23EB5E0100A0153A /* minizip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D40DEBA23EB5E0100A0153A /* minizip.cpp */; }; + 3D40DECD23EC069300A0153A /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 3D40DECB23EC069300A0153A /* zip.c */; }; + 3D40DECE23EC069300A0153A /* zip.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D40DECC23EC069300A0153A /* zip.h */; }; + 3D40DED123EC071400A0153A /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 3D40DECF23EC071400A0153A /* unzip.c */; }; + 3D40DED223EC071400A0153A /* unzip.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D40DED023EC071400A0153A /* unzip.h */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 34EBB47C1DBF525A005BE9B8 /* common-debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "common-debug.xcconfig"; path = "../common-debug.xcconfig"; sourceTree = ""; }; 34EBB47D1DBF525A005BE9B8 /* common-release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "common-release.xcconfig"; path = "../common-release.xcconfig"; sourceTree = ""; }; + 3D40DEA223EB5E0100A0153A /* minizip.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = minizip.hpp; sourceTree = ""; }; + 3D40DEBA23EB5E0100A0153A /* minizip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = minizip.cpp; sourceTree = ""; }; + 3D40DECB23EC069300A0153A /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zip.c; path = src/zip.c; sourceTree = ""; }; + 3D40DECC23EC069300A0153A /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zip.h; path = src/zip.h; sourceTree = ""; }; + 3D40DECF23EC071400A0153A /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unzip.c; path = src/unzip.c; sourceTree = ""; }; + 3D40DED023EC071400A0153A /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = unzip.h; path = src/unzip.h; sourceTree = ""; }; 671F590C1B87568D0032311E /* libminizip.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libminizip.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 671F59151B8759350032311E /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = ""; }; - 671F59161B8759350032311E /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = ""; }; - 671F59171B8759350032311E /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = ""; }; - 671F591B1B8759350032311E /* minizip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = minizip.c; sourceTree = ""; }; - 671F591C1B8759350032311E /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = ""; }; - 671F591D1B8759350032311E /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = ""; }; - 671F591E1B8759350032311E /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = ""; }; - 671F591F1B8759350032311E /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = ""; }; - 671F59201B8759350032311E /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = ""; }; - 671F59211B8759350032311E /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -67,16 +59,12 @@ 671F59131B8756990032311E /* minizip */ = { isa = PBXGroup; children = ( - 671F59151B8759350032311E /* crypt.h */, - 671F59161B8759350032311E /* ioapi.c */, - 671F59171B8759350032311E /* ioapi.h */, - 671F591B1B8759350032311E /* minizip.c */, - 671F591C1B8759350032311E /* mztools.c */, - 671F591D1B8759350032311E /* mztools.h */, - 671F591E1B8759350032311E /* unzip.c */, - 671F591F1B8759350032311E /* unzip.h */, - 671F59201B8759350032311E /* zip.c */, - 671F59211B8759350032311E /* zip.h */, + 3D40DECF23EC071400A0153A /* unzip.c */, + 3D40DED023EC071400A0153A /* unzip.h */, + 3D40DECB23EC069300A0153A /* zip.c */, + 3D40DECC23EC069300A0153A /* zip.h */, + 3D40DEBA23EB5E0100A0153A /* minizip.cpp */, + 3D40DEA223EB5E0100A0153A /* minizip.hpp */, ); name = minizip; path = ../../3party/minizip; @@ -89,11 +77,9 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 671F592E1B8759350032311E /* zip.h in Headers */, - 671F59221B8759350032311E /* crypt.h in Headers */, - 671F592C1B8759350032311E /* unzip.h in Headers */, - 671F59241B8759350032311E /* ioapi.h in Headers */, - 671F592A1B8759350032311E /* mztools.h in Headers */, + 3D40DED223EC071400A0153A /* unzip.h in Headers */, + 3D40DECE23EC069300A0153A /* zip.h in Headers */, + 3D40DEBB23EB5E0100A0153A /* minizip.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -136,6 +122,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 671F59031B87568D0032311E; @@ -153,11 +140,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 671F592B1B8759350032311E /* unzip.c in Sources */, - 671F59231B8759350032311E /* ioapi.c in Sources */, - 671F59281B8759350032311E /* minizip.c in Sources */, - 671F592D1B8759350032311E /* zip.c in Sources */, - 671F59291B8759350032311E /* mztools.c in Sources */, + 3D40DED123EC071400A0153A /* unzip.c in Sources */, + 3D40DECA23EB5E0100A0153A /* minizip.cpp in Sources */, + 3D40DECD23EC069300A0153A /* zip.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -192,6 +177,7 @@ isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_PREFIX = lib; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -200,6 +186,7 @@ isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_PREFIX = lib; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -220,6 +207,7 @@ isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_PREFIX = lib; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = "Production Full";