Obtaining GPL'ed Qt for Windows: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 22: Line 22:
For the curious, here is the procedure used to patch the Qt GPL sources:
For the curious, here is the procedure used to patch the Qt GPL sources:


The [http://sourceforge.net/projects/qtwin/ QtWin Project] provides a set of patches that allow the Qt GPL libraries to be built with Microsoft compilers.  You will need [http://sourceware.org/cygwin Cygwin] installed on your machine to provide the "patch" command.
The [http://sourceforge.net/projects/qtwin/ QtWin Project] provides a set of patches that allow the Qt GPL libraries to be built with Microsoft compilers.


* If you don't already have Cygwin installed (why not?), run [http://sourceware.org/cygwin/setup.exe Cygwin Setup] to download and install Cygwin.
* Download [http://www.trolltech.com/download.html?target=ftp://ftp.trolltech.com/qt/source/qt-win-opensource-src-4.2.3.zip qt-win-opensource-src-4.2.3.zip] from Trolltech.
* Download [http://www.trolltech.com/download.html?target=ftp://ftp.trolltech.com/qt/source/qt-win-opensource-src-4.2.2.zip qt-win-opensource-src-4.2.2.zip] from Trolltech.
* Expand qt-win-opensource-src-4.2.3.zip in a convenient location such as c:\qt.  This will create a c:\qt\qt-win-opensource-src-4.2.3 directory containing the full Qt sources.  '''''Note:''''' ensure that your archive utility restores permissions and ownership for the zip file contents.      Some tools (such as cygwin ''unzip'') don't do this by default, which will lead to compile errors when you compile the sources later-on.
* Expand qt-win-opensource-src-4.2.2.zip in a convenient location such as c:\qt.  This will create a c:\qt\qt-win-opensource-src-4.2.2 directory containing the full Qt sources.  '''''Note:''''' ensure that your archive utility restores permissions and ownership for the zip file contents.      Some tools (such as cygwin ''unzip'') don't do this by default, which will lead to compile errors when you compile the sources later-on.
* Download [http://downloads.sourceforge.net/qtwin/acs-4.2.3-patch1.zip acs-4.2.3-patch1.zip] from the [http://sourceforge.net/projects/qtwin QtWin] project.
* Download [http://downloads.sourceforge.net/qtwin/acs-4.2.2-patch1.zip acs-4.2.2-patch1.zip] from the [http://sourceforge.net/projects/qtwin QtWin] project.
* Move the downloaded file acs-4.2.3-patch1.zip to the c:\qt\qt-win-opensource-src-4.2.3 directory.
* Move the downloaded file acs-4.2.2-patch1.zip to the c:\qt\qt-win-opensource-src-4.2.2 directory.
* Expand acs-4.2.2-patch1.zip in place.  '''''Note:''''' ensure that your archive utility restores permissions and ownership for the zip file contents.      Some tools (such as cygwin ''unzip'') don't do this by default, which will lead to compile errors when you compile the sources later-on.
* Expand acs-4.2.2-patch1.zip in place.  '''''Note:''''' ensure that your archive utility restores permissions and ownership for the zip file contents.      Some tools (such as cygwin ''unzip'') don't do this by default, which will lead to compile errors when you compile the sources later-on.
* Start a Cygwin shell, and cd to your new Qt source directory:
* Run installpatch42.bat in the c:\qt\qt-win-opensource-src-4.2.3 directory.
 
$ cd /cygdrive/c/qt/qt-win-opensource-src-4.2.2
 
* Patch the Qt sources:
 
$ patch -p1 -i qtwin_patch/msvc_bcc32_42.patch
 
* Voila!
* Voila!



Revision as of 02:24, 20 September 2007

Overview

On Win32 operating systems, Trolltech has adopted a policy of crippling their GPL'd "open source edition" of Qt 4.2 so that it can only be built using the MinGW environment, which is based upon the gcc compiler ported to Win32. Developers who wish to use Qt with Microsoft compilers would normally be encouraged to purchase the commercial edition of Qt, see the Trolltech FAQ entry on this subject. For convenience to those who wish to use Microsoft compilers, we are providing a patched version of the Qt GPL sources that can be built with Microsoft tools.

Installation

  • Download paraview-qt-win-opensource-src-4.2.2.zip, saving it to a convenient location (c:\qt is strongly recommended).
  • Expand the paraview-qt-win-opensource-src-4.2.2.zip file.
  • Start a DOS shell, and cd to the c:\qt\paraview-qt-win-opensource-src-4.2.2 directory.
    • The DOS shell should have your desired compiler environment
    • For example, "Start->Programs->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt"
  • Run the Qt configure script (not configure.exe):
c:\qt\paraview-qt-win-opensource-src-4.2.2> qconfigure.bat
  • From this point forward, compilation and deployment of the Qt libraries should proceed normally. Begin compilation using the in-console instructions provided by the configuration process.
  • Configure your PATH to point to c:\qt\paraview-qt-win-opensource-src-4.2.2\bin.
  • Use CMake to build ParaView normally.

Advanced Users

For the curious, here is the procedure used to patch the Qt GPL sources:

The QtWin Project provides a set of patches that allow the Qt GPL libraries to be built with Microsoft compilers.

  • Download qt-win-opensource-src-4.2.3.zip from Trolltech.
  • Expand qt-win-opensource-src-4.2.3.zip in a convenient location such as c:\qt. This will create a c:\qt\qt-win-opensource-src-4.2.3 directory containing the full Qt sources. Note: ensure that your archive utility restores permissions and ownership for the zip file contents. Some tools (such as cygwin unzip) don't do this by default, which will lead to compile errors when you compile the sources later-on.
  • Download acs-4.2.3-patch1.zip from the QtWin project.
  • Move the downloaded file acs-4.2.3-patch1.zip to the c:\qt\qt-win-opensource-src-4.2.3 directory.
  • Expand acs-4.2.2-patch1.zip in place. Note: ensure that your archive utility restores permissions and ownership for the zip file contents. Some tools (such as cygwin unzip) don't do this by default, which will lead to compile errors when you compile the sources later-on.
  • Run installpatch42.bat in the c:\qt\qt-win-opensource-src-4.2.3 directory.
  • Voila!

Older Versions