diff --git a/.gitmodules b/.gitmodules index 940c650d3a4..75d6f877dac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,7 +20,7 @@ [submodule "external/libzip"] path = external/libzip url = https://github.com/nih-at/libzip.git - branch = master + branch = rel-1-5-1 [submodule "external/LibZipSharp"] path = external/LibZipSharp url = https://github.com/grendello/LibZipSharp.git diff --git a/external/LibZipSharp b/external/LibZipSharp index b7aab1e26ae..4d3e59c8960 160000 --- a/external/LibZipSharp +++ b/external/LibZipSharp @@ -1 +1 @@ -Subproject commit b7aab1e26aed3e0269a73cc6f8ce973169741f76 +Subproject commit 4d3e59c8960562309c817a4c367300e6a20bf9b7 diff --git a/external/libzip b/external/libzip index 1d8b1ac4d20..b95cf3fdd4c 160000 --- a/external/libzip +++ b/external/libzip @@ -1 +1 @@ -Subproject commit 1d8b1ac4d20b8ef8d3f5d496dabebaa0ff9019ff +Subproject commit b95cf3fdd4c1271f922017f092d02a878873425c diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.Darwin.projitems b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.Darwin.projitems index 57a40ae6976..e316e8bb019 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.Darwin.projitems +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.Darwin.projitems @@ -1,7 +1,7 @@  - + PreserveNewest diff --git a/src/libzip-windows/libzip-windows.csproj b/src/libzip-windows/libzip-windows.csproj index 647f42326b0..648df6500d0 100644 --- a/src/libzip-windows/libzip-windows.csproj +++ b/src/libzip-windows/libzip-windows.csproj @@ -16,7 +16,7 @@ - + ResolveReferences; _BuildUnlessCached diff --git a/src/libzip-windows/libzip-windows.projitems b/src/libzip-windows/libzip-windows.projitems index f77d1cab3f1..e7ad2b76031 100644 --- a/src/libzip-windows/libzip-windows.projitems +++ b/src/libzip-windows/libzip-windows.projitems @@ -1,15 +1,28 @@ + + \usr\bin\cmake + $(CMakeBinary32) + -DCMAKE_TOOLCHAIN_FILE=$(MSBuildThisFileDirectory)\mingw-linux-32.cmake + -DCMAKE_TOOLCHAIN_FILE=$(MSBuildThisFileDirectory)\mingw-linux-64.cmake + + + cmake + cmake + -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_SHARED_LIBS=ON + -DCMAKE_C_COMPILER=$(AndroidMxeFullPath)\$(MingwCommandPrefix32)-gcc -DCMAKE_CXX_COMPILER=$(AndroidMxeFullPath)\$(MingwCommandPrefix32)-g++ -DCMAKE_RC_COMPILER=$(AndroidMxeFullPath)\$(MingwCommandPrefix32)-windres -DCMAKE_FIND_ROOT_PATH=$(AndroidMxeFullPath)\$(MingwCommandPrefix32) + -DCMAKE_C_COMPILER=$(AndroidMxeFullPath)\$(MingwCommandPrefix64)-gcc -DCMAKE_CXX_COMPILER=$(AndroidMxeFullPath)\$(MingwCommandPrefix64)-g++ -DCMAKE_RC_COMPILER=$(AndroidMxeFullPath)\$(MingwCommandPrefix64)-windres -DCMAKE_FIND_ROOT_PATH=$(AndroidMxeFullPath)\$(MingwCommandPrefix64) + <_LibZipTarget Include="host-mxe-Win64" Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win64:'))"> - $(AndroidMxeFullPath)\bin\x86_64-w64-mingw32.static-cmake - + $(CMakeBinary64) + $(CMakeFlags64) x64/libzip.dll lib/libzip.dll <_LibZipTarget Include="host-mxe-Win32" Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win32:'))"> - $(AndroidMxeFullPath)\bin\i686-w64-mingw32.static-cmake - + $(CMakeBinary32) + $(CMakeFlags32) libzip.dll lib/libzip.dll diff --git a/src/libzip-windows/mingw-linux-32.cmake b/src/libzip-windows/mingw-linux-32.cmake new file mode 100644 index 00000000000..c96f47f66e7 --- /dev/null +++ b/src/libzip-windows/mingw-linux-32.cmake @@ -0,0 +1,20 @@ +# the name of the target operating system +SET(CMAKE_SYSTEM_NAME Windows) + +# which compilers to use for C and C++ +SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc) +SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) +SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres) + +# here is the target environment located +SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(BUILD_SHARED_LIBS ON) diff --git a/src/libzip-windows/mingw-linux-64.cmake b/src/libzip-windows/mingw-linux-64.cmake new file mode 100644 index 00000000000..11e55825ea2 --- /dev/null +++ b/src/libzip-windows/mingw-linux-64.cmake @@ -0,0 +1,20 @@ +# the name of the target operating system +SET(CMAKE_SYSTEM_NAME Windows) + +# which compilers to use for C and C++ +SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) +SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) +SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) + +# here is the target environment located +SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(BUILD_SHARED_LIBS ON) diff --git a/src/libzip/libzip.projitems b/src/libzip/libzip.projitems index 7582776ebd8..91992937732 100644 --- a/src/libzip/libzip.projitems +++ b/src/libzip/libzip.projitems @@ -3,13 +3,13 @@ <_LibZipTarget Include="host-Darwin" Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Darwin:'))"> cmake - -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" - libzip.3.0.dylib - lib/libzip.3.0.dylib + -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" -DBUILD_SHARED_LIBS=ON + libzip.5.0.dylib + lib/libzip.5.0.dylib <_LibZipTarget Include="host-Linux" Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:')) AND '$(_LinuxBuildLibZip)' == 'true' "> cmake - + -DBUILD_SHARED_LIBS=ON libzip.so lib/libzip.so