[sysadmin/ci-tooling] helpers/helperslib: Ensure that we setup QT_DATA_DIRS on Windows & MacOS.
Ben Cooksley
null at kde.org
Tue Sep 3 18:48:00 BST 2019
Git commit f271a43036c1c2b1ab4c328af6ebde7d92b7f5a5 by Ben Cooksley.
Committed on 03/09/2019 at 17:47.
Pushed by bcooksley into branch 'master'.
Ensure that we setup QT_DATA_DIRS on Windows & MacOS.
While not an upstream option, it is one supported by the Craft patched Qt (which we use on Windows & MacOS) so we're going to rely on this.
CCMAIL: faure at kde.org
CCMAIL: kde-windows at kde.org
M +7 -0 helpers/helperslib/EnvironmentHandler.py
https://invent.kde.org/sysadmin/ci-tooling/commit/f271a43036c1c2b1ab4c328af6ebde7d92b7f5a5
diff --git a/helpers/helperslib/EnvironmentHandler.py b/helpers/helperslib/EnvironmentHandler.py
index d9075d8..5fc4cc2 100644
--- a/helpers/helperslib/EnvironmentHandler.py
+++ b/helpers/helperslib/EnvironmentHandler.py
@@ -55,6 +55,13 @@ def generateFor( installPrefix ):
# Set the variable into our cloned environment
clonedEnv[variableName] = newEntry
+ # If we're on Windows or MacOS, then setting XDG_DATA_DIRS will have no effect whatsoever
+ # Fortunately, even though Qt Upstream doesn't support this, the Craft patched version of Qt does support the QT_DATA_DIRS variable which will be followed
+ # To ensure all our resources can be found, we make sure QT_DATA_DIRS is set
+ # We leave XDG_DATA_DIRS set to ensure any tools which haven't been adapted to the Windows/Mac environment continue to work
+ if sys.platform == 'win32' or sys.platform == 'darwin':
+ clonedEnv['QT_DATA_DIRS'] = clonedEnv['XDG_DATA_DIRS']
+
# Qt needs hand holding in order to work properly
# We only do this if we are in a Qt 5 environment which we determine by the absence of a Qt 4 environment
if sys.platform != 'win32' and not os.path.exists('/usr/bin/qmake-qt4'):
More information about the Kde-windows
mailing list