## To use this file, Change this file type from "txt" to "yaml" name: desktop-rexroth-qt6 # you probably want to 'snapcraft register ' version: "0.1" # just for humans, typically '1.2+git' or '1.3.2' summary: Testing GUI on X7 using DisplayPort # 79 char long summary description: | This test would be exciting confinement: strict compression: lzo grade: stable base: core20 package-repositories: - type: apt ppa: daschuer/qt6-backports apps: desktop-rexroth-qt6: command-chain: &_command-chain - bin/wayland-launch command: &_command usr/local/bin/desktop_rexroth plugs: &_plugs - opengl - wayland environment: QT_QPA_PLATFORM: wayland QT_PLUGIN_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/qt6/plugins/ QT_QPA_PLATFORM_PLUGIN_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/qt6/plugins/platforms/ QML2_IMPORT_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/qt6/qml QML_IMPORT_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/qt6/qml FONTCONFIG_PATH: ${SNAP}/etc/fonts/ FONTCONFIG_FILE: ${SNAP}/etc/fonts/fonts.conf daemon: daemon: simple restart-delay: 3s restart-condition: always command-chain: *_command-chain command: *_command plugs: *_plugs plugs: graphics-core20: interface: content target: $SNAP/graphics default-provider: mesa-core20 environment: # This is one of four snippets that relate to providing the userspace graphics needed by your application. LD_LIBRARY_PATH: $SNAP/graphics/lib LIBGL_DRIVERS_PATH: $SNAP/graphics/dri LIBVA_DRIVERS_PATH: $SNAP/graphics/dri __EGL_VENDOR_LIBRARY_DIRS: $SNAP/graphics/glvnd/egl_vendor.d # Other, generally useful environment settings... # XDG config XDG_CACHE_HOME: $SNAP_USER_COMMON/.cache XDG_CONFIG_HOME: $SNAP_USER_DATA/.config XDG_CONFIG_DIRS: $SNAP/etc/xdg # XKB config XKB_CONFIG_ROOT: $SNAP/usr/share/X11/xkb layout: # This is one of four snippets that relate to providing the userspace graphics needed by your application. # These paths (/usr/share/libdrm and /usr/share/drirc.d) are hardcoded in mesa. /usr/share/libdrm: # Needed by mesa-core20 on AMD GPUs bind: $SNAP/graphics/libdrm /usr/share/drirc.d: # Used by mesa-core20 for app specific workarounds bind: $SNAP/graphics/drirc.d # Other, generally useful paths /usr/share/fonts: bind: $SNAP/usr/share/fonts /usr/share/icons: bind: $SNAP/usr/share/icons /usr/share/sounds: bind: $SNAP/usr/share/sounds /etc/fonts: bind: $SNAP/etc/fonts parts: qtwayland: source: https://download.qt.io/official_releases/qt/6.2/6.2.3/submodules/qtwayland-everywhere-src-6.2.3.tar.xz plugin: cmake build-packages: - libvulkan-dev - libwayland-dev - libxkbcommon-dev - qt6-base-dev - qt6-base-private-dev - qt6-declarative-private-dev stage-packages: - libwayland-cursor0 - libwayland-egl1 app: plugin: cmake source: /root/project/desktop_rexroth source-type: local build-packages: - git - libglu1-mesa-dev - libqt6opengl6-dev - qt6-declarative-dev stage-packages: #- qt6-base-dev # added for QtWidgets - libqt6svg6-dev # added for QtWidgets #- qt6-base-private-dev # added for QtWidgets - qml6-module-qt-labs-settings - qml6-module-qtqml-workerscript - qml6-module-qtquick - qml6-module-qtquick-controls - qml6-module-qtquick-layouts - qml6-module-qtquick-templates - qml6-module-qtquick-window wayland-launch: plugin: dump source: wayland-launch override-build: | # The plugs needed to run Wayland. (wayland-launch checks them, setup.sh connects them) # You may add further plugs here if you want these options PLUGS="opengl wayland graphics-core20" sed --in-place "s/%PLUGS%/$PLUGS/g" $SNAPCRAFT_PART_BUILD/bin/wayland-launch sed --in-place "s/%PLUGS%/$PLUGS/g" $SNAPCRAFT_PART_BUILD/bin/setup.sh snapcraftctl build stage-packages: - inotify-tools resources: plugin: dump source: resources organize: 'fonts/*' : 'usr/share/fonts/' # This is one of four snippets that relate to providing the userspace graphics needed by your application. # This ensures that your snap doesn't contain its own copy of the userspace drivers cleanup: after: - app - wayland-launch plugin: nil build-snaps: [ mesa-core20 ] override-prime: | set -eux cd /snap/mesa-core20/current/egl/lib find . -type f,l -exec rm -f $SNAPCRAFT_PRIME/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/{} \; rm -fr "$SNAPCRAFT_PRIME/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri" for CRUFT in bug drirc.d glvnd libdrm lintian man; do rm -rf "$SNAPCRAFT_PRIME/usr/share/$CRUFT" done for CRUFT in apport doc doc-base fonts pkgconfig xml ; do rm -rf "$SNAPCRAFT_PRIME/usr/share/$CRUFT" done architectures: - build-on: amd64