Skip to content

Alexpux/Qt-builds

Repository files navigation

The scripts provided by the Qt-builds project are designed for building Qt and Qt-Creator with MinGW compiler from MinGW-builds[2] project.

The scripts are distributed under the 'BSD 3' license[1].

In order to use the scripts provided by the Qt-builds project it is needed:

1. Windows with installed Microsoft DirectX SDK (needed for Qt5).
   DirectX SDK available for download from http://www.microsoft.com/en-us/download/details.aspx?id=6812.

2. Notepad++ (http://notepad-plus-plus.org) for viewing log files.

3. Install MSYS2 (choose latest snapshot):
  https://sourceforge.net/projects/msys2/files/Base/

4. Get the scripts into '<msys root>/home/<user>/Qt-builds':
  "cd && git clone git://github.com/Alexpux/Qt-builds.git"

5. Set git eol handling:
  "git config --global core.eol lf"
  "git config --global --unset core.autocrlf"

6. In the MSYS file structure delete the '/MinGW' directory.

7. Delete the paths pointing to any preinstalled MinGW from the 'PATH' environment variable.

8. Go into the Qt-builds root directory.
  "cd && cd Qt-builds"

9. Build script has next parameters:
  The '--buildroot=<path>' option specifies to the script to use '<path>' as build directory.
    By default used <SCRIPTS_DIR>/work.
  The '--install-top=<path>' option specifies to the script to use '<path>' as top installation directory.
    By default used "C:/QtSDK" directory.
  The '--update-sources' option specifies to the script to update sources from repositories.
  The '--opengl-desktop' option specifies to the script to build Qt with '-opengl desktop' option.
    Affected only Qt-5.x versions. By default used '-angle' option.
  The '--qt-version=<version>' option specifies which version of Qt to build.
    If not specified the default (hardcoded in script) version is builded.
  The '--qt-git-branch=<branch_name>' option specified what branch of Qt5 clone when building Qt from git.
    By default clone stable branch.
  The '--build-python' specifies to the script to build Python instead using prebuilded Python from MinGW-builds.
  The '--build-ruby' specifies to the script to build Ruby instead using MSYS-ruby (when using MSYS2).
  The '--extra-stuff' specifies to the script to build some 3rdparty software.
  The '--osg' specifies to the script to build OpenSceneGraph.
  The '--coin3d' specifies to the script to build Coin3D.
  The '--no-qtcreator' specifies to the script doesn't build Qt-Creator.
  The '--static-qt' specifies to build Qt as static libraries with all dependencies as static.
    For now Qt5 static build has many restrictions and it can't be build with Webkit, ANGLE and ICU.
  The '--version' option print the version of Qt-builds script.
  For all available options please run: "./buildall --help"

10. Run:
  "./buildall i686" - for building 32-bit Qt
  "./buildall x86_64" - for building 64-bit Qt
  "./buildall i686 x86_64" - for building both 32 and 64 bits Qt

By default Qt installing in "C:/QtSDK/Qt{32,64}-<version>" and 3rdparty libraries in "C:/QtSDK/ported{32,64}".
You may change install location by pass "--install-top=$DIRECTORY" to build script.

For example:
./buildall --install-top=C:/SDK i686
building 32-bit Qt and installing Qt into C:/SDK/Qt32-<version>.

Binary builds are hosted on https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/.

To relocate installation of Qt you need only run "qtbinpatcher --nobackup" from <QTDIR> folder.
Thanks for Yuri Krugloff <krugloff@tver-soft.org> for qtbinpatcher.

[1] http://www.opensource.org/licenses/BSD-3-Clause
[2] https://sourceforge.net/projects/mingwbuilds