]> git.lyx.org Git - features.git/commitdiff
minizip fixes for msvc and cmake
authorPeter Kümmel <syntheticpp@gmx.net>
Tue, 21 Aug 2007 21:09:45 +0000 (21:09 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Tue, 21 Aug 2007 21:09:45 +0000 (21:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19700 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/src/support/CMakeLists.txt
src/support/filetools.cpp
src/support/minizip/iowin32.c
src/support/minizip/unzip.c

index a91e2874812c410ac69483d46eea5f26d4743511..65ccbbc8a4f5f448f4f53e2deedbe3c235d6fd79 100644 (file)
@@ -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)
 
 
index 62c323c61d4199c20f3d4387550c1a767b9255b5..5558a0321b1c3bac0417c06ba9a83671d8cbbcfb 100644 (file)
@@ -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
index a9b5f78399607598f9411767205eba45bb306261..36e32250a948ff114b00ea0c46a2547666dca8d1 100644 (file)
@@ -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;
index 7d88d93e858a8eb6fc1ae2c206f3728b9fa5ae06..842853f88bf18c309142e36688e44ca93ae35fec 100644 (file)
@@ -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)