mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
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:
parent
25b22bc54d
commit
281f44e295
@ -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_sources ${TOP_SRC_DIR}/src/support/${LYX_CPP_FILES})
|
||||||
file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_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
|
list(REMOVE_ITEM support_sources
|
||||||
${TOP_SRC_DIR}/src/support/os_win32.cpp
|
${TOP_SRC_DIR}/src/support/os_win32.cpp
|
||||||
${TOP_SRC_DIR}/src/support/os_unix.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)
|
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)
|
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})
|
add_library(support ${library_type} ${support_sources} ${support_headers})
|
||||||
else(NOT MERGE_FILES)
|
else(NOT MERGE_FILES)
|
||||||
# move to front
|
# move to front
|
||||||
@ -36,8 +42,7 @@ else(NOT MERGE_FILES)
|
|||||||
list(APPEND support_sources ${TOP_SRC_DIR}/src/support/lstrings.cpp)
|
list(APPEND support_sources ${TOP_SRC_DIR}/src/support/lstrings.cpp)
|
||||||
list(REVERSE support_sources)
|
list(REVERSE support_sources)
|
||||||
lyx_const_touched_files(_allinone 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)
|
endif(NOT MERGE_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1505,7 +1505,7 @@ int do_extract_currentfile(unzFile uf,
|
|||||||
uInt size_buf;
|
uInt size_buf;
|
||||||
|
|
||||||
unz_file_info file_info;
|
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);
|
err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
|
||||||
|
|
||||||
if (err!=UNZ_OK) {
|
if (err!=UNZ_OK) {
|
||||||
@ -1630,7 +1630,7 @@ bool unzipToDir(string const & zipfile, string const & dirname)
|
|||||||
uLong i;
|
uLong i;
|
||||||
unz_global_info gi;
|
unz_global_info gi;
|
||||||
int err;
|
int err;
|
||||||
FILE* fout=NULL;
|
//FILE* fout=NULL;
|
||||||
int opt_extract_without_path = 0;
|
int opt_extract_without_path = 0;
|
||||||
int opt_overwrite = 1;
|
int opt_overwrite = 1;
|
||||||
char * password = NULL;
|
char * password = NULL;
|
||||||
@ -1657,6 +1657,7 @@ bool unzipToDir(string const & zipfile, string const & dirname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
unzCloseCurrentFile(uf);
|
unzCloseCurrentFile(uf);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace support
|
} //namespace support
|
||||||
|
@ -67,7 +67,7 @@ voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode)
|
|||||||
const char* filename;
|
const char* filename;
|
||||||
int mode;
|
int mode;
|
||||||
{
|
{
|
||||||
const char* mode_fopen = NULL;
|
//const char* mode_fopen = NULL;
|
||||||
DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
|
DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
|
||||||
HANDLE hFile = 0;
|
HANDLE hFile = 0;
|
||||||
voidpf ret=NULL;
|
voidpf ret=NULL;
|
||||||
|
@ -1523,7 +1523,7 @@ extern int ZEXPORT unzGetGlobalComment (
|
|||||||
char *szComment,
|
char *szComment,
|
||||||
uLong uSizeBuf)
|
uLong uSizeBuf)
|
||||||
{
|
{
|
||||||
int err=UNZ_OK;
|
//int err=UNZ_OK;
|
||||||
unz_s* s;
|
unz_s* s;
|
||||||
uLong uReadThis ;
|
uLong uReadThis ;
|
||||||
if (file==NULL)
|
if (file==NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user