aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-04-11 18:44:05 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-04-20 10:57:31 +0000
commitea7ca4ac8e4ab8adde8c909c0adef90f4341062a (patch)
tree90d60d7a479b190a3ccc0bb1e98510359da60927 /sources/pyside2
parenta861c09fd13d4657191c2d447d7f7d3db5d42d5e (diff)
Add installed package directory to PATH on Windows
This makes sure that all shared libraries like plugins and qml plugins are able to find the Qt libraries they depend on. Task-number: PYSIDE-642 Change-Id: I0f54481c089dfdbc69a9098f2768f98b1e7a9a22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/PySide2/__init__.py.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in
index 4ce266b69..f33b05e31 100644
--- a/sources/pyside2/PySide2/__init__.py.in
+++ b/sources/pyside2/PySide2/__init__.py.in
@@ -20,10 +20,16 @@ def _setupQtDirectories():
# Used by signature module.
os.environ["PYSIDE_PACKAGE_DIR"] = pyside_package_dir
- # On Windows add the PySide2\openssl folder (if it exists) to the
- # PATH so that the SSL DLLs can be found when Qt tries to dynamically
- # load them. Tell Qt to load them and then reset the PATH.
if sys.platform == 'win32':
+ # PATH has to contain the package directory, otherwise plugins
+ # won't be able to find their required Qt libraries (e.g. the
+ # svg image plugin won't find Qt5Svg.dll).
+ os.environ['PATH'] = pyside_package_dir + ";" + os.environ['PATH']
+
+ # On Windows add the PySide2\openssl folder (if it exists) to
+ # the PATH so that the SSL DLLs can be found when Qt tries to
+ # dynamically load them. Tell Qt to load them and then reset
+ # the PATH.
openssl_dir = os.path.join(pyside_package_dir, 'openssl')
if os.path.exists(openssl_dir):
path = os.environ['PATH']