Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic flatpak support #69

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
@@ -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 }}
36 changes: 36 additions & 0 deletions flatpak/audio.mod.mod_desktop.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>audio.mod.mod_desktop</id>

<name>MOD Desktop</name>
<summary>MOD Audio for the desktop</summary>
<url type="homepage">https://mod.audio</url>

<metadata_license>MIT</metadata_license>
<project_license>AGPL-3.0-or-later</project_license>

<supports>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</supports>

<description>
<p>The mod universe, now for Desktops free, as in beer too</p>
<p>Explore, Create &amp; Play, Sculpt your tone, community-enhanced.</p>
<p>Effortlessly create your dream rigs using a familiar pedalboard workflow, enriched by a vast library of community-driven plugins.</p>
</description>

<launchable type="desktop-id">mod-desktop.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://github.com/mod-audio/mod-desktop/raw/main/mod-desktop.png</image>
</screenshot>
<screenshot>
<image>https://github.com/mod-audio/mod-desktop/raw/main/docs/user-files-1.png</image>
</screenshot>
<screenshot>
<image>https://github.com/mod-audio/mod-desktop/raw/main/docs/user-files-2.png</image>
</screenshot>
</screenshots>
</component>
63 changes: 63 additions & 0 deletions flatpak/audio.mod.mod_desktop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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
rename-desktop-file: mod-desktop.desktop
rename-icon: mod-desktop
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
- 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:
- 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: 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:
- cd "/app/opt/mod-desktop"
- exec "$(pwd)/mod-desktop"
- type: file
path: audio.mod.mod_desktop.metainfo.xml
Loading