From 224311c6959925b025f01640dc2f26f989d59597 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Wed, 30 Sep 2020 18:02:28 +0100 Subject: [PATCH 01/14] adding workflow to build snap --- .github/workflows/all.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 3c584640aa..4a6e46ba92 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -805,6 +805,19 @@ jobs: with: name: release_focal_64 path: bin/clementine_*.deb + + build_snap: + name: Build Snap + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: snapcore/action-build@v1 + id: snapcraft + - uses: snapcore/action-publish@v1 + with: + store_login: ${{ secrets.SNAP_STORE_LOGIN }} + snap: ${{ steps.snapcraft.outputs.snap }} + release: edge build_mac: name: Build Mac DMG From dc01932898e1ede48d3d73e0054a9f367c071fbb Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Wed, 30 Sep 2020 18:02:28 +0100 Subject: [PATCH 02/14] adding workflow to build snap --- .github/workflows/all.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 43e39b74b6..3f59ccac15 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -740,6 +740,19 @@ jobs: with: name: release_focal_64 path: bin/clementine_*.deb + + build_snap: + name: Build Snap + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: snapcore/action-build@v1 + id: snapcraft + - uses: snapcore/action-publish@v1 + with: + store_login: ${{ secrets.SNAP_STORE_LOGIN }} + snap: ${{ steps.snapcraft.outputs.snap }} + release: edge build_mac: name: Build Mac DMG From dd9bb9e56e0cf2365a2b611f2a5e857b2c218b16 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Wed, 30 Sep 2020 19:48:18 +0100 Subject: [PATCH 03/14] uploading snap artifact and adding to release --- .github/workflows/all.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 3f59ccac15..35929abfcf 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -101,6 +101,7 @@ jobs: - build_mingw - build_source - build_stretch_64 + - build_snap steps: - uses: actions/checkout@v1.2.0 - uses: actions/download-artifact@v2 @@ -753,6 +754,10 @@ jobs: store_login: ${{ secrets.SNAP_STORE_LOGIN }} snap: ${{ steps.snapcraft.outputs.snap }} release: edge + - uses: actions/upload-artifact@v2 + with: + name: release_snap_64 + path: ${{ steps.snapcraft.outputs.snap }} build_mac: name: Build Mac DMG From 2f77ce63793538a7ef3df856d1f32c3e3c97c0b0 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Wed, 30 Sep 2020 19:51:35 +0100 Subject: [PATCH 04/14] specifying 64 bit build in job name --- .github/workflows/all.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 35929abfcf..ff4e73c65c 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -101,7 +101,7 @@ jobs: - build_mingw - build_source - build_stretch_64 - - build_snap + - build_snap_64 steps: - uses: actions/checkout@v1.2.0 - uses: actions/download-artifact@v2 @@ -742,7 +742,7 @@ jobs: name: release_focal_64 path: bin/clementine_*.deb - build_snap: + build_snap_64: name: Build Snap runs-on: ubuntu-18.04 steps: From 11470e1f05d242fe8f12d1d68befcedffc037f98 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Wed, 30 Sep 2020 20:06:05 +0100 Subject: [PATCH 05/14] removing checkout in build_snap --- .github/workflows/all.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index ff4e73c65c..78ada9b31c 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -99,9 +99,9 @@ jobs: - build_focal_64 - build_mac - build_mingw + - build_snap - build_source - build_stretch_64 - - build_snap_64 steps: - uses: actions/checkout@v1.2.0 - uses: actions/download-artifact@v2 @@ -742,11 +742,10 @@ jobs: name: release_focal_64 path: bin/clementine_*.deb - build_snap_64: + build_snap: name: Build Snap runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 - uses: snapcore/action-build@v1 id: snapcraft - uses: snapcore/action-publish@v1 @@ -756,7 +755,7 @@ jobs: release: edge - uses: actions/upload-artifact@v2 with: - name: release_snap_64 + name: release_snap path: ${{ steps.snapcraft.outputs.snap }} build_mac: From d1edd16d944e99000d09df478a476dfabec4d369 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Wed, 30 Sep 2020 20:14:19 +0100 Subject: [PATCH 06/14] adding checkout v1.2.0 --- .github/workflows/all.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 78ada9b31c..f3819546f7 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -746,6 +746,7 @@ jobs: name: Build Snap runs-on: ubuntu-18.04 steps: + - uses: actions/checkout@v1.2.0 - uses: snapcore/action-build@v1 id: snapcraft - uses: snapcore/action-publish@v1 From 54da09fd795c39d311dca2099e323b6c1e245a85 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Thu, 1 Oct 2020 17:50:16 +0100 Subject: [PATCH 07/14] adding check for master branch to publish --- .github/workflows/all.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index f3819546f7..b3c0167c37 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -750,6 +750,7 @@ jobs: - uses: snapcore/action-build@v1 id: snapcraft - uses: snapcore/action-publish@v1 + if: github.ref == 'refs/heads/master with: store_login: ${{ secrets.SNAP_STORE_LOGIN }} snap: ${{ steps.snapcraft.outputs.snap }} From 071fa1ab5fa3e7d79e4629e2bc9cd12259bddfa1 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Thu, 1 Oct 2020 17:53:29 +0100 Subject: [PATCH 08/14] added closing quote --- .github/workflows/all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index b3c0167c37..c61bff70f1 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -750,7 +750,7 @@ jobs: - uses: snapcore/action-build@v1 id: snapcraft - uses: snapcore/action-publish@v1 - if: github.ref == 'refs/heads/master + if: github.ref == 'refs/heads/master' with: store_login: ${{ secrets.SNAP_STORE_LOGIN }} snap: ${{ steps.snapcraft.outputs.snap }} From fece58f3e03e8981eabc578e7b8a575e9a1ba0d0 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Tue, 6 Oct 2020 17:34:06 +0100 Subject: [PATCH 09/14] updating snapcraft.yaml --- snap/snapcraft.yaml | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6238d33bd2..1f9baa875b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,6 @@ name: clementine -version: '1.3.1.31+git' +#version: 'latest' +adopt-info: clementine summary: modern music player description: | Clementine is a modern music player and library organizer @@ -8,6 +9,11 @@ grade: stable confinement: strict base: core18 +architectures: + - build-on: amd64 + - build-on: i386 + - build-on: arm64 + parts: desktop-qt5: @@ -68,12 +74,18 @@ parts: after: - alsa-lib - desktop-qt5 + + override-pull: | + snapcraftctl pull + snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1-2)" + override-build: | cmake ../src -DCMAKE_INSTALL_PREFIX=/usr make -j $(getconf _NPROCESSORS_ONLN) make DESTDIR=$SNAPCRAFT_PART_INSTALL install sed -i 's|Icon=clementine|Icon=/usr/share/icons/hicolor/scalable/apps/clementine\.svg|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop sed -i 's|TryExec=.*|TryExec=/snap/bin/clementine|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop +# add-apt-repository ppa:rock-core/qt4 # may need this build-packages: - cmake @@ -110,6 +122,7 @@ parts: - libglew-dev - libcrypto++-dev - libsparsehash-dev +# - libqt5-sqlite stage-packages: - libstdc++6 @@ -166,14 +179,35 @@ parts: - gstreamer1.0-libav - dbus-x11 - projectm-data + - qtwayland5 # Attempt at Wayland Support + - libqtcore4 # Attempt to get Spotify to work + - glibc-source # Attempt to get Spotify to work + - plasma-integration + - kde-style-breeze + - qt5-gtk-platformtheme + +plugs: + gtk-3-themes: + interface: content + target: $SNAP/data-dir/themes + default-provider: gtk-common-themes + icon-themes: + interface: content + target: $SNAP/data-dir/icons + default-provider: gtk-common-themes + sound-themes: + interface: content + target: $SNAP/data-dir/sounds + default-provider: gtk-common-themes apps: clementine: - command: desktop-launch $SNAP/usr/bin/clementine + command: bin/desktop-launch $SNAP/usr/bin/clementine desktop: usr/share/applications/clementine.desktop environment: ALSA_CONFIG_PATH: /snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/alsa/alsa.conf LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio + DISABLE_WAYLAND: 1 plugs: - home - udisks2 @@ -196,8 +230,8 @@ apps: - mpris clementine-tagreader: - command: clementine-tagreader + command: usr/bin/clementine-tagreader plugs: - network - network-manager-observe - - network-bind + - network-bind \ No newline at end of file From 80396ba8af0b1c3b9ff5b0159c5db3e85d65e084 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Tue, 6 Oct 2020 19:57:53 +0100 Subject: [PATCH 10/14] removed commenented config --- snap/snapcraft.yaml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 1f9baa875b..12b601befd 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,4 @@ name: clementine -#version: 'latest' adopt-info: clementine summary: modern music player description: | @@ -15,7 +14,6 @@ architectures: - build-on: arm64 parts: - desktop-qt5: build-packages: - build-essential @@ -43,7 +41,6 @@ parts: - oxygen-icon-theme - breeze-icon-theme - try: [appmenu-qt5] - alsa-lib: plugin: autotools source: https://www.alsa-project.org/files/pub/lib/alsa-lib-1.1.5.tar.bz2 @@ -66,27 +63,22 @@ parts: - -usr/share/alsa/alsa.conf - -usr/share/alsa/pcm - -usr/share/alsa/topology/broadwell - clementine: plugin: cmake source-type: git source: https://github.com/clementine-player/Clementine after: - alsa-lib - - desktop-qt5 - + - desktop-qt5 override-pull: | snapcraftctl pull snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1-2)" - override-build: | cmake ../src -DCMAKE_INSTALL_PREFIX=/usr make -j $(getconf _NPROCESSORS_ONLN) make DESTDIR=$SNAPCRAFT_PART_INSTALL install sed -i 's|Icon=clementine|Icon=/usr/share/icons/hicolor/scalable/apps/clementine\.svg|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop sed -i 's|TryExec=.*|TryExec=/snap/bin/clementine|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop -# add-apt-repository ppa:rock-core/qt4 # may need this - build-packages: - cmake - make @@ -122,8 +114,6 @@ parts: - libglew-dev - libcrypto++-dev - libsparsehash-dev -# - libqt5-sqlite - stage-packages: - libstdc++6 - libgcc1 @@ -179,7 +169,7 @@ parts: - gstreamer1.0-libav - dbus-x11 - projectm-data - - qtwayland5 # Attempt at Wayland Support + - qtwayland5 - libqtcore4 # Attempt to get Spotify to work - glibc-source # Attempt to get Spotify to work - plasma-integration From 88a9aac408972af7929d28650a41352a10558657 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Thu, 8 Oct 2020 01:20:14 +0100 Subject: [PATCH 11/14] fixing KDE file picker --- snap/snapcraft.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 12b601befd..5936195c0b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -198,6 +198,8 @@ apps: ALSA_CONFIG_PATH: /snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/alsa/alsa.conf LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio DISABLE_WAYLAND: 1 + KDE_FORK_SLAVES: 1 + PATH: "$PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libexec/kf5" plugs: - home - udisks2 @@ -218,7 +220,6 @@ apps: - unity7 slots: - mpris - clementine-tagreader: command: usr/bin/clementine-tagreader plugs: From d7b551d04551269d7ced58100be4cc8fb54e900e Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Sun, 11 Oct 2020 23:32:34 +0100 Subject: [PATCH 12/14] replacing with audio-playback as pulseaudio is deprecated --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5936195c0b..b0825a2ef8 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -211,7 +211,7 @@ apps: - x11 - wayland - alsa - - pulseaudio + - audio-playback - removable-media - optical-drive - raw-usb From 00e554f772dd65b549c8f0abf908011a0c6520f1 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Mon, 12 Oct 2020 01:20:03 +0100 Subject: [PATCH 13/14] no need to clone clementine repo, adding snap to gitignore --- .gitignore | 1 + snap/snapcraft.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d6813eb303..55342b0cc8 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ dist/windows/Python27.zip src/translations/translations.pot *.DS_Store .vscode +*.snap diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b0825a2ef8..c2b516e3fa 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -66,7 +66,7 @@ parts: clementine: plugin: cmake source-type: git - source: https://github.com/clementine-player/Clementine + source: . after: - alsa-lib - desktop-qt5 From 7cbdd3770bee4b64879dd3c43f0a4425f2d1d425 Mon Sep 17 00:00:00 2001 From: Nightmayr Date: Wed, 21 Oct 2020 13:12:17 +0100 Subject: [PATCH 14/14] setting correct snap version --- snap/snapcraft.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c2b516e3fa..e7f94f9623 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -69,16 +69,14 @@ parts: source: . after: - alsa-lib - - desktop-qt5 - override-pull: | - snapcraftctl pull - snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1-2)" + - desktop-qt5 override-build: | cmake ../src -DCMAKE_INSTALL_PREFIX=/usr make -j $(getconf _NPROCESSORS_ONLN) make DESTDIR=$SNAPCRAFT_PART_INSTALL install sed -i 's|Icon=clementine|Icon=/usr/share/icons/hicolor/scalable/apps/clementine\.svg|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop sed -i 's|TryExec=.*|TryExec=/snap/bin/clementine|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/clementine.desktop + snapcraftctl set-version "$(cat $SNAPCRAFT_PART_BUILD/src/version.h | grep CLEMENTINE_VERSION_DISPLAY | awk '{ print $3 }' | tr -d '"' | cut -d "-" -f1-2)" build-packages: - cmake - make