From 70083ff116e293ac894926761423bb8c65153aac Mon Sep 17 00:00:00 2001 From: Loukas Agorgianitis Date: Tue, 5 Nov 2024 10:51:38 +0200 Subject: [PATCH 1/5] Add basic flatpak manifest Adds working flatpak manifest based on github releases --- flatpak/audio.mod.mod-desktop.yaml | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 flatpak/audio.mod.mod-desktop.yaml diff --git a/flatpak/audio.mod.mod-desktop.yaml b/flatpak/audio.mod.mod-desktop.yaml new file mode 100644 index 0000000..f974f4d --- /dev/null +++ b/flatpak/audio.mod.mod-desktop.yaml @@ -0,0 +1,49 @@ +id: audio.mod.mod-desktop +runtime: org.kde.Platform +runtime-version: "5.15-23.08" +sdk: org.kde.Sdk + +command: mod-desktop +finish-args: + # X11 + XShm access + - --share=ipc + - --socket=fallback-x11 + # Wayland access + - --socket=wayland + # GPU acceleration + - --device=dri + # Audio + - --socket=pulseaudio + - --filesystem=xdg-run/pipewire-0 + - --env=JACKBRIDGE_FILENAME=/usr/lib/x86_64-linux-gnu/libjack.so.0 + # Network access + - --share=network + # DBus access + - --own-name=org.freedesktop.ReserveDevice1.* + # Audio card access + - --device=all + # Documents (data folder) access + - --filesystem=xdg-documents/MOD Desktop:create +modules: + - name: mod-desktop + buildsystem: simple + build-commands: + - mkdir -p ${FLATPAK_DEST}/opt + - mv mod-desktop ${FLATPAK_DEST}/opt/. + - install -Dm755 mod-desktop.sh ${FLATPAK_DEST}/bin/mod-desktop + sources: + - type: archive + url: https://github.com/mod-audio/mod-desktop/releases/download/0.0.12/mod-desktop-0.0.12-linux-x86_64.tar.xz + sha256: d1faf2094641d5ef527ee9b6012f13f1255e3c2783773939b1c2449848c7c50c + only-arches: + - x86_64 + x-checker-data: + type: json + url: https://api.github.com/repos/ibancg/lingot/releases + version-query: '.[].tag_name | sub("^v"; "")' + url-query: '.[].assets.[] | select(.name=="mod-desktop-" + $version + "-linux-x86_64.tar.xz") | .browser_download_url' + - type: script + dest-filename: mod-desktop.sh + commands: + - cd "/app/opt/mod-desktop" + - exec "$(pwd)/mod-desktop" From 4b36e9b7e0845734b16a87f2c42524694d4fda0d Mon Sep 17 00:00:00 2001 From: Loukas Agorgianitis Date: Tue, 5 Nov 2024 11:25:27 +0200 Subject: [PATCH 2/5] Add basic flatpak github action --- .github/workflows/flatpak.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/flatpak.yml diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml new file mode 100644 index 0000000..96bdd8c --- /dev/null +++ b/.github/workflows/flatpak.yml @@ -0,0 +1,18 @@ +name: flatpak + +on: workflow_dispatch + +jobs: + flatpak: + name: "Flatpak" + runs-on: ubuntu-latest + container: + image: bilelmoussaoui/flatpak-github-actions:kde-5.15-23.08 + options: --privileged + steps: + - uses: actions/checkout@v4 + - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + with: + bundle: mod-desktop.flatpak + manifest-path: flatpak/audio.mod.mod-desktop.yaml + cache-key: flatpak-builder-${{ github.sha }} From 1abb9e821733c4cc6dc67de3747c9a4f93a7e35b Mon Sep 17 00:00:00 2001 From: Loukas Agorgianitis Date: Tue, 5 Nov 2024 13:31:36 +0200 Subject: [PATCH 3/5] Add icon and desktop file in flatpak manifest build --- flatpak/audio.mod.mod-desktop.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/flatpak/audio.mod.mod-desktop.yaml b/flatpak/audio.mod.mod-desktop.yaml index f974f4d..d091879 100644 --- a/flatpak/audio.mod.mod-desktop.yaml +++ b/flatpak/audio.mod.mod-desktop.yaml @@ -24,6 +24,8 @@ finish-args: - --device=all # Documents (data folder) access - --filesystem=xdg-documents/MOD Desktop:create +rename-desktop-file: mod-desktop.desktop +rename-icon: mod-desktop modules: - name: mod-desktop buildsystem: simple @@ -31,6 +33,10 @@ modules: - mkdir -p ${FLATPAK_DEST}/opt - mv mod-desktop ${FLATPAK_DEST}/opt/. - install -Dm755 mod-desktop.sh ${FLATPAK_DEST}/bin/mod-desktop + - install -Dm644 mod-desktop-git/res/mod-logo.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/mod-desktop.svg + - install -Dm644 mod-desktop-git/utils/linux/mod-desktop.desktop ${FLATPAK_DEST}/share/applications/mod-desktop.desktop + - desktop-file-edit --set-key Exec --set-value "mod-desktop" ${FLATPAK_DEST}/share/applications/mod-desktop.desktop + - desktop-file-edit --set-key Icon --set-value "mod-desktop" ${FLATPAK_DEST}/share/applications/mod-desktop.desktop sources: - type: archive url: https://github.com/mod-audio/mod-desktop/releases/download/0.0.12/mod-desktop-0.0.12-linux-x86_64.tar.xz @@ -42,6 +48,11 @@ modules: url: https://api.github.com/repos/ibancg/lingot/releases version-query: '.[].tag_name | sub("^v"; "")' url-query: '.[].assets.[] | select(.name=="mod-desktop-" + $version + "-linux-x86_64.tar.xz") | .browser_download_url' + - type: git + url: https://github.com/mod-audio/mod-desktop.git + commit: 86bcaa3daa854440f707b15ad10a1aaaff4b54b1 + tag: 0.0.12 + dest: mod-desktop-git - type: script dest-filename: mod-desktop.sh commands: From e477d3fb44a47213b5cc04f80896a52d92892c56 Mon Sep 17 00:00:00 2001 From: Loukas Agorgianitis Date: Tue, 5 Nov 2024 13:48:27 +0200 Subject: [PATCH 4/5] Rename flatpak application id --- .github/workflows/flatpak.yml | 2 +- .../{audio.mod.mod-desktop.yaml => audio.mod.mod_desktop.yaml} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename flatpak/{audio.mod.mod-desktop.yaml => audio.mod.mod_desktop.yaml} (98%) diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 96bdd8c..c27a249 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -14,5 +14,5 @@ jobs: - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: bundle: mod-desktop.flatpak - manifest-path: flatpak/audio.mod.mod-desktop.yaml + manifest-path: flatpak/audio.mod.mod_desktop.yaml cache-key: flatpak-builder-${{ github.sha }} diff --git a/flatpak/audio.mod.mod-desktop.yaml b/flatpak/audio.mod.mod_desktop.yaml similarity index 98% rename from flatpak/audio.mod.mod-desktop.yaml rename to flatpak/audio.mod.mod_desktop.yaml index d091879..84aa196 100644 --- a/flatpak/audio.mod.mod-desktop.yaml +++ b/flatpak/audio.mod.mod_desktop.yaml @@ -1,4 +1,4 @@ -id: audio.mod.mod-desktop +id: audio.mod.mod_desktop runtime: org.kde.Platform runtime-version: "5.15-23.08" sdk: org.kde.Sdk From 42b61d00128225b8510fdb5aa822d6a847621772 Mon Sep 17 00:00:00 2001 From: Loukas Agorgianitis Date: Tue, 5 Nov 2024 14:01:42 +0200 Subject: [PATCH 5/5] Add flatpak metainfo file --- flatpak/audio.mod.mod_desktop.metainfo.xml | 36 ++++++++++++++++++++++ flatpak/audio.mod.mod_desktop.yaml | 3 ++ 2 files changed, 39 insertions(+) create mode 100644 flatpak/audio.mod.mod_desktop.metainfo.xml diff --git a/flatpak/audio.mod.mod_desktop.metainfo.xml b/flatpak/audio.mod.mod_desktop.metainfo.xml new file mode 100644 index 0000000..0af5694 --- /dev/null +++ b/flatpak/audio.mod.mod_desktop.metainfo.xml @@ -0,0 +1,36 @@ + + + audio.mod.mod_desktop + + MOD Desktop + MOD Audio for the desktop + https://mod.audio + + MIT + AGPL-3.0-or-later + + + pointing + keyboard + touch + + + +

The mod universe, now for Desktops free, as in beer too

+

Explore, Create & Play, Sculpt your tone, community-enhanced.

+

Effortlessly create your dream rigs using a familiar pedalboard workflow, enriched by a vast library of community-driven plugins.

+
+ + mod-desktop.desktop + + + https://github.com/mod-audio/mod-desktop/raw/main/mod-desktop.png + + + https://github.com/mod-audio/mod-desktop/raw/main/docs/user-files-1.png + + + https://github.com/mod-audio/mod-desktop/raw/main/docs/user-files-2.png + + +
diff --git a/flatpak/audio.mod.mod_desktop.yaml b/flatpak/audio.mod.mod_desktop.yaml index 84aa196..617a26a 100644 --- a/flatpak/audio.mod.mod_desktop.yaml +++ b/flatpak/audio.mod.mod_desktop.yaml @@ -35,6 +35,7 @@ modules: - install -Dm755 mod-desktop.sh ${FLATPAK_DEST}/bin/mod-desktop - install -Dm644 mod-desktop-git/res/mod-logo.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/mod-desktop.svg - install -Dm644 mod-desktop-git/utils/linux/mod-desktop.desktop ${FLATPAK_DEST}/share/applications/mod-desktop.desktop + - install -Dm644 ${FLATPAK_ID}.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml - desktop-file-edit --set-key Exec --set-value "mod-desktop" ${FLATPAK_DEST}/share/applications/mod-desktop.desktop - desktop-file-edit --set-key Icon --set-value "mod-desktop" ${FLATPAK_DEST}/share/applications/mod-desktop.desktop sources: @@ -58,3 +59,5 @@ modules: commands: - cd "/app/opt/mod-desktop" - exec "$(pwd)/mod-desktop" + - type: file + path: audio.mod.mod_desktop.metainfo.xml