a5b92645f1
The qmlimportscanner tool is provided by qtdeclarative. Because of the modularized installation in Nix, it can not be found via the usual mechanisms. Also, hard-coding it like we do for Qt5 would also not work, as it would require making qtbase depend on qtdeclarative. Here we add an option to provide its location via the environment. While this means macdeployqt does not work out of the box, it provides a workaround for users. Also, we make sure that qmlimportscanner gets passed the right QML import paths as described in the environment.
35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
From 32df59bea18bebc18d6d308750e88be325522d2e Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org>
|
|
Date: Thu, 10 Aug 2023 14:15:34 +0200
|
|
Subject: [PATCH 2/3] Check in the QML folder of this library does actually
|
|
exist
|
|
|
|
In a modularized installation, this folder will be the location where
|
|
`qtbase` itself is installed, but `qtbase` does not have any QML
|
|
code, and `qmlimportscanner` will complain that it does not exist.
|
|
---
|
|
src/tools/macdeployqt/shared/shared.cpp | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
|
|
index b8fcc9c9bd..676d34d545 100644
|
|
--- a/src/tools/macdeployqt/shared/shared.cpp
|
|
+++ b/src/tools/macdeployqt/shared/shared.cpp
|
|
@@ -1290,9 +1290,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
|
|
}
|
|
for (const QString &importPath : qmlImportPaths)
|
|
argumentList << "-importPath" << importPath;
|
|
+
|
|
QString qmlImportsPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
|
|
- argumentList.append( "-importPath");
|
|
- argumentList.append(qmlImportsPath);
|
|
+ if (QFile::exists(qmlImportsPath)) {
|
|
+ argumentList.append( "-importPath");
|
|
+ argumentList.append(qmlImportsPath);
|
|
+ }
|
|
|
|
// run qmlimportscanner
|
|
QProcess qmlImportScanner;
|
|
--
|
|
2.26.2
|
|
|