User Tools

Site Tools


qt

Qt

Building Qt on Windows

Windows build environment (MinGW32)

  • http://qt-project.org/doc/qt-5.0/qtdoc/requirements-win.html
  • http://qt-project.org/doc/qt-5.0/qtdoc/install-win.html
  • http://qt-project.org/wiki/MinGW-64-bit
  • http://qt-project.org/wiki/Compiling-ICU-with-MinGW
  • Configure options (4.8): http://qt-project.org/doc/qt-4.8/configure-options.html
Packages
Package Version Filename SHA1 Digest Notes
Qt 5.0.2 source qt-everywhere-opensource-src-5.0.2.zip 61b4ea0c483efb1b88b6209f47ce7ef1039cad95
MinGW-builds MinGW32 32bit; posix-threads; sjlj x32-4.7.2-release-posix-sjlj-rev11.7z c94b3852841ef1b96cd085dd948d615d5742ab1a
Strawberry Perl 5.18.0.1 64bit portable strawberry-perl-5.18.0.1-64bit-portable.zip 4172048e69bdf21668c069fe1260e62d180ab7d6 These directories may be omitted/deleted:
  • c
Python 2.7.5 64bit Installer python-2.7.5.amd64.msi e7139a30ee91b2df82665d0e9ead6f36c670e59d Python 3.3.2 failed some self tests when building QtWebkit, so use Python 2.7.x
Minimal: Install without optional packages (except Tools?).
Portable: Copy installed Python27.dll (and system's msvcr90.dll?) into base directory.
Ruby 2.0.0-p195 (x64) 7-Zip archive ruby-2.0.0-p195-x64-mingw32.7z 7d6100bf2008d1229a1252521602b0fda94c4ceb
MSYS 1.0.11 Installer MSYS-1.0.11.exe 1edad9d1b67b48c92781b3ccddbd1cc9ce64d78a Using old monolithic MSYS (up till 1.0.11)
TODO: MinGW-builds external-binary-packages
jom 1.0.13 jom_1_0_13.zip e4059a58be58d04e70a1935b6886e28b69be7b82
QtBinPatcher 738a26c071f491a12ffdcfd73ef46e7112bf3d6f Git repo snapshot
DirectX SDK June 2010 DXSDK_Jun10.exe 8fe98c00fde0f524760bb9021f438bd7d9304a69 These directories may be omitted/deleted:
  • Developer Runtime
  • Redist (copy correct redist package first!)
  • Documentation
  • Samples
  • system
Portable: Install, backup installation dir, unset environment var DXSDK_DIR, uninstall.

Building dependencies

OpenSSL

Website Download

IMPORTANT: Use tar for extracting in order to preserve symlinks.

IMPORTANT: Explicitly set --openssldir. Else the build paths will be used. On some systems this seems not to work. Possible reason: OpenSSL exits with "Auto configuration failed" because the SSL-config file does not only not exist (ENOENT), but can't be accessed (e.g. "Drive not ready"). Using C:\OpenSSL might be a suitable workaround, as QSslSocket always initializes OpenSSL in auto-configuration mode.

$ export PATH=$PATH_TO_PERL/bin:$PATH_TO_MINGW/bin:$PATH
$ ./Configure --prefix=$PWD/dist --openssldir='C:\OpenSSL' threads shared mingw
$ make depend && make && make install

ICU

Website Download
$ export PATH=$PATH_TO_MINGW/bin:$PATH
$ cd source
$ ./runConfigureICU MinGW --prefix=$PWD/../dist
$ make && make install

Helper script

qt-build.bat
@echo off
 
REM see https://kbase.dominik-geyer.de/qt
 
set _QT_SRC=%CD%\qt-everywhere-opensource-src-5.0.2
 
set PATH=%CD%\icu\dist\bin;%CD%\openssl-1.0.1e\dist\bin;%_QT_SRC%\gnuwin32\bin;%CD%\mingw32\bin;%CD%\tools;%CD%\python;%CD%\ruby\bin;%CD%\perl\bin;%SYSTEMROOT%\system32;%SYSTEMROOT%
set INCLUDE=%CD%\icu\dist\include;%CD%\openssl-1.0.1e\dist\include
set LIB=%CD%\icu\dist\lib;%CD%\openssl-1.0.1e\dist\lib
 
REM set QMAKESPEC=win32-g++
 
 
REM [Angle source] https://code.google.com/p/angleproject/
REM Qt has bundled Angle version; use ANGLE_DIR if custom Angel source is required
REM set ANGLE_DIR=%CD%\angleproject
 
REM [DirectX SDK] http://www.microsoft.com/en-us/download/details.aspx?id=6812
REM Caution: Trailing backslash is required!
set DXSDK_DIR=%CD%\DirectX_SDK_June2010\
 
 
echo Qt build script / environment
echo ===============================================================================
echo PATH=%PATH%
echo INCLUDE=%INCLUDE%
echo LIB=%LIB%
echo DXSDK_DIR=%DXSDK_DIR%
echo ===============================================================================
echo.
 
REM Install prefix
if not exist %_QT_SRC%\dist mkdir %_QT_SRC%\dist
 
REM Build directory
if not exist %_QT_SRC%\build (
	echo Press any key to run 'configure' & pause & echo.
 
	mkdir %_QT_SRC%\build
	cd %_QT_SRC%\build
 
	cmd /c ^
	  %_QT_SRC%\configure -prefix %_QT_SRC%\dist ^
	  -platform win32-g++ -opensource -confirm-license ^
	  -debug-and-release -debug -release -c++11 -shared ^
	  -nomake tests -nomake examples -nomake demos ^
	  -openssl-linked OPENSSL_LIBS="-llibcrypto -llibssl" ^
	  -icu -iconv ^
	  -angle -opengl es2 ^
	  -no-audio-backend -no-native-gestures
) else (
	cd %_QT_SRC%\build
)
 
echo. & echo Now run something like 'mingw32-make -j4' or 'jom /W /S' & echo.
cmd
 
echo. & echo Press any key to exit. & pause

Other

qt.txt · Last modified: 2013-07-02 12:04 CEST by dominik