Open probonopd opened 7 years ago
qml/QMLTermWidget
is not deployed automatically.
The following manual workaround fixes it:
cp -r qmltermwidget/QMLTermWidget/ appdir/usr/qml/
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/bin/cool-retro-term -qmldir=. -qmldir=./qmltermwidget/ -appimage
What do I have to do in order to get qml/QMLTermWidget
deployed automatically? Other QML imports such as qml/QtQml
, qml/QtQuick
, qml/QtQuick.2
did get deployed automatically (at least with the second run).
Possibly this is a manifestation of https://github.com/probonopd/linuxdeployqt/issues/25.
I suspect it has to do with
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/bin/cool-retro-term -qmldir=. -qmldir=./qmltermwidget/ -appimage -verbose=3 2>&1 | grep QMLTermWidget -C 3
Log: Deploying QML import "QMLTermWidget"
Log: path: ""
Log: type: "module"
Log: Skip import: name or path is empty
What adds to the suspicion is this: https://travis-ci.org/probonopd/cool-retro-term/builds/203199838#L935-L977
Log: Deploying QML import "QtQuick.Controls"
Log: path: ""
Log: type: "module"
Log: Skip import: name or path is empty
Log: Deploying QML import "QtQuick.Dialogs"
Log: path: ""
Log: type: "module"
Log: Skip import: name or path is empty
Log: Deploying QML import "QtGraphicalEffects"
Log: path: ""
Log: type: "module"
Log: Skip import: name or path is empty
Log: Deploying QML import "QMLTermWidget"
Log: path: ""
Log: type: "module"
Log: Skip import: name or path is empty
Resulting in:
me@host:~/test/cool-retro-term$ /home/me/Downloads/cool-retro-term-166.g2f25bd3-x86-64.appimage
QApplication: invalid style override passed, ignoring it.
QQmlApplicationEngine failed to load component
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
Cannot load QML interface
So whenever we get
Log: path: ""
Log: type: "module"
we should try to figure out the path manually. The heuristic seems to be:
path: ""
Do you agree? Any volunteers to implement this?
https://github.com/probonopd/FeedTheMonkey/blob/patch-1/.travis.yml also suffers from this:
qrc:/qml/main.qml:24 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:21 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:23 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:22 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:20 module "QtQuick" is not installed
Adding -qmldir=/opt/qt58/qml/
solved that for me.
Duh, passing in -qmldir=$(readlink -f /opt/qt5*/qml/)
fixed it for me. Perhaps we can add code like this to the qmlimportscanner
call, something like
argumentList.append( "-importPath");
argumentList.append(qtToBeBundledInfo.value("QT_INSTALL_QML "));
Trying this in https://github.com/probonopd/linuxdeployqt/commit/fc571daf7bfb06e63e18aae85e1b134fecdfb99b
The extra -qmldir=$(readlink -f /opt/qt5*/qml/)
is not needed anmore thanks to @afiestas https://github.com/probonopd/linuxdeployqt/commit/ac9e9db2d0a909246ae2bc787a34916f92e085e6
Current hypothesis is that -qmldir
needs to be used properly, then it should work. Reopen if it doesn't.
https://github.com/probonopd/Hanoi-Towers/blob/patch-1/.travis.yml is also still affected (like lalamachine),
# Log: Deploying QML import "QtQuick.Controls"
# Log: path: ""
# Log: type: "module"
# Log: Skip import: name or path is empty
Stupid me; at least for Hanoi-Towers it works when installing qt59quickcontrols qt59quickcontrols2
Fails to deploy cool-retro-term: