From ac9e9db2d0a909246ae2bc787a34916f92e085e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Fiestas?= Date: Thu, 16 Mar 2017 11:56:08 +0100 Subject: [PATCH 1/3] Remove or replace all uses of qmlImportsPath by qtToBeBundledInfo It seems that the removal of qmlImportsPath was half-done and there were still some uses of it around. --- shared/shared.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index 939a90e..b025458 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -1075,13 +1075,10 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, argumentList.append(qmlDir); } - argumentList.append( "-importPath"); - argumentList.append(qmlImportsPath); - argumentList.append( "-importPath"); argumentList.append(qtToBeBundledInfo.value("QT_INSTALL_QML ")); - LogDebug() << "qmlImportsPath:" << qmlImportsPath; + LogDebug() << "qmlImportsPath (QT_INSTALL_QML):" << qtToBeBundledInfo.value("QT_INSTALL_QML "); // run qmlimportscanner QProcess qmlImportScanner; @@ -1168,7 +1165,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, if (deploymentInfo.deployedLibraries.contains("QtWidgets") && qtQuickContolsInUse) { LogNormal() << "Deploying QML import QtQuick/PrivateWidgets"; QString name = "QtQuick/PrivateWidgets"; - QString path = qmlImportsPath + QLatin1Char('/') + name; + QString path = qtToBeBundledInfo.value("QT_INSTALL_QML ") + QLatin1Char('/') + name; deployQmlImport(appDirPath, deploymentInfo.rpathsUsed, path, name); LogNormal() << ""; } From a1a4923ba3ff4efc4f094c8793d65fa93c8b59db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Fiestas?= Date: Thu, 16 Mar 2017 12:04:09 +0100 Subject: [PATCH 2/3] Exclude /usr/local from being detected as "Distribution Qt" /usr/local is the canonical place to put self built applications and libraries so it should be exlucded from the logic to detect distribution shipped Qt. --- shared/shared.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index b025458..3d2ab4f 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -810,7 +810,7 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a setenv("LD_LIBRARY_PATH",newPath.toUtf8().constData(),1); } - if(qtLibsPath.startsWith("/usr/")){ + if(qtLibsPath.startsWith("/usr/") && !qtLibsPath.startsWith("/usr/local")){ LogError() << "Bundling Qt provided by distributions is not yet supported by this tool."; LogError() << "Please see https://github.com/probonopd/linuxdeployqt/issues/79 and"; LogError() << "submit a Pull Request to implement this."; From 0fea9e03d2d75e521999b0c5aec62e62386373b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Fiestas?= Date: Fri, 17 Mar 2017 17:41:28 +0100 Subject: [PATCH 3/3] Fix a typo in "QT_INSTALL_QML" key usage (removing extra space) The key with a space at the end does not seem to exists neither in my testing environment (container reproducing current travis.yml file) nor on my main system. --- shared/shared.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index 3d2ab4f..81ad75c 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -1076,9 +1076,9 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, } argumentList.append( "-importPath"); - argumentList.append(qtToBeBundledInfo.value("QT_INSTALL_QML ")); + argumentList.append(qtToBeBundledInfo.value("QT_INSTALL_QML")); - LogDebug() << "qmlImportsPath (QT_INSTALL_QML):" << qtToBeBundledInfo.value("QT_INSTALL_QML "); + LogDebug() << "qmlImportsPath (QT_INSTALL_QML):" << qtToBeBundledInfo.value("QT_INSTALL_QML"); // run qmlimportscanner QProcess qmlImportScanner; @@ -1165,7 +1165,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, if (deploymentInfo.deployedLibraries.contains("QtWidgets") && qtQuickContolsInUse) { LogNormal() << "Deploying QML import QtQuick/PrivateWidgets"; QString name = "QtQuick/PrivateWidgets"; - QString path = qtToBeBundledInfo.value("QT_INSTALL_QML ") + QLatin1Char('/') + name; + QString path = qtToBeBundledInfo.value("QT_INSTALL_QML") + QLatin1Char('/') + name; deployQmlImport(appDirPath, deploymentInfo.rpathsUsed, path, name); LogNormal() << ""; }