Plugins 如何将插件包含到QT5桌面应用程序的快照中?

Plugins 如何将插件包含到QT5桌面应用程序的快照中?,plugins,qt5,snapcraft,Plugins,Qt5,Snapcraft,我有一个用QT5编写的Linux桌面应用程序,我想将其作为SNAP包进行部署。 生成和安装正常,但应用程序不可执行,并出现以下错误: This application failed to start because it could not find or load the Qt platform plugin "xcb" in "". 这是我的snapcraft.yaml name: animationmaker version: '1.0' summary: Create keyframe

我有一个用QT5编写的Linux桌面应用程序,我想将其作为SNAP包进行部署。 生成和安装正常,但应用程序不可执行,并出现以下错误:

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
这是我的snapcraft.yaml

name: animationmaker
version: '1.0'
summary: Create keyframe animation and export them to a movie file
description: |
  This app can be used to create animated movie based on keyframe animations.

grade: stable
confinement: strict

apps:
  animationmaker:
    command: AnimationMaker

parts:
  animationmaker:
    plugin: qmake
    qt-version: qt5
    source: https://github.com/Artanidos/AnimationMaker.git
我认为QT5中的插件丢失了,但我不知道如何修改yaml以包含它们。 当我构建AppImage时,有以下插件,包括iconengines、imageformats和platform。
有什么想法吗

插件包含在
libqt5gui5
中,您可以将其作为后台软件包添加,如下所示:

parts:
  animationmaker:
    plugin: qmake
    qt-version: qt5
    source: https://github.com/Artanidos/AnimationMaker.git
    stage-packages: [libqt5gui5]
但是,Snapcraft支持远程部件,其中一个是出色的桌面Qt帮助器,它可以为您引入这种类型的东西,并设置一个公共环境等。它有很好的文档记录,但为了完整性,请尝试以下方法:

parts:
  animationmaker:
    plugin: qmake
    qt-version: qt5
    source: https://github.com/Artanidos/AnimationMaker.git
    after: [desktop-qt5]
并使您的应用程序使用
桌面启动
帮助程序:

apps:
  animationmaker:
    command: desktop-launch AnimationMaker

这些插件包含在
libqt5gui5
中,您可以将其作为后台软件包添加,如下所示:

parts:
  animationmaker:
    plugin: qmake
    qt-version: qt5
    source: https://github.com/Artanidos/AnimationMaker.git
    stage-packages: [libqt5gui5]
但是,Snapcraft支持远程部件,其中一个是出色的桌面Qt帮助器,它可以为您引入这种类型的东西,并设置一个公共环境等。它有很好的文档记录,但为了完整性,请尝试以下方法:

parts:
  animationmaker:
    plugin: qmake
    qt-version: qt5
    source: https://github.com/Artanidos/AnimationMaker.git
    after: [desktop-qt5]
并使您的应用程序使用
桌面启动
帮助程序:

apps:
  animationmaker:
    command: desktop-launch AnimationMaker

Thx,但第一个解决方案没有帮助,第二个解决方案给出以下错误消息:此应用程序无法启动,因为它无法在“”中找到或加载Qt平台插件“xcb”。可用的平台插件有:eglfs、linuxfb、minimal、minimagegl、offscreen、xcb。恐怕我甚至无法构建您的
snapcraft.yaml
(您缺少许多
构建包
),所以我无法帮您调试那么多。您还记得使用
桌面启动
包装吗?是的,我使用了启动程序。缺少什么构建软件包?几个libav软件包,但即使有一次我拥有了所有它没有构建的软件包。是的,我正在使用ffmpeg,但我不知道如何将它们放入snapcraft.yaml中,如果它是正确的位置。Thx,但第一个解决方案没有帮助,第二个解决方案给出以下错误消息:此应用程序无法启动,因为它无法在“”中找到或加载Qt平台插件“xcb”。可用的平台插件有:eglfs、linuxfb、minimal、minimagegl、offscreen、xcb。恐怕我甚至无法构建您的
snapcraft.yaml
(您缺少许多
构建包
),所以我无法帮您调试那么多。您还记得使用
桌面启动
包装吗?是的,我使用了启动程序。缺少什么构建软件包?几个libav软件包,但即使有一次我拥有了所有它没有构建的软件包。是的,我正在使用ffmpeg,但我不知道如何将它们放入snapcraft.yaml,如果它是正确的位置。