Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LibZipSharp.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LibZipSharpAssemblyVersion>2.0.3</_LibZipSharpAssemblyVersion>
<_LibZipSharpAssemblyVersion>2.0.4</_LibZipSharpAssemblyVersion>
<!--
Nuget Version. You can append things like -alpha-1 etc to this value.
But always leave the $(_LibZipSharpAssemblyVersion) value at the start.
-->
<_LibZipSharpNugetVersion>$(_LibZipSharpAssemblyVersion)</_LibZipSharpNugetVersion>
<_LibZipSharpNugetVersion>$(_LibZipSharpAssemblyVersion)-alpha-1</_LibZipSharpNugetVersion>
<_NativeBuildDir>$(MSBuildThisFileDirectory)lzsbuild</_NativeBuildDir>
<_ExternalDir>$(MSBuildThisFileDirectory)external</_ExternalDir>
<_MonoPosixNugetVersion>7.0.0-final.1.21369.2</_MonoPosixNugetVersion>
Expand Down
3 changes: 3 additions & 0 deletions LibZipSharp/Xamarin.LibZipSharp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<_LibZipNativeLibs Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\libZipSharpNative.*">
<Link>lib64\%(FileName)%(Extension)</Link>
</_LibZipNativeLibs>
<_LibZipNativeLibs Include="$(MSBuildThisFileDirectory)..\runtimes\win-arm64\native\libZipSharpNative.*">
<Link>%(FileName)%(Extension)</Link>
</_LibZipNativeLibs>
<_LibZipNativeLibs Include="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\libZipSharpNative.*">
<Link>%(FileName)%(Extension)</Link>
</_LibZipNativeLibs>
Expand Down
2 changes: 2 additions & 0 deletions LibZipSharp/libZipSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
<None Include="$(_NativeBuildDir)\lib\Darwin\libZipSharpNative.dylib" PackagePath="runtimes\osx\native\libZipSharpNative.dylib" Pack="true" />
<None Include="$(_NativeBuildDir)\lib\win64\libZipSharpNative.dll" PackagePath="runtimes\win-x64\native\libZipSharpNative.dll" Pack="true" />
<None Include="$(_NativeBuildDir)\lib\win64\libZipSharpNative.pdb" PackagePath="runtimes\win-x64\native\libZipSharpNative.pdb" Pack="true" />
<None Include="$(_NativeBuildDir)\lib\winarm64\libZipSharpNative.dll" PackagePath="runtimes\win-arm64\native\libZipSharpNative.dll" Pack="true" />
<None Include="$(_NativeBuildDir)\lib\winarm64\libZipSharpNative.pdb" PackagePath="runtimes\win-arm64\native\libZipSharpNative.pdb" Pack="true" />
<None Include="$(_NativeBuildDir)\lib\win32\libZipSharpNative.dll" PackagePath="runtimes\win-x86\native\libZipSharpNative.dll" Pack="true" />
<None Include="$(_NativeBuildDir)\lib\win32\libZipSharpNative.pdb" PackagePath="runtimes\win-x86\native\libZipSharpNative.pdb" Pack="true" />
<None Include="$(_NativeBuildDir)\lib\Linux\libZipSharpNative.so" PackagePath="runtimes\linux-x64\native\libZipSharpNative.so" Pack="true" />
Expand Down
24 changes: 20 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ stages:
pool:
name: AzurePipelines-EO
demands:
- ImageOverride -equals AzurePipelinesWindows2019compliant
- ImageOverride -equals AzurePipelinesWindows2022compliant
steps:
- script: |
echo "Hello"
Expand All @@ -42,6 +42,13 @@ stages:
archiveType: 7z
replaceExistingArchive: true
archiveFile: $(Build.ArtifactStagingDirectory)\libzip-windows-x64.7z
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: lzsbuild\lib\winarm64\RelWithDebInfo\
includeRootFolder: false
archiveType: 7z
replaceExistingArchive: true
archiveFile: $(Build.ArtifactStagingDirectory)\libzip-windows-arm-x64.7z
- task: PublishBuildArtifacts@1
displayName: upload artifacts
inputs:
Expand Down Expand Up @@ -107,6 +114,11 @@ stages:
inputs:
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/native/libzip-windows-x64.7z
destinationFolder: lzsbuild/lib/win64
- task: ExtractFiles@1
displayName: Extract 64 bit ARM Windows native
inputs:
archiveFilePatterns: $(Build.ArtifactStagingDirectory)/native/libzip-windows-arm-x64.7z
destinationFolder: lzsbuild/lib/winarm64
- task: ExtractFiles@1
displayName: Extract 32 bit Windows native
inputs:
Expand Down Expand Up @@ -158,7 +170,9 @@ stages:
- job: testlinux
displayName: 'Test Linux'
pool:
vmImage: ubuntu-18.04
name: AzurePipelines-EO
demands:
- ImageOverride -equals AzurePipelinesUbuntu18.04compliant
steps:
- task: DownloadBuildArtifacts@0
displayName: download artifacts
Expand All @@ -185,7 +199,7 @@ stages:
- job: testmacos
displayName: 'Test MacOS'
pool:
vmImage: macOS-latest
vmImage: internal-macos-11
steps:
- template: yaml-templates/use-dot-net.yaml
parameters:
Expand Down Expand Up @@ -215,7 +229,9 @@ stages:
- job: testwindows
displayName: 'Test Windows'
pool:
vmImage: windows-latest
name: AzurePipelines-EO
demands:
- ImageOverride -equals AzurePipelinesWindows2022compliant
steps:
- template: yaml-templates/use-dot-net.yaml
parameters:
Expand Down
79 changes: 73 additions & 6 deletions build_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,31 @@ set BUILD_DIR_ROOT=%CD%\lzsbuild
set DEPS_BUILD_DIR_ROOT=%BUILD_DIR_ROOT%\deps
set DEPS_BUILD_DIR_ROOT_32=%DEPS_BUILD_DIR_ROOT%\win32
set DEPS_BUILD_DIR_ROOT_64=%DEPS_BUILD_DIR_ROOT%\win64
set DEPS_BUILD_DIR_ROOT_ARM64=%DEPS_BUILD_DIR_ROOT%\winarm64

set LIB_BUILD_DIR_ROOT=%BUILD_DIR_ROOT%\lib
set LIB_BUILD_DIR_ROOT_32=%LIB_BUILD_DIR_ROOT%\win32
set LIB_BUILD_DIR_ROOT_64=%LIB_BUILD_DIR_ROOT%\win64
set LIB_BUILD_DIR_ROOT_ARM64=%LIB_BUILD_DIR_ROOT%\winarm64

set ARTIFACTS_DIR_ROOT=%CD%\artifacts
set ARTIFACTS_DIR_ROOT_64=%ARTIFACTS_DIR_ROOT%\win64
set ARTIFACTS_DIR_ROOT_32=%ARTIFACTS_DIR_ROOT%\win32
set ARTIFACTS_DIR_ROOT_ARM64=%ARTIFACTS_DIR_ROOT%\winarm64

set CONFIG=RelWithDebInfo
set COMMON_CMAKE_PARAMS=-DCMAKE_BUILD_TYPE=%CONFIG% -G "Visual Studio 16 2019"
set COMMON_CMAKE_PARAMS=-DCMAKE_BUILD_TYPE=%CONFIG% -G "Visual Studio 17 2022"

echo Common cmake params: %COMMON_CMAKE_PARAMS%
echo 32-bit dependencies artifacts dir: %ARTIFACTS_DIR_ROOT_32%
echo 64-bit dependencies artifacts dir: %ARTIFACTS_DIR_ROOT_64%
echo 64-bit arm dependencies artifacts dir: %ARTIFACTS_DIR_ROOT_ARM64%
echo 32-bit dependencies build root: %DEPS_BUILD_DIR_ROOT_32%
echo 64-bit dependencies build root: %DEPS_BUILD_DIR_ROOT_64%
echo 64-bit arm dependencies build root: %DEPS_BUILD_DIR_ROOT_ARM64%
echo 32-bit library build root: %LIB_BUILD_DIR_ROOT_32%
echo 64-bit library build root: %LIB_BUILD_DIR_ROOT_64%
echo 64-bit arm library build root: %LIB_BUILD_DIR_ROOT_ARM64%

pushd .
cd external\vcpkg
Expand All @@ -31,12 +37,19 @@ popd
external\vcpkg\vcpkg.exe integrate install
if %errorlevel% neq 0 exit /b %errorlevel%

external\vcpkg\vcpkg.exe install liblzma:x64-windows-static liblzma:x86-windows-static
external\vcpkg\vcpkg.exe install liblzma:x64-windows-static liblzma:x86-windows-static liblzma:arm-windows-static
if %errorlevel% neq 0 exit /b %errorlevel%

REM 64-bit deps
mkdir "%DEPS_BUILD_DIR_ROOT_64%"
cmake %COMMON_CMAKE_PARAMS% -B "%DEPS_BUILD_DIR_ROOT_64%" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_DEPENDENCIES=ON "-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_64%" "-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_64%" -A x64 .
cmake %COMMON_CMAKE_PARAMS% ^
-B "%DEPS_BUILD_DIR_ROOT_64%" ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static ^
-DBUILD_DEPENDENCIES=ON ^
"-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_64%" ^
"-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_64%" ^
-A x64 .

if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build "%DEPS_BUILD_DIR_ROOT_64%" -v --config %CONFIG%
Expand All @@ -45,9 +58,34 @@ if %errorlevel% neq 0 exit /b %errorlevel%
cmake --install "%DEPS_BUILD_DIR_ROOT_64%" --config %CONFIG%
if %errorlevel% neq 0 exit /b %errorlevel%

REM 64-bit arm deps
mkdir "%DEPS_BUILD_DIR_ROOT_ARM64%"
cmake %COMMON_CMAKE_PARAMS% ^
-B "%DEPS_BUILD_DIR_ROOT_ARM64%" ^
-DVCPKG_TARGET_TRIPLET=arm-windows-static ^
-DBUILD_DEPENDENCIES=ON ^
"-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_ARM64%" ^
"-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_ARM64%" ^
-A arm64 .

if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build "%DEPS_BUILD_DIR_ROOT_ARM64%" -v --config %CONFIG%
if %errorlevel% neq 0 exit /b %errorlevel%

cmake --install "%DEPS_BUILD_DIR_ROOT_ARM64%" --config %CONFIG%
if %errorlevel% neq 0 exit /b %errorlevel%

REM 32-bit deps
mkdir "%DEPS_BUILD_DIR_ROOT_32%"
cmake %COMMON_CMAKE_PARAMS% -B "%DEPS_BUILD_DIR_ROOT_32%" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DBUILD_DEPENDENCIES=ON "-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_32%" "-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_32%" -A Win32 .
cmake %COMMON_CMAKE_PARAMS% ^
-B "%DEPS_BUILD_DIR_ROOT_32%" ^
-DVCPKG_TARGET_TRIPLET=x86-windows-static ^
-DBUILD_DEPENDENCIES=ON ^
"-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_32%" ^
"-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_32%" ^
-A Win32 .

if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build "%DEPS_BUILD_DIR_ROOT_32%" --config %CONFIG% -v
Expand All @@ -59,15 +97,44 @@ if %errorlevel% neq 0 exit /b %errorlevel%

REM 64-bit library
mkdir "%LIB_BUILD_DIR_ROOT_64%"
cmake %COMMON_CMAKE_PARAMS% -B "%LIB_BUILD_DIR_ROOT_64%" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_LIBZIP=ON "-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_64%" "-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_64%" -A x64 .
cmake %COMMON_CMAKE_PARAMS% ^
-B "%LIB_BUILD_DIR_ROOT_64%" ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static ^
-DBUILD_LIBZIP=ON ^
"-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_64%" ^
"-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_64%" ^
-A x64 .

if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build "%LIB_BUILD_DIR_ROOT_64%" --config %CONFIG% -v
if %errorlevel% neq 0 exit /b %errorlevel%

REM 64-bit arm library
mkdir "%LIB_BUILD_DIR_ROOT_ARM64%"
cmake %COMMON_CMAKE_PARAMS% ^
-B "%LIB_BUILD_DIR_ROOT_ARM64%" ^
-DVCPKG_TARGET_TRIPLET=arm-windows-static ^
-DBUILD_LIBZIP=ON ^
"-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_ARM64%" ^
"-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_ARM64%" ^
-A arm64 .

if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build "%LIB_BUILD_DIR_ROOT_ARM64%" --config %CONFIG% -v
if %errorlevel% neq 0 exit /b %errorlevel%

REM 32-bit library
mkdir "%LIB_BUILD_DIR_ROOT_32%"
cmake %COMMON_CMAKE_PARAMS% -B "%LIB_BUILD_DIR_ROOT_32%" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DBUILD_LIBZIP=ON "-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_32%" "-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_32%" -A Win32 .
cmake %COMMON_CMAKE_PARAMS% ^
-B "%LIB_BUILD_DIR_ROOT_32%" ^
-DVCPKG_TARGET_TRIPLET=x86-windows-static ^
-DBUILD_LIBZIP=ON ^
"-DARTIFACTS_ROOT_DIR=%ARTIFACTS_DIR_ROOT_32%" ^
"-DCMAKE_INSTALL_PREFIX=%ARTIFACTS_DIR_ROOT_32%" ^
-A Win32 .

if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build "%LIB_BUILD_DIR_ROOT_32%" --config %CONFIG% -v
Expand Down
2 changes: 1 addition & 1 deletion external/vcpkg
Submodule vcpkg updated 9112 files