mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-24 02:51:17 -08:00
fix(flatpak): make the extra-data build launch under Flatpak (#1869)
<!-- Please read https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before submitting your pull request --> ### Description <!-- Please include a summary of the change. Please also include relevant motivation and context. List any dependencies that are required for this change. --> Fixes # #### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings ### AI disclosure: - [ ] Partially AI assisted (clarify which code was AI assisted and briefly explain what it does). - [ ] Fully AI generated (explain what all the generated code does in moderate detail). <!-- Write any explanation required here, but do not generate the explanation using AI!! You must prove you understand what the code in this PR does. -->
This commit is contained in:
3 files changed
+34
-22
No files matched your search
@@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- The ID matches tauri.conf.json's `identifier`. tauri-plugin-single-instance
|
||||
owns <identifier>.SingleInstance on D-Bus, and Flatpak only permits owning
|
||||
names under the app ID, so the two have to agree or the app cannot start. -->
|
||||
<component type="desktop-application">
|
||||
<id>moe.sable.client</id>
|
||||
|
||||
@@ -46,9 +43,7 @@
|
||||
|
||||
<launchable type="desktop-id">moe.sable.client.desktop</launchable>
|
||||
|
||||
<!-- Flathub requires at least one reachable screenshot. Commit real captures
|
||||
under docs/screenshots/ and update these URLs before submitting. -->
|
||||
<screenshots>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/SableClient/Sable/dev/docs/screenshots/timeline.png</image>
|
||||
<caption>A room timeline</caption>
|
||||
@@ -56,8 +51,8 @@
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release version="1.20.0" date="2026-07-17">
|
||||
<url type="details">https://github.com/SableClient/Sable/releases/tag/v1.20.0</url>
|
||||
<release version="1.21.0" date="2026-08-17">
|
||||
<url type="details">https://github.com/SableClient/Sable/releases/tag/v1.21.0</url>
|
||||
</release>
|
||||
</releases>
|
||||
</component>
|
||||
@@ -4,40 +4,52 @@ runtime: org.freedesktop.Platform
|
||||
runtime-version: '25.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
|
||||
# Supplies zypak, which makes Chromium's sandbox work inside Flatpak. Sable's
|
||||
# Linux build embeds CEF and ships no setuid chrome-sandbox.
|
||||
base: org.electronjs.Electron2.BaseApp
|
||||
base-version: '25.08'
|
||||
|
||||
command: sable
|
||||
|
||||
finish-args:
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
- --socket=x11
|
||||
- --share=ipc
|
||||
- --device=dri
|
||||
- --share=network
|
||||
# Voice and video calls.
|
||||
- --socket=pulseaudio
|
||||
# Camera. Flathub review may ask to narrow this once CEF can use the portal.
|
||||
- --device=all
|
||||
# Keyring, where the E2EE session store keeps its secret.
|
||||
- --talk-name=org.freedesktop.secrets
|
||||
- --talk-name=org.freedesktop.Notifications
|
||||
# Tauri's single-instance plugin owns this service.
|
||||
- --own-name=moe.sable.client.SingleInstance
|
||||
# Tray icon.
|
||||
- --talk-name=org.kde.StatusNotifierWatcher
|
||||
# Saving and attaching files.
|
||||
- --filesystem=xdg-download
|
||||
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
|
||||
|
||||
modules:
|
||||
- name: xdg-utils
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- autoreconf -fi
|
||||
- ./configure --prefix=${FLATPAK_DEST}
|
||||
- touch scripts/xdg-mime.txt
|
||||
- make -C scripts xdg-mime
|
||||
- install -Dm755 scripts/xdg-mime ${FLATPAK_DEST}/bin/xdg-mime
|
||||
sources:
|
||||
- type: git
|
||||
url: https://gitlab.freedesktop.org/xdg/xdg-utils.git
|
||||
tag: v1.2.1
|
||||
commit: 356c380ad6fecc9ce6bea1f6a77986ba67402c80
|
||||
|
||||
- name: desktop-file-utils
|
||||
buildsystem: meson
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.28.tar.xz
|
||||
sha256: 4401d4e231d842c2de8242395a74a395ca468cd96f5f610d822df33594898a70
|
||||
|
||||
- name: sable
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- install -Dm755 apply_extra ${FLATPAK_DEST}/bin/apply_extra
|
||||
- install -Dm755 sable.sh ${FLATPAK_DEST}/bin/sable
|
||||
- install -Dm644 LICENSE ${FLATPAK_DEST}/share/licenses/${FLATPAK_ID}/LICENSE
|
||||
- install -Dm644 moe.sable.client.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
|
||||
- install -Dm644 moe.sable.client.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
|
||||
- install -Dm644 32x32.png ${FLATPAK_DEST}/share/icons/hicolor/32x32/apps/${FLATPAK_ID}.png
|
||||
@@ -48,8 +60,8 @@ modules:
|
||||
- type: extra-data
|
||||
filename: sable.tar.gz
|
||||
url: https://github.com/SableClient/Sable/releases/download/v1.21.0/Sable-1.21.0-linux-x86_64.tar.gz
|
||||
sha256: '0000000000000000000000000000000000000000000000000000000000000000'
|
||||
size: 0
|
||||
sha256: 57caeeaa7b4c4002afd1bc6bbc47ba5807a3e326d77b55545f7e6ea2d7f69df0
|
||||
size: 159125471
|
||||
only-arches: [x86_64]
|
||||
x-checker-data:
|
||||
type: json
|
||||
@@ -64,9 +76,15 @@ modules:
|
||||
- set -eu
|
||||
- mkdir -p sable
|
||||
- tar --no-same-owner -xzf sable.tar.gz -C sable
|
||||
- mv sable/runtime/* sable/
|
||||
- rmdir sable/runtime
|
||||
- rm sable.tar.gz
|
||||
- type: file
|
||||
path: sable.sh
|
||||
- type: file
|
||||
url: https://raw.githubusercontent.com/SableClient/Sable/v1.21.0/LICENSE
|
||||
sha256: 4df3c306dddaaf4baffdff5ca820cc679ac8cd6dc263c6a74517783e42fa7a3b
|
||||
dest-filename: LICENSE
|
||||
- type: file
|
||||
path: moe.sable.client.desktop
|
||||
- type: file
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/bin/sh
|
||||
# zypak lets CEF's sandbox work under Flatpak without a setuid chrome-sandbox.
|
||||
export ZYPAK_CEF_LIBRARY_PATH=/app/extra/sable/libcef.so
|
||||
exec zypak-wrapper /app/extra/sable/sable "$@"
|
||||
Reference in new issue
Block a user