I’m trying to create a snap of a desktop QML application.
The creation/installation of the snap is working well using desktop-qt5, but the execution give:
Qt: Session management error: None of the authentication protocols specified are supported
QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:1 module "QtQuick" is not installed
...
Here is my snapcraft.yaml:
name: resizer
base: core18
version: '0.3'
summary: Batch image resizing
description: |
Resize multiple images or folders in once specifing ratio or max size.
grade: devel
confinement: devmode
apps:
resizer:
command: desktop-launch $SNAP/usr/bin/resizer
# plugs: [desktop, x11]
# plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb]
parts:
resizer-src:
source: https://github.com/lbaudouin/resizer-qml.git
plugin: qmake
qt-version: qt5
after: [desktop-qt5]
build-packages:
- build-essential
- qmlscene
- qt5-qmake
- qt5-default
- qtdeclarative5-dev
- zlib1g-dev
stage-packages:
- libqt5widgets5
- libqt5quickwidgets5
- qtwayland5
- libgl1-mesa-dev
- libgl1-mesa-dri
- libgl1-mesa-glx
- libxkbcommon0
- libqt5qml5
- libqt5quick5
- libqt5quickcontrols2-5
- libqt5concurrent5
- qmlscene
- qtdeclarative5-qtquick2-plugin
- qml-module-qtquick-controls
- qml-module-qtquick-controls2
- qml-module-qt-labs-platform
- qml-module-qtquick2
desktop-qt5:
build-packages:
- build-essential
- qtbase5-dev
- dpkg-dev
make-parameters:
- FLAVOR=qt5
plugin: make
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5
- try:
- appmenu-qt5
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5
What do I have to add in order to stage QML modules? Should I have to add plugs?
On Ubuntu installing qml-module-qtquick-controls2 package is enough.