From 861e55c246bf56867699a11d274c1875e0690fcc Mon Sep 17 00:00:00 2001 From: Jeff Genovy <29107334+jefgen@users.noreply.github.com> Date: Thu, 24 Mar 2022 11:14:46 -0700 Subject: [PATCH] ICU-21972 Use a shared props file for the ICU Major Version number in the Windows Visual Studio project files. --- docs/processes/release/tasks/versions.md | 16 +++++++--------- icu4c/source/Makefile.in | 2 +- .../allinone/Build.Windows.IcuVersion.props | 8 ++++++++ .../Build.Windows.ProjectConfiguration.props | 4 +++- .../Build.Windows.UWP.ProjectConfiguration.props | 4 +++- icu4c/source/common/common.vcxproj | 4 ++-- icu4c/source/common/common_uwp.vcxproj | 4 ++-- icu4c/source/common/unicode/uvernum.h | 15 ++++----------- icu4c/source/config/windows-update.sed.in | 3 +-- icu4c/source/i18n/i18n.vcxproj | 4 ++-- icu4c/source/i18n/i18n_uwp.vcxproj | 16 ++++++++-------- icu4c/source/io/io.vcxproj | 4 ++-- icu4c/source/layoutex/layoutex.vcxproj | 8 ++++---- icu4c/source/stubdata/stubdata.vcxproj | 2 +- icu4c/source/tools/ctestfw/ctestfw.vcxproj | 4 ++-- icu4c/source/tools/toolutil/toolutil.vcxproj | 16 ++++++++-------- 16 files changed, 58 insertions(+), 56 deletions(-) create mode 100644 icu4c/source/allinone/Build.Windows.IcuVersion.props diff --git a/docs/processes/release/tasks/versions.md b/docs/processes/release/tasks/versions.md index 9e8c21f8b4c..48913c70261 100644 --- a/docs/processes/release/tasks/versions.md +++ b/docs/processes/release/tasks/versions.md @@ -73,15 +73,13 @@ Edit icuver.txt directly. 1. The instructions for updating the version number are in [icu4c/source/common/unicode/uvernum.h](https://github.com/unicode-org/icu/blob/main/icu4c/source/common/unicode/uvernum.h). -2. [icu4c/source/stubdata/stubdata.vcxproj](https://github.com/unicode-org/icu/blob/main/icu4c/source/stubdata/stubdata.vcxproj) - and - [icu4c/source/data/makedata.mak](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/makedata.mak) - may also need to updated with the correct version for icudt. -3. After uvernum.h is updated, the Windows project files should be updated by - running the UNIX makefile target '**update-windows-makefiles**' in - icu/source. - * You will need to rerun "./configure" first though before you can run the - command "make update-windows-makefiles". +2. [icu4c/source/data/makedata.mak](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/makedata.mak) + also needs to be updated with the correct version for `U_ICUDATA_NAME` (icudt). +3. After `uvernum.h` is updated, the file [Build.Windows.IcuVersion.props](https://github.com/unicode-org/icu/blob/main/icu4c/source/allinone/Build.Windows.IcuVersion.props) should be updated. + This can be done by hand, or by running the UNIX makefile target '**update-windows-makefiles**' + in `icu4c/source`. + * You will need to rerun "`./configure`" first though before you can run the + command "`make update-windows-makefiles`". * Note: You can use MSYS+MinGW to run the UNIX makefile on Windows platforms as well. 4. As well, the ICU4C "configure" script should be updated so that it reflects diff --git a/icu4c/source/Makefile.in b/icu4c/source/Makefile.in index 79a0a3423ab..ddc70e13fa9 100644 --- a/icu4c/source/Makefile.in +++ b/icu4c/source/Makefile.in @@ -371,7 +371,7 @@ icu4j-data-install icu4j-data: all tests # For updating Windows makefiles -WINDOWS_UPDATEFILES=$(srcdir)/data/makedata.mak $(shell find $(srcdir) -name '*.vcproj' -o -name '*.vcxproj') +WINDOWS_UPDATEFILES=$(srcdir)/data/makedata.mak $(srcdir)/allinone/Build.Windows.IcuVersion.props WINDOWS_UPDATEFILES_SED=config/windows-update.sed diff --git a/icu4c/source/allinone/Build.Windows.IcuVersion.props b/icu4c/source/allinone/Build.Windows.IcuVersion.props new file mode 100644 index 00000000000..92e11d6a661 --- /dev/null +++ b/icu4c/source/allinone/Build.Windows.IcuVersion.props @@ -0,0 +1,8 @@ + + + + + + 71 + + diff --git a/icu4c/source/allinone/Build.Windows.ProjectConfiguration.props b/icu4c/source/allinone/Build.Windows.ProjectConfiguration.props index 147689b910a..bcb0f411d64 100644 --- a/icu4c/source/allinone/Build.Windows.ProjectConfiguration.props +++ b/icu4c/source/allinone/Build.Windows.ProjectConfiguration.props @@ -1,7 +1,9 @@ - + + + diff --git a/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props b/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props index 89d528a7791..948b7c4f98b 100644 --- a/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props +++ b/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props @@ -1,6 +1,8 @@ - + + + 14.0 diff --git a/icu4c/source/common/common.vcxproj b/icu4c/source/common/common.vcxproj index 6b0a60e46c1..e35e1b0cff7 100644 --- a/icu4c/source/common/common.vcxproj +++ b/icu4c/source/common/common.vcxproj @@ -58,7 +58,7 @@ MultiThreadedDebugDLL - ..\..\$(IcuBinOutputDir)\icuuc71d.dll + ..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion)d.dll .\..\..\$(IcuLibOutputDir)\icuucd.pdb ..\..\$(IcuLibOutputDir)\icuucd.lib @@ -70,7 +70,7 @@ true - ..\..\$(IcuBinOutputDir)\icuuc71.dll + ..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion).dll .\..\..\$(IcuLibOutputDir)\icuuc.pdb ..\..\$(IcuLibOutputDir)\icuuc.lib diff --git a/icu4c/source/common/common_uwp.vcxproj b/icu4c/source/common/common_uwp.vcxproj index dcd95b8c318..fc165629f29 100644 --- a/icu4c/source/common/common_uwp.vcxproj +++ b/icu4c/source/common/common_uwp.vcxproj @@ -125,7 +125,7 @@ true vccorlib.lib;msvcrt.lib;vcruntime.lib;%(AdditionalDependencies) - ..\..\$(IcuBinOutputDir)\icuuc71.dll + ..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion).dll .\..\..\$(IcuLibOutputDir)\icuuc.pdb ..\..\$(IcuLibOutputDir)\icuuc.lib @@ -148,7 +148,7 @@ true vccorlibd.lib;msvcrtd.lib;vcruntimed.lib;%(AdditionalDependencies) - ..\..\$(IcuBinOutputDir)\icuuc71d.dll + ..\..\$(IcuBinOutputDir)\icuuc$(IcuMajorVersion)d.dll .\..\..\$(IcuLibOutputDir)\icuucd.pdb ..\..\$(IcuLibOutputDir)\icuucd.lib diff --git a/icu4c/source/common/unicode/uvernum.h b/icu4c/source/common/unicode/uvernum.h index 2706e0b0606..a8fe7481629 100644 --- a/icu4c/source/common/unicode/uvernum.h +++ b/icu4c/source/common/unicode/uvernum.h @@ -31,19 +31,12 @@ * renaming macro, and copyright * * The following files need to be updated as well, which can be done - * by running the UNIX makefile target 'update-windows-makefiles' in icu/source. + * by running the UNIX makefile target 'update-windows-makefiles' in icu4c/source. * - * - * source/common/common_uwp.vcxproj - * source/common/common.vcxproj - update 'Output file name' on the link tab so - * that it contains the new major/minor combination - * source/i18n/i18n.vcxproj - same as for the common.vcxproj - * source/i18n/i18n_uwp.vcxproj - same as for the common_uwp.vcxproj - * source/layoutex/layoutex.vcproj - same - * source/stubdata/stubdata.vcproj - same as for the common.vcxproj - * source/io/io.vcproj - same as for the common.vcxproj + * source/allinone/Build.Windows.IcuVersion.props - Update the IcuMajorVersion * source/data/makedata.mak - change U_ICUDATA_NAME so that it contains - * the new major/minor combination and the Unicode version. + * the new major/minor combination, and UNICODE_VERSION + * for the Unicode version. */ #ifndef UVERNUM_H diff --git a/icu4c/source/config/windows-update.sed.in b/icu4c/source/config/windows-update.sed.in index 23473a757e9..e0d540730e5 100644 --- a/icu4c/source/config/windows-update.sed.in +++ b/icu4c/source/config/windows-update.sed.in @@ -4,5 +4,4 @@ # sed script for updating windows .mak and .vcproj files s%^U_ICUDATA_NAME=.*%U_ICUDATA_NAME=icudt@LIB_VERSION_MAJOR@% s%^UNICODE_VERSION=.*%UNICODE_VERSION=@UNICODE_VERSION@% -s%\(icu[a-zA-Z]*\)[0-9][0-9]\(d\.dll\)%\1@LIB_VERSION_MAJOR@\2%g -s%\(icu[a-zA-Z]*\)[0-9][0-9]\(\.dll\)%\1@LIB_VERSION_MAJOR@\2%g +s%\(\)[0-9][0-9]%\1@LIB_VERSION_MAJOR@%g diff --git a/icu4c/source/i18n/i18n.vcxproj b/icu4c/source/i18n/i18n.vcxproj index 23b8527cf0e..04b396c823d 100644 --- a/icu4c/source/i18n/i18n.vcxproj +++ b/icu4c/source/i18n/i18n.vcxproj @@ -60,7 +60,7 @@ icuucd.lib;%(AdditionalDependencies) - ..\..\$(IcuBinOutputDir)\icuin71d.dll + ..\..\$(IcuBinOutputDir)\icuin$(IcuMajorVersion)d.dll .\..\..\$(IcuLibOutputDir)\icuind.pdb ..\..\$(IcuLibOutputDir)\icuind.lib @@ -73,7 +73,7 @@ icuuc.lib;%(AdditionalDependencies) - ..\..\$(IcuBinOutputDir)\icuin71.dll + ..\..\$(IcuBinOutputDir)\icuin$(IcuMajorVersion).dll .\..\..\$(IcuLibOutputDir)\icuin.pdb ..\..\$(IcuLibOutputDir)\icuin.lib diff --git a/icu4c/source/i18n/i18n_uwp.vcxproj b/icu4c/source/i18n/i18n_uwp.vcxproj index ca0f335927b..086d5986572 100644 --- a/icu4c/source/i18n/i18n_uwp.vcxproj +++ b/icu4c/source/i18n/i18n_uwp.vcxproj @@ -186,7 +186,7 @@ .\x86\ReleaseUWP/ - ..\..\bin32uwp\icuin71.dll + ..\..\bin32uwp\icuin$(IcuMajorVersion).dll .\..\..\lib32uwp\icuin.pdb ..\..\lib32uwp\icuin.lib ..\..\lib32uwp\icuuc.lib;%(AdditionalDependencies) @@ -203,7 +203,7 @@ .\x86\DebugUWP/ - ..\..\bin32uwp\icuin71d.dll + ..\..\bin32uwp\icuin$(IcuMajorVersion)d.dll .\..\..\lib32uwp\icuind.pdb ..\..\lib32uwp\icuind.lib ..\..\lib32uwp\icuucd.lib;%(AdditionalDependencies) @@ -220,7 +220,7 @@ .\x64\ReleaseUWP/ - ..\..\bin64uwp\icuin71.dll + ..\..\bin64uwp\icuin$(IcuMajorVersion).dll .\..\..\lib64uwp\icuin.pdb ..\..\lib64uwp\icuin.lib ..\..\lib64uwp\icuuc.lib;%(AdditionalDependencies) @@ -237,7 +237,7 @@ .\x64\DebugUWP/ - ..\..\bin64uwp\icuin71d.dll + ..\..\bin64uwp\icuin$(IcuMajorVersion)d.dll .\..\..\lib64uwp\icuind.pdb ..\..\lib64uwp\icuind.lib ..\..\lib64uwp\icuucd.lib;%(AdditionalDependencies) @@ -254,7 +254,7 @@ .\ARM\ReleaseUWP/ - ..\..\binARMuwp\icuin71.dll + ..\..\binARMuwp\icuin$(IcuMajorVersion).dll .\..\..\libARMuwp\icuin.pdb ..\..\libARMuwp\icuin.lib ..\..\libARMuwp\icuuc.lib;%(AdditionalDependencies) @@ -271,7 +271,7 @@ .\ARM\DebugUWP/ - ..\..\binARMuwp\icuin71d.dll + ..\..\binARMuwp\icuin$(IcuMajorVersion)d.dll .\..\..\libARMuwp\icuind.pdb ..\..\libARMuwp\icuind.lib ..\..\libARMuwp\icuucd.lib;%(AdditionalDependencies) @@ -288,7 +288,7 @@ .\ARM64\ReleaseUWP/ - ..\..\binARM64uwp\icuin71.dll + ..\..\binARM64uwp\icuin$(IcuMajorVersion).dll .\..\..\libARM64uwp\icuin.pdb ..\..\libARM64uwp\icuin.lib ..\..\libARM64uwp\icuuc.lib;%(AdditionalDependencies) @@ -305,7 +305,7 @@ .\ARM64\DebugUWP/ - ..\..\binARM64uwp\icuin71d.dll + ..\..\binARM64uwp\icuin$(IcuMajorVersion)d.dll .\..\..\libARM64uwp\icuind.pdb ..\..\libARM64uwp\icuind.lib ..\..\libARM64uwp\icuucd.lib;%(AdditionalDependencies) diff --git a/icu4c/source/io/io.vcxproj b/icu4c/source/io/io.vcxproj index 34af85f6d93..ff3485fd4dc 100644 --- a/icu4c/source/io/io.vcxproj +++ b/icu4c/source/io/io.vcxproj @@ -60,7 +60,7 @@ true - ..\..\$(IcuBinOutputDir)\icuio71d.dll + ..\..\$(IcuBinOutputDir)\icuio$(IcuMajorVersion)d.dll ..\..\$(IcuLibOutputDir)\icuiod.pdb ..\..\$(IcuLibOutputDir)\icuiod.lib icuucd.lib;icuind.lib;%(AdditionalDependencies) @@ -73,7 +73,7 @@ true - ..\..\$(IcuBinOutputDir)\icuio71.dll + ..\..\$(IcuBinOutputDir)\icuio$(IcuMajorVersion).dll ..\..\$(IcuLibOutputDir)\icuio.pdb ..\..\$(IcuLibOutputDir)\icuio.lib icuuc.lib;icuin.lib;%(AdditionalDependencies) diff --git a/icu4c/source/layoutex/layoutex.vcxproj b/icu4c/source/layoutex/layoutex.vcxproj index c9cbce51e79..ba548fc33ea 100644 --- a/icu4c/source/layoutex/layoutex.vcxproj +++ b/icu4c/source/layoutex/layoutex.vcxproj @@ -54,7 +54,7 @@ Default - ..\..\bin\iculx71.dll + ..\..\bin\iculx$(IcuMajorVersion).dll icuuc.lib;%(AdditionalDependencies) .\..\..\lib;%(AdditionalLibraryDirectories) .\..\..\lib\iculx.pdb @@ -79,7 +79,7 @@ Default - ..\..\bin\iculx71d.dll + ..\..\bin\iculx$(IcuMajorVersion)d.dll icuucd.lib;%(AdditionalDependencies) .\..\..\lib;%(AdditionalLibraryDirectories) true @@ -104,7 +104,7 @@ Default - ..\..\bin64\iculx71.dll + ..\..\bin64\iculx$(IcuMajorVersion).dll icuuc.lib;%(AdditionalDependencies) .\..\..\lib64;%(AdditionalLibraryDirectories) .\..\..\lib64\iculx.pdb @@ -127,7 +127,7 @@ Default - ..\..\bin64\iculx71d.dll + ..\..\bin64\iculx$(IcuMajorVersion)d.dll icuucd.lib;%(AdditionalDependencies) .\..\..\lib64;%(AdditionalLibraryDirectories) true diff --git a/icu4c/source/stubdata/stubdata.vcxproj b/icu4c/source/stubdata/stubdata.vcxproj index 5607dead597..d5108b49415 100644 --- a/icu4c/source/stubdata/stubdata.vcxproj +++ b/icu4c/source/stubdata/stubdata.vcxproj @@ -56,7 +56,7 @@ true true - ..\..\$(IcuBinOutputDir)\icudt71.dll + ..\..\$(IcuBinOutputDir)\icudt$(IcuMajorVersion).dll .\..\..\$(IcuLibOutputDir)\icudt.pdb ..\..\$(IcuLibOutputDir)\icudt.lib diff --git a/icu4c/source/tools/ctestfw/ctestfw.vcxproj b/icu4c/source/tools/ctestfw/ctestfw.vcxproj index a4bd954bf56..f55c3f0b007 100644 --- a/icu4c/source/tools/ctestfw/ctestfw.vcxproj +++ b/icu4c/source/tools/ctestfw/ctestfw.vcxproj @@ -53,7 +53,7 @@ MultiThreadedDebugDLL - ..\..\..\$(IcuBinOutputDir)\icutest71d.exe + ..\..\..\$(IcuBinOutputDir)\icutest$(IcuMajorVersion)d.exe .\..\..\..\$(IcuLibOutputDir)\icutestd.pdb .\..\..\..\$(IcuLibOutputDir)\icutestd.lib icuucd.lib;icutud.lib;%(AdditionalDependencies) @@ -66,7 +66,7 @@ true - ..\..\..\$(IcuBinOutputDir)\icutest71.exe + ..\..\..\$(IcuBinOutputDir)\icutest$(IcuMajorVersion).exe .\..\..\..\$(IcuLibOutputDir)\icutest.pdb .\..\..\..\$(IcuLibOutputDir)\icutest.lib icuuc.lib;icutu.lib;%(AdditionalDependencies) diff --git a/icu4c/source/tools/toolutil/toolutil.vcxproj b/icu4c/source/tools/toolutil/toolutil.vcxproj index c7088baf676..0995ef06f7e 100644 --- a/icu4c/source/tools/toolutil/toolutil.vcxproj +++ b/icu4c/source/tools/toolutil/toolutil.vcxproj @@ -74,7 +74,7 @@ .\..\..\..\lib\icutu.tlb - ..\..\..\bin\icutu71.dll + ..\..\..\bin\icutu$(IcuMajorVersion).dll .\..\..\..\lib\icutu.pdb @@ -86,7 +86,7 @@ .\..\..\..\lib\icutud.tlb - ..\..\..\bin\icutu71d.dll + ..\..\..\bin\icutu$(IcuMajorVersion)d.dll .\..\..\..\lib\icutud.pdb @@ -113,7 +113,7 @@ true - ..\..\..\bin64\icutu71.dll + ..\..\..\bin64\icutu$(IcuMajorVersion).dll .\..\..\..\lib64\icutu.pdb ..\..\..\lib64\icutu.lib @@ -123,7 +123,7 @@ .\..\..\..\lib64\icutud.tlb - ..\..\..\bin64\icutu71d.dll + ..\..\..\bin64\icutu$(IcuMajorVersion)d.dll .\..\..\..\lib64\icutud.pdb ..\..\..\lib64\icutud.lib @@ -144,7 +144,7 @@ ..\..\..\libARM\icutu.tlb - ..\..\..\binARM\icutu71.dll + ..\..\..\binARM\icutu$(IcuMajorVersion).dll .\..\..\..\libARM\icutu.pdb ..\..\..\libARM\icutu.lib @@ -157,7 +157,7 @@ ProgramDatabase - ..\..\..\binARM\icutu71d.dll + ..\..\..\binARM\icutu$(IcuMajorVersion)d.dll .\..\..\..\libARM\icutud.pdb ..\..\..\libARM\icutud.lib @@ -178,7 +178,7 @@ .\..\..\..\libARM64\icutu.tlb - ..\..\..\binARM64\icutu71.dll + ..\..\..\binARM64\icutu$(IcuMajorVersion).dll .\..\..\..\libARM64\icutu.pdb ..\..\..\libARM64\icutu.lib @@ -191,7 +191,7 @@ ProgramDatabase - ..\..\..\binARM64\icutu71d.dll + ..\..\..\binARM64\icutu$(IcuMajorVersion)d.dll .\..\..\..\libARM64\icutud.pdb ..\..\..\libARM64\icutud.lib