For Windows platform and VS developers ONLY !!!
You have to install Active Perl, Python 2 and Visual Studio first.
32-bit example:
- Download the latest MSYS2 and install it. I assume you have installed it to it's default location "C:\msys64".
- Open MSYS2 MSYS shell and execute the following commands:
Close the shell window forcely and open MSYS2 MSYS shell again, execute the following commands:
pacman -Syu
pacman -Su
- Open MSYS2 MinGW 32-bit shell and execute the following commands:
pacman -S $MINGW_PACKAGE_PREFIX-make
- Rename "C:\msys64\usr\bin\link.exe" to "link.exe.bak" (only if you have this file), "C:\msys64\mingw32\bin\mingw32-make.exe" to "make.exe".
- Download the latest ICU source code package and extract it to anywhere you like. I assume you have extracted it to "C:\ICU\src".
- Open cmd shell and execute the following commands (I assume you have installed VS2017 Community to it's default localtion "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"):
Then execute the following commands:
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 call "C:\msys64\msys2_shell.cmd" -mingw32 -use-full-path
cd /C/ICU/src/source ./runConfigureICU MSYS/MSVC --enable-static --disable-shared --prefix=$PWD/../../icu4c-x86-static-msvc2017 CFLAGS=-MT CXXFLAGS=-MT make -j4 && make install
Just use the script I offered.
- Download the latest Qt source code package and extract it to anywhere you like. I assume you have extracted it to "C:\Qt\src".
- Open "C:\Qt\src\qtbase\mkspecs\common\msvc-desktop.conf", replace all "-MD" with "-MT" and add "U_STATIC_IMPLEMENTATION" to "DEFINES +=".
- Use the script I offered to generate the batch script file.
- Open the generated .bat file, add the following lines to it and put them to their proper position (you may have to change a little bit if necessary):
SET "_ICU_DIR=C:\ICU\icu4c-static" SET "_OPENSSL_DIR=C:\OpenSSL\openssl-static" SET "PATH=%_ICU_DIR%\bin;%_OPENSSL_DIR%\bin;%PATH%" CALL "configure.bat" -icu ICU_PREFIX="%_ICU_DIR%" ICU_LIBS="-lsicudt -lsicuin -lsicuuc -lAdvapi32" -openssl-linked OPENSSL_PREFIX="%_OPENSSL_DIR%" OPENSSL_LIBS="-llibcrypto -llibssl -lgdi32"
NOTE
If you have compiler errors and the whole compiling process stopped, don't worry, it's OK, just close the batch script window and rerun it.