linuxdeploy: appimage is only working in local environment
-
Hi all,
I have a qml project and I want to deploy it as appimage . I am using linuxdeply to achieve that and here is the documentation.
When I followed the steps, I got an appimage at the end and it works fine in my pc without a problem. Since this is an appimage, I am also expecting this to work in my other linux PCs. But when I moved this appimage to other PCs, its not working and giving me error in the terminal as follows:
:~/Documents/documents/appImage/QtQuickAppRef/build$ ./QtQuickApp-82a3b40-x86_64.AppImage QQmlApplicationEngine failed to load component qrc:/main.qml:2 module "QtQuick.Window" is not installed
Here is my .pro file to deploy:
TEMPLATE += app QT += quick QT += qml quick QT += widgets QT += core CONFIG += c++11 release CONFIG += link_pkgconfig PKGCONFIG += opencv4 SOURCES += src/main.cpp SOURCES += src/opencvimageprovider.cpp SOURCES += src/videostreamer.cpp HEADERS += src/opencvimageprovider.h HEADERS += src/videostreamer.h RESOURCES += src/qml.qrc QML_IMPORT_PATH += /opt/Qt/5.15.2/gcc_64/qml QML2_IMPORT_PATH += /opt/Qt/5.15.2/gcc_64/qml QML_DESIGNER_IMPORT_PATH = # Default rules for deployment. unix { isEmpty(PREFIX) { PREFIX = /usr } target.path = $$PREFIX/bin shortcutfiles.files = resources/qtquickapp.desktop shortcutfiles.path = $$PREFIX/share/applications/ data.files += resources/qtquickapp.png data.path = $$PREFIX/share/pixmaps/ INSTALLS += shortcutfiles INSTALLS += data } INSTALLS += target DISTFILES += \ resources/qtquickapp.desktop \ resources/qtquickapp.png
What can cause this and how can I figure out this issue, thanks all
-
Hi,
Based on a quick look of the project README, did you specify QML_SOURCES_PATHS ?
-
On the README of the project it's written that this is an environment variable. Define it before the call to the command. You can do it on the same line.
-
@SGaist yes I got the point. but where is this path and what is that ? I tried couple of paths:
/opt/Qt/5.15.2/gcc_64/qml
/opt/Qt/5.15.2/gcc_64/include
These folders are inside my qt installation folder, and I tried like:
export QML_SOURCES_PATHS=/opt/Qt/5.15.2/gcc_64/include
but results are same, where QML_SOURCES_PATHS locates actually?
-
It should point to your application QML sources.