From: Peter Kümmel Date: Tue, 21 Aug 2007 21:09:45 +0000 (+0000) Subject: minizip fixes for msvc and cmake X-Git-Tag: 1.6.10~8771 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=281f44e29525aedf5971e6c72bb2bd2d3c8d85fb;p=features.git minizip fixes for msvc and cmake git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19700 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/cmake/src/support/CMakeLists.txt b/development/cmake/src/support/CMakeLists.txt index a91e287481..65ccbbc8a4 100644 --- a/development/cmake/src/support/CMakeLists.txt +++ b/development/cmake/src/support/CMakeLists.txt @@ -12,6 +12,9 @@ configure_file(${TOP_SRC_DIR}/src/support/Package.cpp.in file(GLOB support_sources ${TOP_SRC_DIR}/src/support/${LYX_CPP_FILES}) file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES}) +file(GLOB support_minzip_sources ${TOP_SRC_DIR}/src/support/minizip/*.c) +file(GLOB support_min_zip_headers ${TOP_SRC_DIR}/src/support/minizip/*.h) + list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/os_win32.cpp ${TOP_SRC_DIR}/src/support/os_unix.cpp @@ -24,9 +27,12 @@ set(support_sources ${support_sources} ${CMAKE_CURRENT_BINARY_DIR}/package.C) lyx_add_msvc_pch(support) -include_directories(${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR}) +include_directories(${TOP_SRC_DIR}/src/support ${TOP_SRC_DIR}/src/support/minizip ${ICONV_INCLUDE_DIR}) + if(NOT MERGE_FILES) + set(support_sources ${support_sources} ${support_minzip_sources}) + set(support_headers ${support_headers} ${support_minzip_headers}) add_library(support ${library_type} ${support_sources} ${support_headers}) else(NOT MERGE_FILES) # move to front @@ -36,8 +42,7 @@ else(NOT MERGE_FILES) list(APPEND support_sources ${TOP_SRC_DIR}/src/support/lstrings.cpp) list(REVERSE support_sources) lyx_const_touched_files(_allinone support_sources) - add_library(support ${library_type} ${_allinone_files}) - + add_library(support ${library_type} ${_allinone_files} ${support_minzip_sources}) endif(NOT MERGE_FILES) diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 62c323c61d..5558a0321b 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -1505,7 +1505,7 @@ int do_extract_currentfile(unzFile uf, uInt size_buf; unz_file_info file_info; - uLong ratio=0; + //uLong ratio=0; err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); if (err!=UNZ_OK) { @@ -1630,7 +1630,7 @@ bool unzipToDir(string const & zipfile, string const & dirname) uLong i; unz_global_info gi; int err; - FILE* fout=NULL; + //FILE* fout=NULL; int opt_extract_without_path = 0; int opt_overwrite = 1; char * password = NULL; @@ -1657,6 +1657,7 @@ bool unzipToDir(string const & zipfile, string const & dirname) } unzCloseCurrentFile(uf); + return true; } } //namespace support diff --git a/src/support/minizip/iowin32.c b/src/support/minizip/iowin32.c index a9b5f78399..36e32250a9 100644 --- a/src/support/minizip/iowin32.c +++ b/src/support/minizip/iowin32.c @@ -67,7 +67,7 @@ voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode) const char* filename; int mode; { - const char* mode_fopen = NULL; + //const char* mode_fopen = NULL; DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; HANDLE hFile = 0; voidpf ret=NULL; diff --git a/src/support/minizip/unzip.c b/src/support/minizip/unzip.c index 7d88d93e85..842853f88b 100644 --- a/src/support/minizip/unzip.c +++ b/src/support/minizip/unzip.c @@ -1523,7 +1523,7 @@ extern int ZEXPORT unzGetGlobalComment ( char *szComment, uLong uSizeBuf) { - int err=UNZ_OK; + //int err=UNZ_OK; unz_s* s; uLong uReadThis ; if (file==NULL)