diff --git a/.gitattributes b/.gitattributes index d10d0ec8c26..fb59db4eca5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -49,7 +49,6 @@ README text !eol *.tri2 -text icu4c/icu4c.css -text -icu4c/packaging/distrelease.ps1 -text icu4c/source/aclocal.m4 -text icu4c/source/config/m4/icu-conditional.m4 -text icu4c/source/data/curr/pool.res -text diff --git a/icu4c/packaging/distrelease.ps1 b/icu4c/packaging/distrelease.ps1 index 34e54bc28bc..41cd9ee4a28 100644 --- a/icu4c/packaging/distrelease.ps1 +++ b/icu4c/packaging/distrelease.ps1 @@ -1,53 +1,53 @@ -# Copyright (C) 2016 and later: Unicode, Inc. and others. -# License & terms of use: http://www.unicode.org/copyright.html -#------------------------- -# Script: icu\packaging\distrelease.ps1 -# Author: Steven R. Loomis -# Date: 2017-04-14 -#------------------------- -# -# This builds a zipfile containing the *64 bit* Windows binary -# -# Usage: (after building ICU using MSVC) -# (bring up Powershell ISE) -# cd C:\icu\icu4c\ -# Set-ExecutionPolicy -Scope Process AllSigned -# .\packaging\distrelease.ps1 -# -# Will emit: c:\icu4c\icu\source\dist\icu-windows.zip -# -# -# You will get warnings from the execution policy and the script itself. -# see https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-5.1&viewFallbackFrom=powershell-Microsoft.PowerShell.Core -# for more about execution policies. - - -$icuDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent -$icuDir = Resolve-Path -Path '$icuDir\..' - -echo $icuDir - -# ok, create some work areas -New-Item -Path "$icuDir\source\dist" -ErrorAction SilentlyContinue -ItemType "directory" -$source = "$icuDir\source\dist\icu" -Get-ChildItem -Path $source -ErrorAction SilentlyContinue | Remove-Item -Recurse -New-Item -Path $source -ItemType "directory" -ErrorAction SilentlyContinue - -# copy required stuff -Copy-Item -Path "$icuDir\lib64" -Destination $source -Recurse -Copy-Item -Path "$icuDir\include" -Destination $source -Recurse -Copy-Item -Path "$icuDir\bin64" -Destination $source -Recurse -Copy-Item -Path "$icuDir\APIChangeReport.html" -Destination $source -Recurse -Copy-Item -Path "$icuDir\icu4c.css" -Destination $source -Recurse -Copy-Item -Path "$icuDir\LICENSE" -Destination $source -Recurse -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) - +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +#------------------------- +# Script: icu\packaging\distrelease.ps1 +# Author: Steven R. Loomis +# Date: 2017-04-14 +#------------------------- +# +# This builds a zipfile containing the *64 bit* Windows binary +# +# Usage: (after building ICU using MSVC) +# (bring up Powershell ISE) +# cd C:\icu\icu4c\ +# Set-ExecutionPolicy -Scope Process AllSigned +# .\packaging\distrelease.ps1 +# +# Will emit: c:\icu4c\icu\source\dist\icu-windows.zip +# +# +# You will get warnings from the execution policy and the script itself. +# see https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-5.1&viewFallbackFrom=powershell-Microsoft.PowerShell.Core +# for more about execution policies. + + +$icuDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent +$icuDir = Resolve-Path -Path '$icuDir\..' + +echo $icuDir + +# ok, create some work areas +New-Item -Path "$icuDir\source\dist" -ErrorAction SilentlyContinue -ItemType "directory" +$source = "$icuDir\source\dist\icu" +Get-ChildItem -Path $source -ErrorAction SilentlyContinue | Remove-Item -Recurse +New-Item -Path $source -ItemType "directory" -ErrorAction SilentlyContinue + +# copy required stuff +Copy-Item -Path "$icuDir\lib64" -Destination $source -Recurse +Copy-Item -Path "$icuDir\include" -Destination $source -Recurse +Copy-Item -Path "$icuDir\bin64" -Destination $source -Recurse +Copy-Item -Path "$icuDir\APIChangeReport.html" -Destination $source -Recurse +Copy-Item -Path "$icuDir\icu4c.css" -Destination $source -Recurse +Copy-Item -Path "$icuDir\LICENSE" -Destination $source -Recurse +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) + echo $destination \ No newline at end of file diff --git a/icu4c/source/config/dist.mk b/icu4c/source/config/dist.mk index ccc5837a76c..3e6e42e50dd 100644 --- a/icu4c/source/config/dist.mk +++ b/icu4c/source/config/dist.mk @@ -19,7 +19,7 @@ DISTY_DIR=dist DISTY_TMP=dist/tmp DISTY_ICU=$(DISTY_TMP)/icu DISTY_DATA=$(DISTY_ICU)/source/data -DISTY_RMV=brkitr coll curr lang locales mappings rbnf region translit xml zone misc unit +DISTY_RMV=brkitr coll curr lang locales mappings rbnf region translit xml zone misc/*.txt misc/*.mk unit DISTY_RMDIR=$(DISTY_RMV:%=$(DISTY_DATA)/%) DISTY_IN=$(DISTY_DATA)/in DOCZIP=icu-docs.zip @@ -49,7 +49,7 @@ $(DISTY_TMP): $(DISTY_DOC_ZIP): $(DOCZIP) $(DISTY_FILE_DIR) cp $(DOCZIP) $(DISTY_DOC_ZIP) - ln -sf $(DISTY_DOC_ZIP) $(DISTY_FILE_DIR)/icu4c-docs.zip + ln -sf $(shell basename $(DISTY_DOC_ZIP)) $(DISTY_FILE_DIR)/icu4c-docs.zip $(DISTY_DAT): echo Missing $@ @@ -74,14 +74,14 @@ $(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) $(DISTY_DATA_ZIP): $(DISTY_DAT) $(DISTY_TMP $(MKINSTALLDIRS) $(DISTY_IN) echo DISTY_DAT=$(DISTY_DAT) cp $(DISTY_DAT) $(DISTY_IN) - ( cd $(DISTY_TMP)/icu ; python as_is/bomlist.py > as_is/bomlist.txt || rm -f as_is/bomlist.txt ) - ( cd $(DISTY_TMP) ; zip -rlq $(DISTY_FILE_ZIP) icu ) $(RMV) $(DISTY_RMDIR) ( cd $(DISTY_TMP)/icu ; python as_is/bomlist.py > as_is/bomlist.txt || rm -f as_is/bomlist.txt ) ( cd $(DISTY_TMP) ; tar cfpz $(DISTY_FILE_TGZ) icu ) - ln -sf $(DISTY_FILE_ZIP) $(DISTY_FILE_DIR)/icu4c-src.zip - ln -sf $(DISTY_FILE_TGZ) $(DISTY_FILE_DIR)/icu4c-src.tgz - ln -sf $(DISTY_DATA_ZIP) $(DISTY_FILE_DIR)/icu4c-data.zip + ( cd $(DISTY_TMP) ; zip -rlq $(DISTY_FILE_ZIP) icu ) + $(RMV) $(DISTY_TMP) + ln -sf $(shell basename $(DISTY_FILE_ZIP)) $(DISTY_FILE_DIR)/icu4c-src.zip + ln -sf $(shell basename $(DISTY_FILE_TGZ)) $(DISTY_FILE_DIR)/icu4c-src.tgz + ln -sf $(shell basename $(DISTY_DATA_ZIP)) $(DISTY_FILE_DIR)/icu4c-data.zip ls -l $(DISTY_FILE_TGZ) $(DISTY_FILE_ZIP) $(DISTY_DATA_ZIP)