]> granicus.if.org Git - icu/commitdiff
ICU-20567 Use 7Zip to package Windows binaries to avoid backslash separator errors...
authorDaniel Ju <daju@microsoft.com>
Sat, 11 May 2019 01:19:14 +0000 (18:19 -0700)
committerDaniel Ju <41210545+daniel-ju@users.noreply.github.com>
Mon, 13 May 2019 23:43:41 +0000 (16:43 -0700)
icu4c/packaging/distrelease.ps1

index 58c201b0d25ceace694a5b4f798fff28aeba4006..c8483fada328938a27f5a7a249ded854b3a099b8 100644 (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
\ No newline at end of file