diff --git a/qrenderdoc/3rdparty/pyside/Win32/PySide2/Qt5Qml.dll b/qrenderdoc/3rdparty/pyside/Win32/PySide2/Qt5Qml.dll new file mode 100644 index 000000000..31da57981 Binary files /dev/null and b/qrenderdoc/3rdparty/pyside/Win32/PySide2/Qt5Qml.dll differ diff --git a/qrenderdoc/3rdparty/pyside/Win32/PySide2/Qt5Qml_stub.cpp b/qrenderdoc/3rdparty/pyside/Win32/PySide2/Qt5Qml_stub.cpp new file mode 100644 index 000000000..340c17743 --- /dev/null +++ b/qrenderdoc/3rdparty/pyside/Win32/PySide2/Qt5Qml_stub.cpp @@ -0,0 +1,24 @@ +typedef unsigned long DWORD; +typedef void *HANDLE; +typedef void *LPVOID; + +class QObject; +class QString; + +class QQmlData { +public: __declspec(dllexport) static class QQmlData *__cdecl get(const QObject*,bool) {return 0;} +}; + +namespace QV4 { +struct Value; +struct ExecutionEngine { + __declspec(dllexport) unsigned __int64 __thiscall throwError(const QString&) {return 0;} + __declspec(dllexport) unsigned __int64 __thiscall throwSyntaxError(const QString&) {return 0;} + __declspec(dllexport) unsigned __int64 __thiscall throwTypeError(const QString&) {return 0;} +}; +struct PersistentValueStorage { + __declspec(dllexport) static ExecutionEngine *__cdecl getEngine(Value*) {return 0;} +}; +}; + +extern "C" long __stdcall _DllMainCRTStartup(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) {return 1;} \ No newline at end of file diff --git a/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp b/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp index c8369ce24..fd5548c54 100644 --- a/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp +++ b/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp @@ -56,6 +56,11 @@ PyTypeObject **SbkPySide2_QtWidgetsTypes = NULL; #endif +#ifdef _MSC_VER +// for the LoadLibrary call on 32-bit windows +#include +#endif + #include #include #include @@ -342,6 +347,14 @@ void PythonContext::GlobalInit() // set up PySide #if PYSIDE2_ENABLED { +// hack for win32 builds, where our pyside2 accidentally depends on Qt5Qml.dll for no good +// reason and we ship a stub to allow the dll to load instead of rebuilding the whole of pyside2 +// :S +#if defined(_MSC_VER) && !defined(_M_X64) + QString Qt5QmlStub = QApplication::applicationDirPath() + lit("/PySide2/Qt5Qml.dll"); + LoadLibraryA(Qt5QmlStub.toUtf8().data()); +#endif + Shiboken::AutoDecRef core(Shiboken::Module::import("PySide2.QtCore")); if(!core.isNull()) SbkPySide2_QtCoreTypes = Shiboken::Module::getTypes(core); diff --git a/qrenderdoc/qrenderdoc_local.vcxproj b/qrenderdoc/qrenderdoc_local.vcxproj index d92f2f30d..1651661f4 100644 --- a/qrenderdoc/qrenderdoc_local.vcxproj +++ b/qrenderdoc/qrenderdoc_local.vcxproj @@ -1712,6 +1712,11 @@ IF %ERRORLEVEL% NEQ 0 (echo ==================================================== PreserveNewest false + + PySide2\Qt5Qml.dll + PreserveNewest + false + PySide2\__init__.py PreserveNewest