ICU-20567 Use 7Zip to package Windows binaries to avoid backslash separator errors when unzipping on CygWin

This commit is contained in:
Daniel Ju 2019-05-10 18:19:14 -07:00 committed by Daniel Ju
parent cb40d8b1a5
commit 14649a41f4

View File

@ -65,9 +65,14 @@ Copy-Item -Path "$icuDir\readme.html" -Destination $source -Recurse
$destination = "$icuDir\source\dist\icu-windows.zip"
Remove-Item -Path $destination -ErrorAction Continue
Add-Type -assembly "system.io.compression.filesystem"
Echo $source
Echo $destination
[io.compression.zipfile]::CreateFromDirectory($source, $destination)
# Use 7Zip to build zip file to avoid backslash path separator errors when unzipping on CygWin
if (-not (Get-Module -ListAvailable -Name 7Zip4PowerShell))
{
Install-Module 7Zip4PowerShell -Force -Verbose
}
Compress-7Zip $source -ArchiveFileName $destination -Format Zip
echo $destination