Commit 0bddab73 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Revert "Update Qt to 5.11 on Windows and build with ssl"

This reverts commit 9a1849eb.
parent 7fbcaac5
From 715db09b9ec282d149fffc41b16eef68c786c0cb Mon Sep 17 00:00:00 2001
From: Boudewijn Rempt <boud@valdyas.org>
Date: Mon, 23 Jul 2018 11:46:49 +0200
Subject: [PATCH 3/8] Subject: [PATCH 1/2] Don't request the MIME image every
time Windows asks for the list of supported types
From 674cfce97c4972176d2bcb55d7013c0ac2190029 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Tue, 21 Jun 2016 14:50:07 +0300
Subject: [PATCH 1/2] Don't request the MIME image every time Windows asks for
the list of supported types
Change-Id: I05516d83dc4e0f192bc94f92cefc722f25dae4d
Change-Id: I05516d83dc4e0f192bc94f92cefc722f25dae4d4
---
qtbase/src/plugins/platforms/windows/qwindowsmime.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
index 0439797a7..f63376bdf 100644
index a8264b5..90d646b 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1084,12 +1084,15 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p
@@ -1081,12 +1081,15 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p
bool QWindowsMimeImage::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
{
int cf = getCf(formatetc);
......@@ -33,5 +33,5 @@ index 0439797a7..f63376bdf 100644
bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
--
2.17.1
2.6.4
From 7edf7f22415082303eb6df2c0502152e40cc5135 Mon Sep 17 00:00:00 2001
From: Dirk Farin <farin@struktur.de>
Date: Fri, 25 May 2018 15:59:52 +0200
Subject: [PATCH 1/3] adapted to changed C++ API
---
plugins/impex/heif/HeifExport.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/impex/heif/HeifExport.cpp b/plugins/impex/heif/HeifExport.cpp
index 3c9fae1736..2f4629fc95 100644
--- a/plugins/impex/heif/HeifExport.cpp
+++ b/plugins/impex/heif/HeifExport.cpp
@@ -93,7 +93,7 @@ public:
{
}
- heif_error write(heif::Context&, const void* data, size_t size) override {
+ heif_error write(const void* data, size_t size) override {
qint64 n = m_io->write((const char*)data,size);
if (n != (qint64)size) {
QString error = m_io->errorString();
--
2.14.1
From 2101065bc63a4809cf62ce83b318d6fa16cbb6a2 Mon Sep 17 00:00:00 2001
From: Boudewijn Rempt <boud@valdyas.org>
Date: Mon, 23 Jul 2018 11:48:03 +0200
Subject: [PATCH 4/8] Hack: always return we support DIBV5
From 5e5026beb420018266d3d00fdb530bb714a841a6 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Tue, 21 Jun 2016 14:50:47 +0300
Subject: [PATCH 2/2] Hack: always return we support DIBV5
Asking for the entire image may be too expensive
......@@ -11,10 +11,10 @@ Change-Id: I44c38fad73f1bb5859eb58b941054eeb6c3c6b66
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
index f63376bdf..3b5c900b6 100644
index 90d646b..ef97db7 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1055,9 +1055,7 @@ QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, co
@@ -1052,9 +1052,7 @@ QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, co
QVector<FORMATETC> formatetcs;
if (mimeData->hasImage() && mimeType == QLatin1String("application/x-qt-image")) {
//add DIBV5 if image has alpha channel. Do not add CF_PNG here as it will confuse MS Office (QTBUG47656).
......@@ -26,5 +26,5 @@ index f63376bdf..3b5c900b6 100644
}
if (!formatetcs.isEmpty())
--
2.17.1
2.6.4
From b7fe5771ed409dfa74b0ea1ace1d98e1562f134c Mon Sep 17 00:00:00 2001
From: Boudewijn Rempt <boud@valdyas.org>
Date: Mon, 23 Jul 2018 11:48:49 +0200
Subject: [PATCH 5/8] Subject: [PATCH 3/4] Hack for fullscreen workaround
From 84a774e00e9d2535fdb8c798d7789130a9a008f6 Mon Sep 17 00:00:00 2001
From: Michael Abrahams <miabraha@gmail.com>
Date: Wed, 22 Jun 2016 13:37:06 -0400
Subject: [PATCH 3/4] Hack for fullscreen workaround
https://bugreports.qt.io/browse/QTBUG-41309
---
......@@ -9,18 +9,18 @@ https://bugreports.qt.io/browse/QTBUG-41309
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp
index 3909c64c5..4c794f746 100644
index 9c6cb53..d0829e3 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1956,7 +1956,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates newState)
const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE;
const bool wasSync = testFlag(SynchronousGeometryChangeEvent);
setFlag(SynchronousGeometryChangeEvent);
- SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf);
+ SetWindowPos(m_data.hwnd, HWND_TOP, r.left()-1, r.top()-1, r.width()+2, r.height()+2, swpf);
if (!wasSync)
clearFlag(SynchronousGeometryChangeEvent);
clearFlag(MaximizeToFullScreen);
@@ -1769,7 +1769,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState)
const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE;
const bool wasSync = testFlag(SynchronousGeometryChangeEvent);
setFlag(SynchronousGeometryChangeEvent);
- SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf);
+ SetWindowPos(m_data.hwnd, HWND_TOP, r.left()-1, r.top()-1, r.width()+2, r.height()+2, swpf);
if (!wasSync)
clearFlag(SynchronousGeometryChangeEvent);
QWindowSystemInterface::handleGeometryChange(window(), r);
--
2.17.1
2.7.4.windows.1
......@@ -3,9 +3,9 @@ if (WIN32)
list(APPEND _QT_conf -skip qt3d -skip qtactiveqt -skip qtcanvas3d
-skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects
-skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland
-skip qtwebchannel -skip qtwebsockets
-skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview
-skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools
-no-compile-examples -no-dbus -no-iconv -no-qml-debug
-no-compile-examples -no-dbus -no-iconv -no-qml-debug -no-ssl
-no-libproxy -no-system-proxies -no-icu -no-mtdev
-skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtnetworkauth
-skip qtpurchasing -skip qtremoteobjects -skip qtscxml -skip qtserialbus
......@@ -33,15 +33,17 @@ if (WIN32)
ExternalProject_Add(
ext_qt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.zip
URL_HASH SHA1=9b5464e2f42d7a673834950d0f440ca0d048f6a2
URL https://download.qt.io/archive/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.zip
URL_HASH SHA1=2d3c53cd9dc76a479873548921a20d3d9b6fb9ac
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/disable-wintab.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qtgui-private-headers.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Hack-always-return-we-support-DIBV5.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Hack-for-fullscreen-workaround.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qopengldebug-gles.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-189539-ANGLE-mingw-fix.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/QTBUG-57299.diff
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND <SOURCE_DIR>/configure.bat ${_QT_conf}
......@@ -58,8 +60,9 @@ elseif (NOT APPLE)
ExternalProject_Add(
ext_qt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
URL_MD5 c6f0854d7de7bde80cfd8cc85bb7152b
URL https://download.qt.io/official_releases/qt/5.10/5.10.0/single/qt-everywhere-src-5.10.0.tar.xz
URL_MD5 c5e275ab0ed7ee61d0f4b82cd471770d
#PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt-no-motion-compression.diff
CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -verbose -nomake examples -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtandroidextras -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard
INSTALL_DIR ${EXTPREFIX_qt}
......@@ -156,6 +159,21 @@ else( APPLE )
#
# Now configure ext_qt accordingly
#
if ((XCRUN_COMMAND_RESULT) AND (NOT (XCODE_VERSION VERSION_LESS 8.0.0)))
# Fix Xcode xcrun related issue.
# NOTE: This should be fixed by Qt 5.7.1 see here: http://code.qt.io/cgit/qt/qtbase.git/commit/?h=dev&id=77a71c32c9d19b87f79b208929e71282e8d8b5d9
# NOTE: but no one's holding their breath.
set(ext_qt_PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/macdeploy-qt.diff
COMMAND ${PATCH_COMMAND} -p1 -b -d <SOURCE_DIR>/qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/mac_standardpaths_qtbug-61159.diff
#COMMAND ${PATCH_COMMAND} -p1 -b -d <SOURCE_DIR>/qtbase/mkspecs/features/mac -i ${CMAKE_CURRENT_SOURCE_DIR}/mac-default.patch
)
message(STATUS "${EXTPREFIX_qt}:Additional patches injected.")
else()
# No extra patches will be applied
# NOTE: defaults for some untested scenarios like xcrun fails and xcode_version < 8.
# NOTE: that is uncharted territory and (hopefully) a very unlikely scenario...
set(ext_qt_PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/macdeploy-qt.diff)
endif()
# Qt is big - try and parallelize if at all possible
include(ProcessorCount)
......@@ -183,10 +201,10 @@ else( APPLE )
LOG_INSTALL ON
BUILD_IN_SOURCE ON
URL https://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
URL_MD5 c6f0854d7de7bde80cfd8cc85bb7152b
URL https://download.qt.io/official_releases/qt/5.10/5.10.0/single/qt-everywhere-src-5.10.0.tar.xz
URL_MD5 c5e275ab0ed7ee61d0f4b82cd471770d
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/macdeploy-qt.diff
PATCH_COMMAND ${ext_qt_PATCH_COMMAND}
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND <SOURCE_DIR>/configure
......
From 7a5828621ce1f44c6af39257bc62cf6fac5f22c4 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Fri, 26 Jan 2018 08:37:40 +0100
Subject: [PATCH] Windows/QSaveFile: Fix locking issues on Dropbox drives
Add a flag to QTemporaryFileEngine causing the file to be opened in
non-shared mode, preventing renaming failures caused by the Dropbox
driver accessing it.
Task-number: QTBUG-57299
Change-Id: Id7afc3559fd15784d4166efbbd057d592b5e0ab2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fe5edcee602f0ab2912bbdd1a21f4309ed7dbfd6)
---
src/corelib/io/qsavefile.cpp | 2 +-
src/corelib/io/qtemporaryfile.cpp | 11 +++++++----
src/corelib/io/qtemporaryfile_p.h | 5 +++++
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/corelib/io/qsavefile.cpp b/src/corelib/io/qsavefile.cpp
index 3f45ca5f913..aaf3d1f5fb1 100644
--- a/src/corelib/io/qsavefile.cpp
+++ b/src/corelib/io/qsavefile.cpp
@@ -231,7 +231,7 @@ bool QSaveFile::open(OpenMode mode)
d->finalFileName = existingFile.filePath();
}
- d->fileEngine = new QTemporaryFileEngine;
+ d->fileEngine = new QTemporaryFileEngine(QTemporaryFileEngine::Win32NonShared);
// if the target file exists, we'll copy its permissions below,
// but until then, let's ensure the temporary file is not accessible
// to a third party
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 8a99873fee1..4712e65a419 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -117,7 +117,7 @@ typedef int NativeFileHandle;
*/
static bool createFileFromTemplate(NativeFileHandle &file,
QFileSystemEntry::NativePath &path, size_t pos, size_t length, quint32 mode,
- QSystemError &error)
+ int flags, QSystemError &error)
{
Q_ASSERT(length != 0);
Q_ASSERT(pos < size_t(path.length()));
@@ -151,16 +151,18 @@ static bool createFileFromTemplate(NativeFileHandle &file,
// Atomically create file and obtain handle
#if defined(Q_OS_WIN)
Q_UNUSED(mode);
+ const DWORD shareMode = (flags & QTemporaryFileEngine::Win32NonShared)
+ ? 0u : (FILE_SHARE_READ | FILE_SHARE_WRITE);
# ifndef Q_OS_WINRT
file = CreateFile((const wchar_t *)path.constData(),
GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_NEW,
+ shareMode, NULL, CREATE_NEW,
FILE_ATTRIBUTE_NORMAL, NULL);
# else // !Q_OS_WINRT
file = CreateFile2((const wchar_t *)path.constData(),
GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, CREATE_NEW,
+ shareMode, CREATE_NEW,
NULL);
# endif // Q_OS_WINRT
@@ -182,6 +184,7 @@ static bool createFileFromTemplate(NativeFileHandle &file,
return false;
}
#else // POSIX
+ Q_UNUSED(flags)
file = QT_OPEN(path.constData(),
QT_OPEN_CREAT | O_EXCL | QT_OPEN_RDWR | QT_OPEN_LARGEFILE,
static_cast<mode_t>(mode));
@@ -342,7 +345,7 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
NativeFileHandle &file = d->fd;
#endif
- if (!createFileFromTemplate(file, filename, phPos, phLength, fileMode, error)) {
+ if (!createFileFromTemplate(file, filename, phPos, phLength, fileMode, flags, error)) {
setError(QFile::OpenError, error.toString());
return false;
}
diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h
index 7f365f0e8a1..b0fab3a2558 100644
--- a/src/corelib/io/qtemporaryfile_p.h
+++ b/src/corelib/io/qtemporaryfile_p.h
@@ -85,6 +85,10 @@ class QTemporaryFileEngine : public QFSFileEngine
{
Q_DECLARE_PRIVATE(QFSFileEngine)
public:
+ enum Flags { Win32NonShared = 0x1 };
+
+ explicit QTemporaryFileEngine(int _flags = 0) : flags(_flags) {}
+
void initialize(const QString &file, quint32 mode, bool nameIsTemplate = true)
{
Q_D(QFSFileEngine);
@@ -109,6 +113,7 @@ public:
bool close() override;
quint32 fileMode;
+ int flags;
bool filePathIsTemplate;
bool filePathWasTemplate;
};
--
2.16.3
This diff is collapsed.
diff --git a/qtbase/src/angle/src/common/common.pri b/qtbase/src/angle/src/common/common.pri
index c1fad14951..6a558a957b 100644
--- a/qtbase/src/angle/src/common/common.pri
+++ b/qtbase/src/angle/src/common/common.pri
@@ -21,20 +21,6 @@ lib_replace.replace = \$\$\$\$[QT_INSTALL_LIBS]
lib_replace.CONFIG = path
QMAKE_PRL_INSTALL_REPLACE += lib_replace
-# DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK.
-winrt|msvc {
- FXC = fxc.exe
-} else {
- DX_DIR = $$(DXSDK_DIR)
- isEmpty(DX_DIR) {
- error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.")
- }
-
- equals(QMAKE_TARGET.arch, x86_64) {
- FXC = \"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\"
- } else {
- FXC = \"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\"
- }
-}
+FXC = $$QMAKE_FXC_LOCATION
static: DEFINES *= LIBGLESV2_EXPORT_H_ ANGLE_EXPORT=
diff --git a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json
index 28c8034c75..77cfb6b592 100644
--- a/qtbase/src/gui/configure.json
+++ b/qtbase/src/gui/configure.json
@@ -615,11 +615,14 @@
"label": "DirectX SDK",
"type": "directX",
"files": [
- "d3dcompiler.h",
- "d3d11.lib",
- "fxc.exe"
+ "d3dcompiler.h"
]
},
+ "fxc": {
+ "label": "DirectX Shader Compiler",
+ "type": "fxc",
+ "log": "value"
+ },
"egl-x11": {
"label": "EGL on X11",
"type": "compile",
@@ -842,10 +845,11 @@
"angle": {
"label": "ANGLE",
"autoDetect": "features.opengles2 || features.opengl-dynamic",
- "condition": "config.win32 && tests.directx",
+ "condition": "config.win32 && tests.directx && tests.fxc",
"output": [
"publicFeature",
- { "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" }
+ { "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" },
+ { "type": "varAssign", "name": "QMAKE_FXC_LOCATION", "value": "tests.fxc.value" }
]
},
"angle_d3d11_qdtd": {
diff --git a/qtbase/src/gui/configure.pri b/qtbase/src/gui/configure.pri
index aaffa835dc..566686b4f6 100644
--- a/qtbase/src/gui/configure.pri
+++ b/qtbase/src/gui/configure.pri
@@ -15,22 +15,12 @@ defineTest(qtConfLibrary_freetype) {
return(true)
}
-# Check for Direct X SDK (include, lib, and direct shader compiler 'fxc').
-# Up to Direct X SDK June 2010 and for MinGW, this is pointed to by the
-# DXSDK_DIR variable. Starting with Windows Kit 8, it is included in
-# the Windows SDK. Checking for the header is not sufficient, since it
-# is also present in MinGW.
+# For MSVC everything DirectX related is included in Windows Kit >= 8,
+# so we do not do any magic in this case.
+# For MinGW we need the shader compiler (fxc.exe), which
+# are not part of MinGW. They can either be obtained from a DirectX SDK
+# (keep the old approach working) or Windows Kit (>= 8).
defineTest(qtConfTest_directX) {
- dxdir = $$getenv("DXSDK_DIR")
- !isEmpty(dxdir) {
- EXTRA_INCLUDEPATH += $$dxdir/include
- equals(QT_ARCH, x86_64): \
- EXTRA_LIBDIR += $$dxdir/lib/x64
- else: \
- EXTRA_LIBDIR += $$dxdir/lib/x86
- EXTRA_PATH += $$dxdir/Utilities/bin/x86
- }
-
$$qtConfEvaluate("features.sse2") {
ky = $$size($${1}.files._KEYS_)
$${1}.files._KEYS_ += $$ky
@@ -42,6 +32,50 @@ defineTest(qtConfTest_directX) {
return(false)
}
+defineTest(qtConfTest_fxc) {
+ !mingw {
+ fxc = $$qtConfFindInPath("fxc.exe")
+ } else {
+ dxdir = $$getenv("DXSDK_DIR")
+ winkitdir = $$getenv("WindowsSdkDir")
+ !isEmpty(dxdir) {
+ equals(QT_ARCH, x86_64): \
+ fxc = $$dxdir/Utilities/bin/x64/fxc.exe
+ else: \
+ fxc = $$dxdir/Utilities/bin/x86/fxc.exe
+ } else: !isEmpty(winkitdir) {
+ equals(QT_ARCH, x86_64): \
+ fxc = $$winkitdir/bin/x64/fxc.exe
+ else: \
+ fxc = $$winkitdir/bin/x86/fxc.exe
+
+ !exists($$fxc) {
+ binsubdirs = $$files($$winkitdir/bin/*)
+ for (dir, binsubdirs) {
+ equals(QT_ARCH, x86_64): \
+ finalBinDir = $$dir/x64
+ else: \
+ finalBinDir = $$dir/x86
+
+ fxc = $${finalBinDir}/fxc.exe
+ exists($$fxc) {
+ break()
+ }
+ }
+ }
+ }
+ }
+
+ !isEmpty(fxc):exists($$fxc) {
+ $${1}.value = $$fxc
+ export($${1}.value)
+ $${1}.cache += value
+ export($${1}.cache)
+ return(true)
+ }
+ return(false)
+}
+
defineTest(qtConfTest_xkbConfigRoot) {
qtConfTest_getPkgConfigVariable($${1}): return(true)
From 55100c8f5bb5d951fe20255ef99e02d26f5a8323 Mon Sep 17 00:00:00 2001
From: Boudewijn Rempt <boud@valdyas.org>
Date: Mon, 23 Jul 2018 11:53:53 +0200
Subject: [PATCH 7/8] gerrit-189539-ANGLE-mingw-fix.patch
commit 644ff9428853f138649de0419de4b49bf41bc738
Author: Oliver Wolff <oliver.wolff@qt.io>
Date: Tue Nov 28 13:30:52 2017 +0100
---
qtbase/src/angle/src/common/common.pri | 16 +------
qtbase/src/gui/configure.json | 14 ++++--
qtbase/src/gui/configure.pri | 64 ++++++++++++++++++++------
3 files changed, 59 insertions(+), 35 deletions(-)
ANGLE: D3D11: Fix shared handle support detection for WARP when MinGW is used
The MinGW version we support supports IsWindows8OrGreater so that we can
check the windows version properly. As the OpenGL detection falls back
to WARP in case of RDP it was possible, that shared handles were wrongly
stated as supported, which caused crashes in users' code.
Task-number: QTBUG-64657
Change-Id: Iaca2bd169f2764cf6ec68a1d36112a735246b29a
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 6508fdca1dcc7105947befadba272d0fd4bbc27f)
diff --git a/qtbase/src/angle/src/common/common.pri b/qtbase/src/angle/src/common/common.pri
index c1fad1495..6a558a957 100644
--- a/qtbase/src/angle/src/common/common.pri
+++ b/qtbase/src/angle/src/common/common.pri
@@ -21,20 +21,6 @@ lib_replace.replace = \$\$\$\$[QT_INSTALL_LIBS]
lib_replace.CONFIG = path
QMAKE_PRL_INSTALL_REPLACE += lib_replace
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
index 0173311bc6..5118bdbe9c 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -2645,7 +2645,7 @@ bool Renderer11::getShareHandleSupport() const
-# DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK.
-winrt|msvc {
- FXC = fxc.exe
-} else {
- DX_DIR = $$(DXSDK_DIR)
- isEmpty(DX_DIR) {
- error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.")
- }
-
- equals(QMAKE_TARGET.arch, x86_64) {
- FXC = \"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\"
- } else {
- FXC = \"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\"
- }
-}
+FXC = $$QMAKE_FXC_LOCATION
static: DEFINES *= LIBGLESV2_EXPORT_H_ ANGLE_EXPORT=
diff --git a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json
index 219385a10..41241597f 100644
--- a/qtbase/src/gui/configure.json
+++ b/qtbase/src/gui/configure.json
@@ -656,11 +656,14 @@
"label": "DirectX SDK",
"type": "directX",
"files": [
- "d3dcompiler.h",
- "d3d11.lib",
- "fxc.exe"
+ "d3dcompiler.h"
]
},
+ "fxc": {
+ "label": "DirectX Shader Compiler",
+ "type": "fxc",
+ "log": "value"
+ },
"egl-x11": {
"label": "EGL on X11",
"type": "compile",
@@ -909,10 +912,11 @@
"angle": {
"label": "ANGLE",
"autoDetect": "features.opengles2 || features.opengl-dynamic",
- "condition": "config.win32 && tests.directx",
+ "condition": "config.win32 && tests.directx && tests.fxc",
"output": [
"publicFeature",
- { "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" }
+ { "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" },
+ { "type": "varAssign", "name": "QMAKE_FXC_LOCATION", "value": "tests.fxc.value" }
]
},
"angle_d3d11_qdtd": {
diff --git a/qtbase/src/gui/configure.pri b/qtbase/src/gui/configure.pri
index fcd2d1f73..39a5b987a 100644
--- a/qtbase/src/gui/configure.pri
+++ b/qtbase/src/gui/configure.pri
@@ -15,22 +15,12 @@ defineTest(qtConfLibrary_freetype) {
return(true)
}
-# Check for Direct X SDK (include, lib, and direct shader compiler 'fxc').
-# Up to Direct X SDK June 2010 and for MinGW, this is pointed to by the
-# DXSDK_DIR variable. Starting with Windows Kit 8, it is included in
-# the Windows SDK. Checking for the header is not sufficient, since it
-# is also present in MinGW.
+# For MSVC everything DirectX related is included in Windows Kit >= 8,
+# so we do not do any magic in this case.
+# For MinGW we need the shader compiler (fxc.exe), which
+# are not part of MinGW. They can either be obtained from a DirectX SDK
+# (keep the old approach working) or Windows Kit (>= 8).
defineTest(qtConfTest_directX) {
- dxdir = $$getenv("DXSDK_DIR")
- !isEmpty(dxdir) {
- EXTRA_INCLUDEPATH += $$dxdir/include
- equals(QT_ARCH, x86_64): \
- EXTRA_LIBDIR += $$dxdir/lib/x64
- else: \
- EXTRA_LIBDIR += $$dxdir/lib/x86
- EXTRA_PATH += $$dxdir/Utilities/bin/x86
- }
-
$$qtConfEvaluate("features.sse2") {
ky = $$size($${1}.files._KEYS_)
$${1}.files._KEYS_ += $$ky
@@ -42,6 +32,50 @@ defineTest(qtConfTest_directX) {
return(false)
}
+defineTest(qtConfTest_fxc) {
+ !mingw {
+ fxc = $$qtConfFindInPath("fxc.exe")
+ } else {
+ dxdir = $$getenv("DXSDK_DIR")
+ winkitdir = $$getenv("WindowsSdkDir")
+ !isEmpty(dxdir) {
+ equals(QT_ARCH, x86_64): \
+ fxc = $$dxdir/Utilities/bin/x64/fxc.exe
+ else: \
+ fxc = $$dxdir/Utilities/bin/x86/fxc.exe
+ } else: !isEmpty(winkitdir) {
+ equals(QT_ARCH, x86_64): \
+ fxc = $$winkitdir/bin/x64/fxc.exe
+ else: \
+ fxc = $$winkitdir/bin/x86/fxc.exe
+
+ !exists($$fxc) {
+ binsubdirs = $$files($$winkitdir/bin/*)
+ for (dir, binsubdirs) {
+ equals(QT_ARCH, x86_64): \
+ finalBinDir = $$dir/x64
+ else: \
+ finalBinDir = $$dir/x86
+
+ fxc = $${finalBinDir}/fxc.exe
+ exists($$fxc) {
+ break()
+ }
+ }
+ }
+ }
+ }
+
+ !isEmpty(fxc):exists($$fxc) {
+ $${1}.value = $$fxc
+ export($${1}.value)
+ $${1}.cache += value
+ export($${1}.cache)
+ return(true)
+ }
+ return(false)
+}
+
defineTest(qtConfTest_qpaDefaultPlatform) {
name =
!isEmpty(config.input.qpa_default_platform): name = $$config.input.qpa_default_platform
--
2.17.1
if (deviceType == d3d11::ANGLE_D3D11_DEVICE_TYPE_WARP)
{
-#if !defined(ANGLE_ENABLE_WINDOWS_STORE) && !defined(__GNUC__)
+#ifndef ANGLE_ENABLE_WINDOWS_STORE
if (!IsWindows8OrGreater())
{
// WARP on Windows 7 doesn't support shared handles
diff --git a/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch b/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch
index dc091b0497..f42ff2141b 100644
--- a/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch
+++ b/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch
@@ -405,15 +405,6 @@ index ea84783..62badcc 100644
if (mD3d11Module)
{
-@@ -2618,7 +2642,7 @@ bool Renderer11::getShareHandleSupport() const
-
- if (deviceType == d3d11::ANGLE_D3D11_DEVICE_TYPE_WARP)
- {
--#ifndef ANGLE_ENABLE_WINDOWS_STORE
-+#if !defined(ANGLE_ENABLE_WINDOWS_STORE) && !defined(__GNUC__)
- if (!IsWindows8OrGreater())
- {
- // WARP on Windows 7 doesn't support shared handles
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
index 62e9816..b4e7761 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
--- old/default_pre.prf 2016-06-10 02:48:56.000000000 -0400
+++ new/default_pre.prf 2016-09-21 02:39:08.000000000 -0400
@@ -12,7 +12,7 @@
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
# Make sure Xcode is set up properly
- isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
+ isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
}
diff --git a/src/corelib/io/qstandardpaths_mac.mm b/src/corelib/io/qstandardpaths_mac.mm
index e25339a..3bb7a78 100644
--- a/src/corelib/io/qstandardpaths_mac.mm
+++ b/src/corelib/io/qstandardpaths_mac.mm
@@ -196,42 +196,31 @@
it != masks.end(); ++it) {
const QString path = baseWritableLocation(type, *it, true);
if (!path.isEmpty() && !dirs.contains(path))
dirs.append(path);
}
}
if (type == AppDataLocation || type == AppLocalDataLocation) {
CFBundleRef mainBundle = CFBundleGetMainBundle();
if (mainBundle) {
- CFURLRef bundleUrl = CFBundleCopyBundleURL(mainBundle);
- CFStringRef cfBundlePath = CFURLCopyFileSystemPath(bundleUrl, kCFURLPOSIXPathStyle);
- QString bundlePath = QString::fromCFString(cfBundlePath);
- CFRelease(cfBundlePath);
- CFRelease(bundleUrl);
-
- CFURLRef resourcesUrl = CFBundleCopyResourcesDirectoryURL(mainBundle);
- CFStringRef cfResourcesPath = CFURLCopyFileSystemPath(resourcesUrl,
- kCFURLPOSIXPathStyle);
- QString resourcesPath = QString::fromCFString(cfResourcesPath);
- CFRelease(cfResourcesPath);
- CFRelease(resourcesUrl);
-
- // Handle bundled vs unbundled executables. CFBundleGetMainBundle() returns
- // a valid bundle in both cases. CFBundleCopyResourcesDirectoryURL() returns
- // an absolute path for unbundled executables.
- if (resourcesPath.startsWith(QLatin1Char('/')))
- dirs.append(resourcesPath);
- else
- dirs.append(bundlePath + resourcesPath);
- }
- }
+ if (QCFType<CFURLRef> resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle)) {
+ if (QCFType<CFURLRef> absoluteResouresURL = CFURLCopyAbsoluteURL(resourcesURL)) {
+ if (QCFType<CFStringRef> path = CFURLCopyFileSystemPath(absoluteResouresURL,
+ kCFURLPOSIXPathStyle)) {
+ dirs.append(QString::fromCFString(path));