Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52487

Remove DirectX SDK 10 dependency from '-opengl dynamic' builds using MinGW-W64

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.1
    • 5.7, 5.9.1
    • Build System
    • None
    • 7a481fce28b0ffbb77f8631673009bf9bf615088

    Description

      Hi, Everyone,

      Since Qt-5.7 dropped support of MSVC versions < 2013 (see Qt Documentation) and thus Windows SDK versions < 8, same could be done for MinGW-W64. Mean no need in DirectX SDK 10 dependency for -opengl dynamic builds using MinGW-W64, when DirectX 11 toolchain added to MinGW-W64 distributions starting from version 4.9.2.
      The only missing tool is Direct3D Shader Compiler 10 (fxc.exe), which could be taken from Windows SDK 8.1 or 10.

      Build steps:

      • in file qtbase\src\angle\src\common\common.pri change string:
        winrt|if(msvc:!win32-msvc2005:!win32-msvc2008:!win32-msvc2010){
        

        to

        winrt|msvc|if(gcc:win32) {
        
      • add to %PATH% environment variable one of strings:
        %ProgramFiles(x86)%\Windows Kits\10\bin\x86
        %ProgramFiles(x86)%\Windows Kits\10\bin\x64
        %ProgramFiles(x86)%\Windows Kits\8.1\bin\x86
        %ProgramFiles(x86)%\Windows Kits\8.1\bin\x64
        

        depending of target platform and used system,

      • configure and build Qt with -opengl dynamic key,

      Tested for Qt-5.7 with shared+<debug,release> configurations using MinGW-W64, and all builds finished successfully. Also checked, that patch doesn't break builds using MSVC and ICC.

      Still required detailed testing on real OpenGL ES applications. AFAIK, MinGW-W64 use Wine implementation of DirectX, thus could be regressions during runtime.

      If proposed patch would be applied, additional changes could be made to:

      • file:
        qtbase\src\angle\src\common\common.pri
        

        in order to remove became obsolete code:

        } else {
            DX_DIR = $$(DXSDK_DIR)
            isEmpty(DX_DIR) {
        	
        [snip]
        
                LIBS_PRIVATE += -L$$DXLIB_DIR
            }
        }
        
      • files:
        qtbase\tools\configure\configureapp.cpp
        qtbase\tools\configure\environment.cpp
        

        in order to remove references to DXSDK_DIR variable,

      • Qt Documentation in order to update requirements and build steps for -opengl dynamic builds using MinGW-W64.

      Regards,
      Alexander

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              owolff Oliver Wolff
              sav sav
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes