Skip to content

Commit 585f487

Browse files
authored
Merge pull request probonopd#91 from afiestas/master
Remove or replace all uses of qmlImportsPath by qtToBeBundledInfo and exclude /usr/local from distro shipped Qt
2 parents fc571da + 0fea9e0 commit 585f487

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

shared/shared.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a
810810
setenv("LD_LIBRARY_PATH",newPath.toUtf8().constData(),1);
811811
}
812812

813-
if(qtLibsPath.startsWith("/usr/")){
813+
if(qtLibsPath.startsWith("/usr/") && !qtLibsPath.startsWith("/usr/local")){
814814
LogError() << "Bundling Qt provided by distributions is not yet supported by this tool.";
815815
LogError() << "Please see https://github.com/probonopd/linuxdeployqt/issues/79 and";
816816
LogError() << "submit a Pull Request to implement this.";
@@ -1076,12 +1076,9 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo,
10761076
}
10771077

10781078
argumentList.append( "-importPath");
1079-
argumentList.append(qmlImportsPath);
1079+
argumentList.append(qtToBeBundledInfo.value("QT_INSTALL_QML"));
10801080

1081-
argumentList.append( "-importPath");
1082-
argumentList.append(qtToBeBundledInfo.value("QT_INSTALL_QML "));
1083-
1084-
LogDebug() << "qmlImportsPath:" << qmlImportsPath;
1081+
LogDebug() << "qmlImportsPath (QT_INSTALL_QML):" << qtToBeBundledInfo.value("QT_INSTALL_QML");
10851082

10861083
// run qmlimportscanner
10871084
QProcess qmlImportScanner;
@@ -1168,7 +1165,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo,
11681165
if (deploymentInfo.deployedLibraries.contains("QtWidgets") && qtQuickContolsInUse) {
11691166
LogNormal() << "Deploying QML import QtQuick/PrivateWidgets";
11701167
QString name = "QtQuick/PrivateWidgets";
1171-
QString path = qmlImportsPath + QLatin1Char('/') + name;
1168+
QString path = qtToBeBundledInfo.value("QT_INSTALL_QML") + QLatin1Char('/') + name;
11721169
deployQmlImport(appDirPath, deploymentInfo.rpathsUsed, path, name);
11731170
LogNormal() << "";
11741171
}

0 commit comments

Comments
 (0)