Windows/Build/Building Qt 4: Difference between revisions

From KDE Community Wiki
< Windows‎ | Build
*>PutHuhn
No edit summary
*>PutHuhn
No edit summary
Line 2: Line 2:
{{warning|Currently you need qt-copy from kde svn to successful compile kdelibs!}}
{{warning|Currently you need qt-copy from kde svn to successful compile kdelibs!}}


# '''Get the Qt4 source code'''
=Get the Qt4 source code=
Open Source developers: check out ''qt-copy'' from http://websvn.kde.org/trunk/qt-copy/ with your favorite svn client.
Open Source developers: check out ''qt-copy'' from http://websvn.kde.org/trunk/qt-copy/ with your favorite svn client.
# '''Download the qtwin patches'''
=Download the qtwin patches=
Get from unofficial (but legal) Qt4 patches for MSVC>=7.x from [http://sourceforge.net/project/showfiles.php?group_id=49109&package_id=165202 http://sourceforge.net/projects/qtwin/]. Make sure to use the once for qt-copy! Note that Trolltech does not provide support for these compilers, so '''do not post any question about this patch to the Trolltech's mailing list'''. The files are stored in the [http://qtwin.svn.sourceforge.net/viewvc/qtwin/qt-4/trunk/qtwin_patch Sourceforge SVN repository]. Unpack the file in the main Qt4 directory.
Get from unofficial (but legal) Qt4 patches for MSVC>=7.x from [http://sourceforge.net/project/showfiles.php?group_id=49109&package_id=165202 http://sourceforge.net/projects/qtwin/]. Make sure to use the once for qt-copy! Note that Trolltech does not provide support for these compilers, so '''do not post any question about this patch to the Trolltech's mailing list'''. The files are stored in the [http://qtwin.svn.sourceforge.net/viewvc/qtwin/qt-4/trunk/qtwin_patch Sourceforge SVN repository]. Unpack the file in the main Qt4 directory.
# '''Apply the KDE patches'''
=Apply the KDE patches=
Patch the source code with KDE's own patches first: run <tt>patches\apply_patches.bat</tt>.
Patch the source code with KDE's own patches first: run <tt>patches\apply_patches.bat</tt>.
# '''Apply the qtwin patches'''
=Apply the qtwin patches=
run <tt>installpatch4x.bat</tt>
run <tt>installpatch4x.bat</tt>
# '''Configure Qt4'''
=Configure Qt=
You will need openssl support - so make sure it's enabled!
You will need openssl support - so make sure it's enabled!
Also make sure that configure.exe find openssl headers and libs:
Also make sure that configure.exe find openssl headers and libs:

Revision as of 02:37, 6 August 2007

Warning

This page currently just describes build with msvc-compiler. If you need qt for mingw please use the installer instead

Warning

Currently you need qt-copy from kde svn to successful compile kdelibs!


Get the Qt4 source code

Open Source developers: check out qt-copy from http://websvn.kde.org/trunk/qt-copy/ with your favorite svn client.

Download the qtwin patches

Get from unofficial (but legal) Qt4 patches for MSVC>=7.x from http://sourceforge.net/projects/qtwin/. Make sure to use the once for qt-copy! Note that Trolltech does not provide support for these compilers, so do not post any question about this patch to the Trolltech's mailing list. The files are stored in the Sourceforge SVN repository. Unpack the file in the main Qt4 directory.

Apply the KDE patches

Patch the source code with KDE's own patches first: run patches\apply_patches.bat.

Apply the qtwin patches

run installpatch4x.bat

Configure Qt

You will need openssl support - so make sure it's enabled! Also make sure that configure.exe find openssl headers and libs:

qconfigure {PLATFORM} -openssl -I "<path to openssl headers>" \
-L "<path to openssl libs>" -qdbus -I "<path to windbus headers>" \
-L "<path to windbus libs>"

{PLATFORM} can be msvc.net for msvc .NET (2003) or msvc2005 for msvc 2005. This is needed to simplify path names in the future if you did not use the commercial configure.exe GUI installer:

set QTDIR={your qt installation directory}

Note: this (QTDIR) and the subsequent environment variables described below on this page could be set globally in the "System" applet, Advanced->Environment Variables. Optionally, if you want to have multiple configurations (e.g. Qt3 and Qt4) on the same machine and account, you can enter appropriate set commands into a single .bat file, e.g. environment.bat which you can then execute once in a new cmd shell.

See also alternative instructions at qtnode.net.