129 | | '''Note:''' Visual Studio projects are included for VS2010, building with a newer version requires the following procedure |
130 | | |
131 | | * Cygwin-based MSVC build: |
132 | | * [https://cygwin.com/install.html Install Cygwin] with bash, GNU make, ar, ranlib, man |
133 | | * [http://site.icu-project.org/download Download libicu] .zip source and extract somewhere |
134 | | * Open Windows command prompt |
135 | | * Create build and install directories for organization: |
136 | | {{{ |
137 | | #!application/x-dos-batch |
138 | | cd icu |
139 | | md install |
140 | | cd source |
141 | | md build |
142 | | cd build |
143 | | }}} |
144 | | * Set MSVC build environment by running |
145 | | {{{ |
146 | | #!application/x-dos-batch |
147 | | "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat" |
148 | | }}} |
149 | | * Add Cygwin bin directory to path (e.g. `X:\cygwin64\bin`) |
150 | | {{{ |
151 | | #!application/x-dos-batch |
152 | | SET path=%path%;X:\cygwin64\bin |
153 | | }}} |
154 | | * Set recommended ICU build flags (see build documentation) |
155 | | {{{ |
156 | | #!application/x-dos-batch |
157 | | SET CPPFLAGS=-DU_USING_ICU_NAMESPACE=0 -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 |
158 | | }}} |
159 | | * Configure XP-compatible platform toolset (based on [http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx Windows XP Targeting with C++ in Visual Studio 2012]) |
160 | | {{{ |
161 | | #!application/x-dos-batch |
162 | | SET INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE% |
163 | | SET PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH% |
164 | | SET LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib;%LIB% |
165 | | SET CL=/D_USING_V110_SDK71_ |
166 | | SET LINK=/SUBSYSTEM:WINDOWS,5.01 |
167 | | }}} |
168 | | * Build and install to `X:/path/to/install` (note forward slashes -- this runs in Bash!) |
169 | | {{{ |
170 | | #!sh |
171 | | bash ../runConfigureICU Cygwin/MSVC --prefix=X:/path/to/install |
172 | | make |
173 | | make check |
174 | | make install |
175 | | }}} |
176 | | * `X:\path\to\install\lib` will contain the .dlls and .libs |
177 | | * `X:\path\to\install\include` will contain the header files |
| 129 | * Download the latest release from [https://github.com/unicode-org/icu/releases/ here]. |
| 130 | * Make sure MSBuild is in your path. |
| 131 | * Run `MSBuild.exe source\allinone\allinone.sln /v:q /m:4 /p:Configuration=Release /p:Platform=Win32 /p:SkipUWP=true /p:PlatformToolset=v140_xp` |
| 132 | * Copy the dlls icu*.dll in bin/ to binaries/system |
| 133 | * Copy the libs in lib/ to libraries/win32/icu/lib |
| 134 | * Copy the contents of include/ libraries/win32/icu/include |