From 118f3ba5f512a0e7d09dbd5bba67269eb2c71a96 Mon Sep 17 00:00:00 2001
From: Jeff Genovy <29107334+jefgen@users.noreply.github.com>
Date: Sat, 3 Mar 2018 02:03:38 +0000
Subject: [PATCH] ICU-13581 Update readme for Windows build instructions for
VS2015.
X-SVN-Rev: 41053
---
icu4c/readme.html | 82 ++++++++++++-------
...ild.Windows.UWP.ProjectConfiguration.props | 10 +++
icu4c/source/common/common_uwp.vcxproj | 5 --
icu4c/source/data/makedata_uwp.vcxproj | 4 -
icu4c/source/i18n/i18n_uwp.vcxproj | 5 --
5 files changed, 61 insertions(+), 45 deletions(-)
diff --git a/icu4c/readme.html b/icu4c/readme.html
index 3aaba825ede..8fed61b412d 100644
--- a/icu4c/readme.html
+++ b/icu4c/readme.html
@@ -777,7 +777,7 @@
- Microsoft Windows
- - Microsoft Visual C++ (part of Visual Studio) (see the ICU download page for the currently compatible version)
+ - Microsoft Visual C++ (part of Visual Studio) (from either Visual Studio 2015 or Visual Studio 2017)
- Optional: A version of the Windows 10 SDK (if you want to build the UWP projects)
@@ -805,30 +805,18 @@
Open the "<ICU>\source\allinone\allinone.sln" solution
- file in Microsoft Visual Studio. (This solution includes all the
+ file in 'Visual Studio 2017'. (This solution includes all the
International Components for Unicode libraries, necessary ICU building
tools, and the test suite projects). Please see the
command line note below if you want to
build from the command line instead.
- You may need to "re-target" the 3 UWP projects (common_uwp, i18n_uwp, and makedata_uwp) to
- the version of the SDK that you have installed. In Visual Studio you can right-click on the
- UWP projects in the Solution Explorer and select the option 'Retarget Projects' from the context menu.
- This will open up a window where you can select the SDK version to target from a list of the
- various SDKs that are installed on the machine.
-
Alternatively, you can manually edit the "*.vcxproj" files for the 3 UWP
- projects to change the value of the "WindowsTargetPlatformVersion" property to the
- version of the SDK that you would like to use instead.
-
- - Note: You do not need to have a copy of the Windows 10 SDK installed in order
- to build the other (non-UWP) projects in Visual Studio. If the Windows 10 SDK is not
- installed then the UWP projects will not be loaded by Visual Studio.
- - On Windows versions below Windows 10, the UWP projects will not load inside of the
- Visual Studio GUI. However, you can still build the UWP projects on the command line
- using MSBUILD instead. For more on this limitation see the Visual Studio 2017
- release notes.
-
-
+ If you are building using 'Visual Studio 2015' instead, or if you are building the UWP projects and you have a different
+ version of the Windows 10 SDK installed you will first need to modify the two "Build.Windows.*.props" files
+ in the "allinone" directory before you can open the "allinone" solution file.
+ Please see the notes below about building with other versions of Visual Studio or the
+ notes on re-targeting the Windows 10 SDK for the UWP projects for details.
+
Set the active platform to "Win32" or "x64" (See Windows platform note below)
and configuration to "Debug" or "Release" (See Windows configuration note below).
@@ -882,6 +870,48 @@
application directory.
+
+ Building with other versions of Visual Studio Note:
+ The particular version of the MSVC compiler tool-set (and thus the corresponding version of Visual Studio) that
+ is used to compile ICU is determined by the "PlatformToolset" property. This property is stored in two
+ different shared files that are used to set common configuration settings amongst the various ICU "*.vcxproj" project files.
+
+ For the non-UWP projects, this setting is in the shared file called "Build.Windows.ProjectConfiguration.props" located
+ in the "allinone" directory.
+
+ For the UWP projects, this setting is in the shared file called "Build.Windows.UWP.ProjectConfiguration.props", also
+ located in the "allinone" directory.
+
+ The value of v140 corresponds to the Visual Studio 2015 compiler tool set, whereas the value of
+ v141 corresponds to the Visual Studio 2017 compiler tool set.
+
+
In order to build the non-UWP projects with Visual Studio 2015 you will need to modify the file
+ called "Build.Windows.ProjectConfiguration.props" to change the value of the PlatformToolset property.
+
+ Note however that Visual Studio 2017 is required for building the UWP projects.
+
+
+ Please consider: Using older versions of the MSVC compiler is generally not recommended due to the improved support for the C++11 standard
+ in newer versions of the compiler.
+
+
+ Re-targeting the Windows 10 SDK for the UWP projects Note:
+
+ If the version of the Windows 10 SDK that you have installed does not match the version used by the UWP projects, then you
+ will need to "retarget" them to use the version of the SDK that you have installed instead.
+
+ There are two ways to do this:
+
+ - In Visual Studio you can right-click on the UWP projects in the 'Solution Explorer' and select the
+ option 'Retarget Projects' from the context menu. This will open up a window where you can select the
+ SDK version to target from a drop-down list of the various SDKs that are installed on the machine.
+
+ - Alternatively, you can manually edit the shared file called "Build.Windows.UWP.ProjectConfiguration.props"
+ which is located in the "allinone" directory. You will need to change the of the
+ "WindowsTargetPlatformVersion" property to the version of the SDK that you would like to use instead.
+
+
+
Using MSBUILD At The Command Line Note:
You can build ICU from the command line instead of using the Visual Studio GUI.
@@ -948,16 +978,6 @@
Build...". Click the "Select All" button, and then click the "Rebuild"
button.
-
- Building with other versions of MSVC Note: The particular version of the MSVC compiler
- that is used to compile ICU is determined by the "PlatformToolset" property in the various
- .vcxproj project files.
For example, <PlatformToolset>v140</PlatformToolset>
- corresponds to the Visual Studio 2015 compiler tool set, whereas <PlatformToolset>v141</PlatformToolset>
- corresponds to the Visual Studio 2017 compiler tool set.
- However, using older versions of the MSVC compiler is generally not recommended due to the improved support for the C++11 standard
- in newer versions of the compiler. Older versions of the compiler have reduced support for various C++11 features, many of which
- are used by ICU.
-
@@ -967,7 +987,7 @@
- Microsoft Windows
- - Microsoft Visual C++ (from Visual Studio 2017 or newer, when gcc isn't used).
+ - Microsoft Visual C++ (from Visual Studio 2015 or newer, when gcc isn't used).
-
Cygwin with the following installed:
diff --git a/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props b/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props
index 634a58cdf87..4b51960dfa7 100644
--- a/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props
+++ b/icu4c/source/allinone/Build.Windows.UWP.ProjectConfiguration.props
@@ -7,6 +7,16 @@
10.0.16299.0
10.0.10240.0
+
+ 14.0
+ true
+ Windows Store
+ 10.0
+
+
+
+
+ v141
diff --git a/icu4c/source/common/common_uwp.vcxproj b/icu4c/source/common/common_uwp.vcxproj
index a51f478549a..af2f6538ba9 100644
--- a/icu4c/source/common/common_uwp.vcxproj
+++ b/icu4c/source/common/common_uwp.vcxproj
@@ -31,17 +31,12 @@
{C10CF34B-3F79-430E-AD38-5A32DC0589C2}
DynamicLibrary
en-US
- 14.0
- true
- Windows Store
- 10.0
DynamicLibrary
false
MultiByte
- v141
diff --git a/icu4c/source/data/makedata_uwp.vcxproj b/icu4c/source/data/makedata_uwp.vcxproj
index b505d8d01a7..8573b36e456 100644
--- a/icu4c/source/data/makedata_uwp.vcxproj
+++ b/icu4c/source/data/makedata_uwp.vcxproj
@@ -32,10 +32,6 @@
{B1D53358-37BD-48BC-B27C-68BAF1E78508}
MakeFileProj
en-US
- 14.0
- true
- Windows Store
- 10.0
Makefile
false
diff --git a/icu4c/source/i18n/i18n_uwp.vcxproj b/icu4c/source/i18n/i18n_uwp.vcxproj
index 8013b7be046..21d5032132b 100644
--- a/icu4c/source/i18n/i18n_uwp.vcxproj
+++ b/icu4c/source/i18n/i18n_uwp.vcxproj
@@ -32,17 +32,12 @@
{6786C051-383B-47E0-9E82-B8B994E06A25}
DynamicLibrary
en-US
- 14.0
- true
- Windows Store
- 10.0
DynamicLibrary
false
MultiByte
- v141
--
2.40.0