-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat(packaging): flatpak #359
feat(packaging): flatpak #359
Conversation
Kaiteki's Linux embedding code was generated when Flutter didn't support Wayland yet. From a bit of research, it seems like that Flutter now has support for it. Check out the diff from flutter/flutter#66519 on how to remove the X11-restriction. |
Co-authored-by: Robert Ancell <robert.ancell@canonical.com>
Fixed, thanks! Screencast.from.2023-04-24.23-55-04.webm |
… feat/packaging/flatpak
I went ahead and updated all linux native files. I think this is pretty much ready, all that's left is:
The Flathub flatpak config will look something like this:app-id: moe.craftplacer.kaiteki
runtime: org.freedesktop.Platform
runtime-version: "22.08"
sdk: org.freedesktop.Sdk
command: moe.craftplacer.kaiteki
separate-locales: false
rename-icon: kaiteki
rename-desktop-file: kaiteki.desktop
rename-appdata-file: kaiteki.metainfo.xml
finish-args:
- --device=dri
- --share=ipc
- --share=network
- --socket=pulseaudio
- --socket=fallback-x11
- --socket=wayland
modules:
- name: kaiteki
buildsystem: simple
build-commands:
- mv kaiteki $FLATPAK_DEST/kaiteki/
- chmod +x $FLATPAK_DEST/kaiteki/kaiteki
- mkdir $FLATPAK_DEST/bin
- ln -s $FLATPAK_DEST/kaiteki/kaiteki $FLATPAK_DEST/bin/$FLATPAK_ID
- desktop-file-edit --set-icon=$FLATPAK_ID kaiteki.desktop
- desktop-file-edit --set-key=Exec --set-value="$FLATPAK_ID %U" kaiteki.desktop
- install -Dm644 kaiteki.desktop $FLATPAK_DEST/share/applications/kaiteki.desktop
- install -Dm644 kaiteki.metainfo.xml $FLATPAK_DEST/share/metainfo/kaiteki.metainfo.xml
- install -Dm644 kaiteki-color.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/kaiteki.svg
- install -Dm644 kaiteki-symbolic.svg $FLATPAK_DEST/share/icons/hicolor/symbolic/apps/kaiteki-symbolic.svg
sources:
- type: archive
url: https://github.com/Kaiteki-Fedi/Kaiteki/releases/download/weekly-2023-15/linux.zip
sha256: a8fd8cd9fa1a9fb1bb946bbc2c402c87965cc1d67a96d2a8a3b45b5621ffeda1
x-checker-data:
type: json
# These need to adapt to /releases/latest when stable releases are ready
url: https://api.github.com/repos/Kaiteki-Fedi/Kaiteki/releases
version-query: first | .tag_name
url-query: first | .assets[] | select(.name=="linux.zip") | .browser_download_url
is-main-source: true
- type: file
url: https://raw.githubusercontent.com/Kaiteki-Fedi/Kaiteki/5c8d0a868d3223b0cae8a280f381f739c2e12275/packaging/linux/kaiteki-color.svg
sha256: d7f42e77af6a727b05be806165db315b23c7fa84fb9c766fa14dd46c06658b9e
- type: file
url: https://raw.githubusercontent.com/Kaiteki-Fedi/Kaiteki/5c8d0a868d3223b0cae8a280f381f739c2e12275/packaging/linux/kaiteki-symbolic.svg
sha256: e2c42608881d846cea66e24fb5a91c675eaf3029b6e74aebb72b9042ad49daa5
- type: file
url: https://raw.githubusercontent.com/Kaiteki-Fedi/Kaiteki/5c8d0a868d3223b0cae8a280f381f739c2e12275/packaging/linux/kaiteki.metainfo.xml
sha256: 619db1437d6cc6d48017148002a7de6b3578d4eba6bdfa5e020c4096d7185dfd
- type: file
url: https://raw.githubusercontent.com/Kaiteki-Fedi/Kaiteki/5c8d0a868d3223b0cae8a280f381f739c2e12275/packaging/linux/kaiteki.desktop
sha256: 959325bcb59acd11f8ae7c629949e2c2a14b20d987bd4a5eef3eb4a93e552ff4
Depending on what we go with, some stuff will change. |
Codecov Report
@@ Coverage Diff @@
## master #359 +/- ##
=========================================
+ Coverage 0 9.20% +9.20%
=========================================
Files 0 376 +376
Lines 0 12938 +12938
=========================================
+ Hits 0 1191 +1191
- Misses 0 11747 +11747 |
… feat/packaging/flatpak
… feat/packaging/flatpak
Sorry for the inactivity! 🙇 |
fix: #283
I couldn't get it to work on non-x11/xwayland, might need more investigation (the permissions are commented out)To build it locally use:
flatpak-builder ./build ./packaging/linux/moe.craftplacer.kaiteki.yaml --force-clean --install --user --install-deps-from=flathub
(! it needs you to have built Kaiteki already)Flathub requires "stable" sources, perhaps adding the icons, .desktop, metainfo to linux.zip for easier maintainability?