set SCRIPT=%~0 for /f "delims=\ tokens=*" %%z in ("%SCRIPT%") do ( set SCRIPT_DRIVE=%%~dz set SCRIPT_PATH=%%~pz set SCRIPT_CURRENT_DIR=%%~dpz ) set QT_ROOT=%SCRIPT_PATH% set QT_MSYS=msys-2015-0114 set QT_ARCH=mingw-qt-5.4.0-as-is set QT_NAME=mingw-qt-5.4.0-D-2015-0125 set QT_ICU=icu4c-53_1-src set MSYS_PATCH=%QT_ROOT%\%QT_MSYS%\bin\patch.exe set MSYS_SED=%QT_ROOT%\%QT_MSYS%\bin\sed.exe set MSYS_CP=%QT_ROOT%\%QT_MSYS%\bin\cp.exe set MSYS_RM=%QT_ROOT%\%QT_MSYS%\bin\rm.exe set PATH= set PATH=%PATH%;%QT_ROOT%\%QT_NAME%\bin set PATH=%PATH%;%QT_ROOT%\7-Zip set PATH=%PATH%;C:\Program Files\7-Zip set PATH=%PATH%;C:\Program Files (x86)\7-Zip set PATH=%PATH%;%SystemRoot%\System32 echo START %date%-%time% >> %QT_ROOT%\%QT_NAME%.log REM [extract qt to %QT_NAME%] cd %QT_ROOT% rmdir /s /q %QT_NAME% rmdir /s /q %QT_NAME%-temp 7z.exe x -o"%QT_NAME%-temp" %QT_ARCH%.7z move %QT_NAME%-temp\%QT_ARCH% %QT_NAME% rmdir /s /q %QT_NAME%-temp REM [refresh %QT_MSYS%] cd %QT_ROOT% rmdir /s /q %QT_MSYS% 7z.exe x %QT_MSYS%.7z REM [build ICU] cd %QT_ROOT% rmdir /s /q %QT_ICU% 7z.exe x -o"%QT_ICU%" %QT_ICU%.zip cd %QT_ROOT%\%QT_ICU%\icu\source setlocal set PATH=%PATH%;%QT_ROOT%%QT_MSYS%\bin set HOME=%QT_ROOT%\%QT_ICU%\icu\source sh --login -c "./runConfigureICU MinGW --prefix=$PWD/../dist --enable-static --disable-shared" sh --login -c "make" sh --login -c "make install" endlocal REM [copy openssl include & lib/*.a] %MSYS_CP% -rp %QT_ROOT%\%QT_NAME%/opt/include/openssl %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/include/. %MSYS_CP% -p %QT_ROOT%\%QT_NAME%/opt/lib/libcrypto.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -p %QT_ROOT%\%QT_NAME%/opt/lib/libssl.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. REM [copy ICU include & lib] %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/include/layout %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/include/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/include/unicode %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/include/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/icu %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/pkgconfig %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. REM %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsicudt.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/sicudt.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/libsicudt.a %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsicuin.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsicuio.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsicule.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsiculx.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsicutest.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsicutu.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. %MSYS_CP% -rp %QT_ROOT%\%QT_ICU%/icu/dist/lib/libsicuuc.a %QT_ROOT%\%QT_NAME%/i686-w64-mingw32/lib/. cd %QT_ROOT% dir %QT_ROOT%\%QT_NAME%\i686-w64-mingw32\include >> %QT_ROOT%\%QT_NAME%.log dir %QT_ROOT%\%QT_NAME%\i686-w64-mingw32\lib >> %QT_ROOT%\%QT_NAME%.log REM goto exit cd %QT_ROOT% del %QT_NAME%.7z 7z.exe a %QT_NAME%.7z %QT_NAME% cd %QT_ROOT% dir %QT_ROOT%\%QT_NAME%.7z >> %QT_ROOT%\%QT_NAME%.log :exit cd %QT_ROOT% echo END %date%-%time% >> %QT_ROOT%\%QT_NAME%.log