Skip to content

Commit 755a42a

Browse files
authoredJul 17, 2020
Bump libzip to 1.7.3 and go back to mingw (#65)
Context: https://libzip.org/news/release-1.7.3.html Context: https://libzip.org/news/release-1.7.2.html Context: https://libzip.org/news/release-1.7.1.html Context: https://libzip.org/news/release-1.7.0.html Upstream changes: * Add support for encrypting using traditional PKWare encryption. * Add zip_compression_method_supported(). * Add zip_encryption_method_supported(). * Add the ZIP_SOURCE_GET_FILE_ATTRIBUTES source command. * Refactor stdio file backend. * Add CMake find_project() support. * Restore LIBZIP_VERSION_{MAJOR,MINOR,MICRO} symbols. * Fixes warnings reported by PVS-Studio. * Add LIBZIP_DO_INSTALL build setting to make it easier to use libzip as subproject. * Fixes for the CMake find_project() files. * libzip moved to the CMake libzip:: NAMESPACE. * CMake usage best practice cleanups. * Support cmake < 3.17 again. * Fix pkgconfig file (regression in 1.7.2). Windows `libzip` DLL is again built with mingw
1 parent 5ae5e70 commit 755a42a

File tree

4 files changed

+25
-101
lines changed

4 files changed

+25
-101
lines changed
 

Diff for: ‎LibZipSharp.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<_LibZipSharpNugetVersion>1.0.15</_LibZipSharpNugetVersion>
3+
<_LibZipSharpNugetVersion>1.0.16</_LibZipSharpNugetVersion>
44
</PropertyGroup>
55
</Project>

Diff for: ‎azure-pipelines.yml

+20-96
Original file line numberDiff line numberDiff line change
@@ -14,55 +14,7 @@ variables:
1414
stages:
1515
- stage: Build
1616
jobs:
17-
- job: buildWindows
18-
pool:
19-
vmImage: windows-latest
20-
variables:
21-
LIBZIP_FEATURES: -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DBUILD_TOOLS=OFF -DBUILD_REGRESS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF
22-
COMMON_CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
23-
steps:
24-
- script: |
25-
echo "Hello"
26-
git submodule update --init --recursive
27-
cd external/vcpkg
28-
bootstrap-vcpkg.bat
29-
displayName: "Build vcpkg"
30-
- script: |
31-
external\vcpkg\vcpkg.exe integrate install
32-
external\vcpkg\vcpkg.exe install zlib:x64-windows-static
33-
mkdir .\build\Windows\64
34-
cd .\build\Windows\64
35-
cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x64-windows-static -A x64 ..\..\..\external\libzip
36-
cmake --build . --config Release -v
37-
displayName: "x64 Build"
38-
- script: |
39-
external\vcpkg\vcpkg.exe integrate install
40-
external\vcpkg\vcpkg.exe install zlib:x86-windows-static
41-
mkdir .\build\Windows\32
42-
cd .\build\Windows\32
43-
cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x86-windows-static -A Win32 ..\..\..\external\libzip
44-
cmake --build . --config Release -v
45-
displayName: "x86 Build"
46-
- task: ArchiveFiles@2
47-
inputs:
48-
rootFolderOrFile: build\Windows\32\lib\Release\zip.dll
49-
includeRootFolder: false
50-
archiveType: 7z
51-
replaceExistingArchive: true
52-
archiveFile: $(Build.ArtifactStagingDirectory)\libzip-windows-x86.7z
53-
- task: ArchiveFiles@2
54-
inputs:
55-
rootFolderOrFile: build\Windows\64\lib\Release\zip.dll
56-
includeRootFolder: false
57-
archiveType: 7z
58-
replaceExistingArchive: true
59-
archiveFile: $(Build.ArtifactStagingDirectory)\libzip-windows-x64.7z
60-
- task: PublishBuildArtifacts@1
61-
displayName: upload artifacts
62-
inputs:
63-
artifactName: 'native'
64-
pathtoPublish: $(Build.ArtifactStagingDirectory)
65-
- job: buildlinux
17+
- job: buildLinux
6618
pool:
6719
vmImage: ubuntu-16.04
6820
steps:
@@ -72,9 +24,9 @@ stages:
7224
sudo apt -f -u install ninja-build gcc-multilib lib32z1-dev zlib1g-dev libssl-dev libssl1.1:i386 libssl-dev:i386 libc-dev:i386 libc6-dev-i386 -y
7325
git submodule update --init --recursive
7426
displayName: 'Install Tools'
75-
- bash: |
76-
patch --verbose -d external/libzip -p1 -l < libzip-static.patch
77-
displayName: 'Apply Patch'
27+
# - bash: |
28+
# patch --verbose -d external/libzip -p1 -l < libzip-static.patch
29+
# displayName: 'Apply Patch'
7830
- bash: |
7931
./build_native
8032
displayName: 'Build Linux x64'
@@ -84,14 +36,14 @@ stages:
8436
displayName: 'Build Linux x86'
8537
- task: ArchiveFiles@2
8638
inputs:
87-
rootFolderOrFile: build/Linux/32/lib/libzip.so.5.1
39+
rootFolderOrFile: build/Linux/32/lib/libzip.so.5.3
8840
includeRootFolder: false
8941
archiveType: 7z
9042
replaceExistingArchive: true
9143
archiveFile: $(Build.ArtifactStagingDirectory)/libzip-linux-x86.7z
9244
- task: ArchiveFiles@2
9345
inputs:
94-
rootFolderOrFile: build/Linux/64/lib/libzip.so.5.1
46+
rootFolderOrFile: build/Linux/64/lib/libzip.so.5.3
9547
includeRootFolder: false
9648
archiveType: 7z
9749
replaceExistingArchive: true
@@ -101,25 +53,25 @@ stages:
10153
inputs:
10254
artifactName: 'native'
10355
pathtoPublish: $(Build.ArtifactStagingDirectory)
104-
- job: build
105-
dependsOn:
106-
- buildlinux
107-
- buildWindows
56+
- job: buildMacOS
57+
dependsOn: buildLinux
10858
pool:
10959
vmImage: macOS-10.14
11060
steps:
11161
- bash: |
112-
brew install p7zip ninja
62+
brew tap xamarin/xamarin-android-windeps
63+
brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/a6542037a48a55061a4c319e6bb174b3715f7cbe/Formula/mingw-w64.rb
64+
brew install mingw-w64 p7zip
65+
brew install ninja xamarin/xamarin-android-windeps/mingw-zlib
11366
git submodule update --init --recursive
67+
displayName: 'Install toolchain'
11468
- bash: |
11569
HOSTOS=Darwin ./build_native
116-
displayName: 'Build Darwin'
117-
- bash: |
70+
./build_windows
11871
mkdir -p build/Linux/64
11972
mkdir -p build/Linux/32
120-
mkdir -p build/Windows/64
121-
mkdir -p build/Windows/32
12273
find build/* | grep libzip
74+
displayName: 'Build native and Windows'
12375
- task: DownloadBuildArtifacts@0
12476
displayName: download artifacts
12577
inputs:
@@ -135,23 +87,10 @@ stages:
13587
inputs:
13688
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/native/libzip-linux-x86.7z
13789
destinationFolder: build/Linux/32
138-
- task: ExtractFiles@1
139-
displayName: Extract 64 bit Windows native
140-
inputs:
141-
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/native/libzip-windows-x64.7z
142-
destinationFolder: build/Windows/64
143-
- task: ExtractFiles@1
144-
displayName: Extract 32 bit Windows native
145-
inputs:
146-
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/native/libzip-windows-x86.7z
147-
destinationFolder: build/Windows/32
14890
- bash: |
149-
mv build/Linux/32/libzip.so.5.1 build/Linux/32/libzip.so
150-
mv build/Linux/64/libzip.so.5.1 build/Linux/64/libzip.so
151-
mv build/Windows/32/zip.dll build/Windows/32/libzip.dll
152-
mv build/Windows/64/zip.dll build/Windows/64/libzip.dll
91+
mv build/Linux/32/libzip.so.5.3 build/Linux/32/libzip.so
92+
mv build/Linux/64/libzip.so.5.3 build/Linux/64/libzip.so
15393
rm $(Build.ArtifactStagingDirectory)/native/libzip-linux-*.7z
154-
rm $(Build.ArtifactStagingDirectory)/native/libzip-windows-*.7z
15594
displayName: 'Find libzip'
15695
- task: MSBuild@1
15796
displayName: 'Build solution libZipSharp.csproj'
@@ -181,7 +120,7 @@ stages:
181120
artifactName: 'nuget'
182121
pathtoPublish: $(Build.ArtifactStagingDirectory)
183122
- stage: Test
184-
dependsOn: Build
123+
dependsOn: Build
185124
jobs:
186125
- job: testlinux
187126
displayName: 'Test Linux'
@@ -199,37 +138,22 @@ stages:
199138
solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj
200139
configuration: Release
201140
msbuildArguments: /restore /t:RunNunitTests /p:ReferenceNuget=True /v:diag
202-
- task: DotNetCoreCLI@2
203-
displayName: "Run Tests under .net Core"
204-
inputs:
205-
command: test
206-
projects: 'LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
207-
arguments: '--configuration Release --framework netcoreapp3.1 --no-build'
208141
- job: testmacos
209142
displayName: 'Test MacOS'
210143
pool:
211-
vmImage: macOS-10.14
144+
vmImage: macOS-10.14
212145
steps:
213146
- task: DownloadBuildArtifacts@0
214147
displayName: download artifacts
215148
inputs:
216149
artifactName: NuGet
217150
downloadPath: $(Build.SourcesDirectory)
218-
- task: UseDotNet@2
219-
inputs:
220-
version: '3.1.x'
221151
- task: MSBuild@1
222152
displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
223153
inputs:
224154
solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj
225155
configuration: Release
226156
msbuildArguments: /restore /t:RunNunitTests /p:ReferenceNuget=True /v:diag
227-
# - task: DotNetCoreCLI@2
228-
# displayName: "Run Tests under .net Core"
229-
# inputs:
230-
# command: test
231-
# projects: 'LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
232-
# arguments: '--configuration Release --framework netcoreapp3.1 --no-build'
233157
- job: testwindows
234158
displayName: 'Test Windows'
235159
pool:
@@ -241,7 +165,7 @@ stages:
241165
artifactName: NuGet
242166
downloadPath: $(Build.SourcesDirectory)
243167
- task: MSBuild@1
244-
displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj and Run tests'
168+
displayName: 'Build solution LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj'
245169
inputs:
246170
solution: LibZipSharp.UnitTest/LibZipSharp.UnitTest.csproj
247171
configuration: Release

Diff for: ‎external/libzip

Submodule libzip updated 252 files

Diff for: ‎libZipSharp.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
<Link>libZipSharp.dll.config</Link>
4444
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4545
</None>
46-
<None Include="build\Darwin\64\lib\libzip.5.1.dylib" PackagePath="runtimes\osx\native\libzip.dylib" Pack="true" />
47-
<None Include="build\Windows\64\libzip.dll" PackagePath="runtimes\win-x64\native\libzip.dll" Pack="true" />
48-
<None Include="build\Windows\32\libzip.dll" PackagePath="runtimes\win-x86\native\libzip.dll" Pack="true" />
46+
<None Include="build\Darwin\64\lib\libzip.5.3.dylib" PackagePath="runtimes\osx\native\libzip.dylib" Pack="true" />
47+
<None Include="build\Windows\64\lib\libzip.dll" PackagePath="runtimes\win-x64\native\libzip.dll" Pack="true" />
48+
<None Include="build\Windows\32\lib\libzip.dll" PackagePath="runtimes\win-x86\native\libzip.dll" Pack="true" />
4949
<None Include="build\Linux\64\libzip.so" PackagePath="runtimes\linux-x64\native\libzip.so" Pack="true" />
5050
<None Include="build\Linux\32\libzip.so" PackagePath="runtimes\linux-x86\native\libzip.so" Pack="true" />
5151
<None Include="LICENSE" PackagePath="Licences" Pack="true" />

0 commit comments

Comments
 (0)
Please sign in to comment.