minizip fixes for msvc and cmake

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19700 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-08-21 21:09:45 +00:00
parent 25b22bc54d
commit 281f44e295
4 changed files with 13 additions and 7 deletions

View 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)

View 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

View 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;

View 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)