aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt19
-rw-r--r--sources/pyside2/PySide2/qt.conf.in2
-rw-r--r--sources/pyside2/libpyside/pyside.cpp9
3 files changed, 29 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 971d0a9ef..651bf2734 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -13,6 +13,25 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_config.py.in"
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../pyside_version.py"
"${CMAKE_CURRENT_BINARY_DIR}/_git_pyside_version.py" @ONLY)
+# qt.conf needs to be placed next to QtWebEngineProcess so that the executable uses the correct
+# Prefix location leading to an existing icu data file. It is needed on Windows, Linux, and macOS
+# non-framework build. In framework build, instead of using qt.conf, Bundle querying is used.
+if (WIN32 OR (UNIX AND NOT APPLE) OR (APPLE AND NOT QtCore_is_framework))
+
+ if (WIN32)
+ # On Windows, the QtWebEngineProcess is directly located in the Prefix, due to not using
+ # a "Qt" subfolder like on the other platforms.
+ set(QT_CONF_PREFIX ".")
+ else()
+ # On Linux and non-framework macOS, the QtWebEngineProcess is in ./libexec, so prefix is one
+ # level higher.
+ set(QT_CONF_PREFIX "..")
+ endif()
+
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" @ONLY)
+endif()
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/__init__.py"
"${CMAKE_CURRENT_BINARY_DIR}/support/__init__.py" COPYONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/signature/__init__.py"
diff --git a/sources/pyside2/PySide2/qt.conf.in b/sources/pyside2/PySide2/qt.conf.in
new file mode 100644
index 000000000..ff5b0a30e
--- /dev/null
+++ b/sources/pyside2/PySide2/qt.conf.in
@@ -0,0 +1,2 @@
+[Paths]
+Prefix = @QT_CONF_PREFIX@
diff --git a/sources/pyside2/libpyside/pyside.cpp b/sources/pyside2/libpyside/pyside.cpp
index 4c7e6471c..1a59c87e0 100644
--- a/sources/pyside2/libpyside/pyside.cpp
+++ b/sources/pyside2/libpyside/pyside.cpp
@@ -494,7 +494,14 @@ bool registerInternalQtConf()
// rccData needs to be static, otherwise when it goes out of scope, the Qt resource system
// will point to invalid memory.
- static QByteArray rccData = QByteArray("[Paths]\nPrefix = ") + prefixPath.toLocal8Bit();
+ static QByteArray rccData = QByteArray("[Paths]\nPrefix = ") + prefixPath.toLocal8Bit()
+#ifdef Q_OS_WIN
+ // LibraryExecutables needs to point to Prefix instead of ./bin because we don't
+ // currently conform to the Qt default directory layout on Windows. This is necessary
+ // for QtWebEngineCore to find the location of QtWebEngineProcess.exe.
+ + QByteArray("\nLibraryExecutables = ") + prefixPath.toLocal8Bit()
+#endif
+ ;
rccData.append('\n');
// The RCC data structure expects a 4-byte size value representing the actual data.