Merge pull request #297499 from seanybaggins/add-mingw-support-qt6-qtmultimedia-staging
Add mingw support qt6 qtmultimedia staging
This commit is contained in:
commit
6d070b44ac
|
@ -3,16 +3,28 @@
|
||||||
, qtlanguageserver
|
, qtlanguageserver
|
||||||
, qtshadertools
|
, qtshadertools
|
||||||
, openssl
|
, openssl
|
||||||
|
, stdenv
|
||||||
, python3
|
, python3
|
||||||
|
, lib
|
||||||
|
, pkgsBuildBuild
|
||||||
}:
|
}:
|
||||||
|
|
||||||
qtModule {
|
qtModule {
|
||||||
pname = "qtdeclarative";
|
pname = "qtdeclarative";
|
||||||
propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl python3 ];
|
strictDeps = true;
|
||||||
|
propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl ];
|
||||||
|
nativeBuildInputs = [ python3 ];
|
||||||
patches = [
|
patches = [
|
||||||
# prevent headaches from stale qmlcache data
|
# prevent headaches from stale qmlcache data
|
||||||
../patches/qtdeclarative-default-disable-qmlcache.patch
|
../patches/qtdeclarative-default-disable-qmlcache.patch
|
||||||
# add version specific QML import path
|
# add version specific QML import path
|
||||||
../patches/qtdeclarative-qml-paths.patch
|
../patches/qtdeclarative-qml-paths.patch
|
||||||
];
|
];
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderTools"
|
||||||
|
]
|
||||||
|
# Conditional is required to prevent infinite recursion during a cross build
|
||||||
|
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||||
|
"-DQt6QmlTools_DIR=${pkgsBuildBuild.qt6.qtdeclarative}/lib/cmake/Qt6QmlTools"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,18 +22,29 @@
|
||||||
, libunwind
|
, libunwind
|
||||||
, orc
|
, orc
|
||||||
, VideoToolbox
|
, VideoToolbox
|
||||||
|
, pkgsBuildBuild
|
||||||
}:
|
}:
|
||||||
|
|
||||||
qtModule {
|
qtModule {
|
||||||
pname = "qtmultimedia";
|
pname = "qtmultimedia";
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ libunwind orc ffmpeg_6 ]
|
buildInputs = [ ffmpeg_6 ]
|
||||||
|
++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ libunwind orc ]
|
||||||
++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio elfutils alsa-lib wayland libXrandr libva ];
|
++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio elfutils alsa-lib wayland libXrandr libva ];
|
||||||
propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools qtquick3d ]
|
propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools ]
|
||||||
|
++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ qtquick3d ]
|
||||||
++ lib.optionals stdenv.hostPlatform.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
|
++ lib.optionals stdenv.hostPlatform.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
|
||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ];
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ];
|
||||||
|
|
||||||
cmakeFlags = [ "-DENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS=0" ];
|
patches = lib.optionals stdenv.hostPlatform.isMinGW [
|
||||||
|
../patches/qtmultimedia-windows-no-uppercase-libs.patch
|
||||||
|
../patches/qtmultimedia-windows-resolve-function-name.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS=0"
|
||||||
|
"-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderToolsTools"
|
||||||
|
];
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin
|
||||||
"-include AudioToolbox/AudioToolbox.h";
|
"-include AudioToolbox/AudioToolbox.h";
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp b/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp
|
||||||
|
index c0fbb53..3c82085 100644
|
||||||
|
--- a/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp
|
||||||
|
+++ b/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#include <qwaitcondition.h>
|
||||||
|
#include <qmutex.h>
|
||||||
|
|
||||||
|
-#include "D3d11.h"
|
||||||
|
+#include "d3d11.h"
|
||||||
|
#include "dxgi1_2.h"
|
||||||
|
|
||||||
|
#include <system_error>
|
|
@ -0,0 +1,30 @@
|
||||||
|
diff --git a/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp b/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp
|
||||||
|
index aac77ae..71ffed6 100644
|
||||||
|
--- a/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp
|
||||||
|
+++ b/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp
|
||||||
|
@@ -42,11 +42,7 @@ static QString windowTitle(HWND hwnd) {
|
||||||
|
return QString::fromStdWString(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
-QList<QCapturableWindow> QWinCapturableWindows::windows() const
|
||||||
|
-{
|
||||||
|
- QList<QCapturableWindow> result;
|
||||||
|
-
|
||||||
|
- auto windowHandler = [](HWND hwnd, LPARAM lParam) {
|
||||||
|
+static int __stdcall windowHandler(HWND hwnd, LPARAM lParam) {
|
||||||
|
if (!canCaptureWindow(hwnd))
|
||||||
|
return TRUE; // Ignore window and continue enumerating
|
||||||
|
|
||||||
|
@@ -58,7 +54,11 @@ QList<QCapturableWindow> QWinCapturableWindows::windows() const
|
||||||
|
windows.push_back(windowData.release()->create());
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
- };
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+QList<QCapturableWindow> QWinCapturableWindows::windows() const
|
||||||
|
+{
|
||||||
|
+ QList<QCapturableWindow> result;
|
||||||
|
|
||||||
|
::EnumWindows(windowHandler, reinterpret_cast<LPARAM>(&result));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user