mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
fix(stage-tamagotchi): install desktop entry and appstream metainfo f… (#2245)
## Description
I understand that flatpak workflow already left my hand last year, and
this is not suitable for my ability and role at AIRI. However, I'd like
to ask if I have permissions to post my opinion to solve this:
- It may be better to manage sandbox permissions with smaller
boundaries.
- It is considerable to copy a desktop shortcut, and the metainfo to
properly trigger an app.
```
diff --git a/apps/stage-tamagotchi/ai.moeru.airi.flatpak.yml b/apps/stage-tamagotchi/ai.moeru.airi.flatpak.yml
index c8f9c33fd..311af5d74 100644
--- a/apps/stage-tamagotchi/ai.moeru.airi.flatpak.yml
+++ b/apps/stage-tamagotchi/ai.moeru.airi.flatpak.yml
@@ -22,7 +22,10 @@ finish-args:
- --talk-name=org.freedesktop.portal.Desktop
- --system-talk-name=org.freedesktop.login1
- --system-talk-name=org.freedesktop.UPower
- - --filesystem=home:rw
+ # Filesystem permissions
+ - --filesystem=xdg-download:rw
+ - --filesystem=xdg-config/airi:create
+ - --filesystem=~/.config/airi:create
modules:
- name: AIRI-App
@@ -34,6 +37,9 @@ modules:
- install airi.sh /app/bin/airi.sh
- chmod +x /app/bin/airi/airi.sh
- chmod +x /app/bin/airi/airi
+ - install -Dm644 ai.moeru.airi.desktop /app/share/applications/ai.moeru.airi.desktop
+ - install -Dm644 ai.moeru.airi.metainfo.xml /app/share/metainfo/ai.moeru.airi.metainfo.xml
+ - install -Dm644 build/icons/icon.png /app/share/icons/hicolor/512x512/apps/ai.moeru.airi.png
sources:
- type: dir
only-arches: [x86_64]
```
This block is an overview of this patch.
This bug was reported at Discord AIRI chatroom by Scarface.
```
OS: Bazzite DX 44.20260714.0
DE: KDE Plasma 6.7.2
Wayland
Hey. I wanted to give this a try but I'm facing some issues with the flatpak.
Unfortunately, I can't get it to run and it doesn't seem to even print out any logs whatsoever.
I tried running it from the terminal and noticed the following:
1) The flatpak runs
2) Processes are created
3) There is no output in the terminal even when using the verbose flag
4) A blank taskbar icon appears that when clicked on creates a KDE toast pop up that says "No exec field in"
I went with the manual installation (git clone -> pnpm ...) and it works fine but if possible i'd like to keep using the Flatpak
Couldn't find anyone else with the same issue on Github or here. Any suggestions are appreciated.
```
## Linked Issues
Scarface mentioned that he `Couldn't find anyone else with the same
issue on Github or here. Any suggestions are appreciated.`
I could not find a same bug for this, too.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Liet Blue <127093491+lietblue@users.noreply.github.com>
Co-authored-by: Liet Blue <lietblue@posteo.net>
This commit is contained in:
co-authored by
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Liet Blue
Liet Blue
parent
0ef3a26f7d
commit
d4fe2bef59
@@ -22,25 +22,46 @@ finish-args:
|
|||||||
- --talk-name=org.freedesktop.portal.Desktop
|
- --talk-name=org.freedesktop.portal.Desktop
|
||||||
- --system-talk-name=org.freedesktop.login1
|
- --system-talk-name=org.freedesktop.login1
|
||||||
- --system-talk-name=org.freedesktop.UPower
|
- --system-talk-name=org.freedesktop.UPower
|
||||||
- --filesystem=home:rw
|
# Filesystem permissions
|
||||||
|
- --filesystem=xdg-download:rw
|
||||||
|
- --filesystem=xdg-config/airi:create
|
||||||
|
# Electron uses ~/.config/airi when XDG_CONFIG_HOME is not set.
|
||||||
|
- --filesystem=~/.config/airi:create
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
- name: AIRI-App
|
- name: AIRI-App
|
||||||
buildsystem: simple
|
buildsystem: simple
|
||||||
build-commands:
|
build-commands:
|
||||||
- mkdir -p /app/bin
|
- mkdir -p /app/bin
|
||||||
- mkdir -p /app/bin/airi
|
- mkdir -p /app/lib/airi
|
||||||
- cp -r ./* /app/bin/airi/
|
- cp -r payload/. /app/lib/airi/
|
||||||
- install airi.sh /app/bin/airi.sh
|
- install airi.sh /app/bin/airi.sh
|
||||||
- chmod +x /app/bin/airi/airi.sh
|
- chmod +x /app/lib/airi/airi
|
||||||
- chmod +x /app/bin/airi/airi
|
# Desktop-file launches run Exec=airi directly inside the sandbox; the manifest
|
||||||
|
# `command` does not apply to them, so /app/bin/airi must be a real entry point
|
||||||
|
# that resolves to the zypak wrapper script.
|
||||||
|
- ln -s /app/bin/airi.sh /app/bin/airi
|
||||||
|
- install -Dm644 ai.moeru.airi.desktop /app/share/applications/ai.moeru.airi.desktop
|
||||||
|
- install -Dm644 ai.moeru.airi.metainfo.xml /app/share/metainfo/ai.moeru.airi.metainfo.xml
|
||||||
|
# build-export rejects icons larger than the hicolor size directory they land in,
|
||||||
|
# so Flatpak installs the 512x512 derivative while Electron keeps the 1024x1024 source.
|
||||||
|
- install -Dm644 build/icon-512.png /app/share/icons/hicolor/512x512/apps/ai.moeru.airi.png
|
||||||
sources:
|
sources:
|
||||||
- type: dir
|
- type: dir
|
||||||
only-arches: [x86_64]
|
only-arches: [x86_64]
|
||||||
path: dist/linux-unpacked
|
path: dist/linux-unpacked
|
||||||
|
dest: payload
|
||||||
- type: dir
|
- type: dir
|
||||||
only-arches: [aarch64]
|
only-arches: [aarch64]
|
||||||
path: dist/linux-arm64-unpacked
|
path: dist/linux-arm64-unpacked
|
||||||
|
dest: payload
|
||||||
|
- type: file
|
||||||
|
path: ai.moeru.airi.desktop
|
||||||
|
- type: file
|
||||||
|
path: ai.moeru.airi.metainfo.xml
|
||||||
|
- type: file
|
||||||
|
path: build/icon-512.png
|
||||||
|
dest: build
|
||||||
# First discovered by [@gg582](https://github.com/gg582) in https://github.com/moeru-ai/airi/pull/647
|
# First discovered by [@gg582](https://github.com/gg582) in https://github.com/moeru-ai/airi/pull/647
|
||||||
#
|
#
|
||||||
# Without the correct zypak-wrapper, application launch will result in this error:
|
# Without the correct zypak-wrapper, application launch will result in this error:
|
||||||
@@ -73,4 +94,4 @@ modules:
|
|||||||
commands:
|
commands:
|
||||||
- ulimit -c 0
|
- ulimit -c 0
|
||||||
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
|
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
|
||||||
- exec zypak-wrapper /app/bin/airi/airi "$@"
|
- exec zypak-wrapper /app/lib/airi/airi "$@"
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop-application">
|
||||||
|
<id>ai.moeru.airi</id>
|
||||||
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
<project_license>MIT</project_license>
|
||||||
|
<name>AIRI</name>
|
||||||
|
<summary>AI VTuber/Waifu chatbot inspired by Neuro-sama</summary>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
AIRI is an AI VTuber/Waifu chatbot supporting Live2D/VRM avatars, featuring human-like interactions and modular stage-based rendering.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<launchable type="desktop-id">ai.moeru.airi.desktop</launchable>
|
||||||
|
<url type="homepage">https://airi.moeru.ai/docs/</url>
|
||||||
|
<url type="bugtracker">https://github.com/moeru-ai/airi/issues</url>
|
||||||
|
<developer_name>Moeru AI Community</developer_name>
|
||||||
|
<content_rating type="oars-1.1" />
|
||||||
|
</component>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -23,6 +23,7 @@
|
|||||||
"build": "electron-vite build",
|
"build": "electron-vite build",
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"build:unpack": "pnpm run build && electron-builder --dir",
|
"build:unpack": "pnpm run build && electron-builder --dir",
|
||||||
|
"build:flatpak": "pnpm run build:unpack && flatpak-builder --user --install-deps-from=flathub ./flatpak ai.moeru.airi.flatpak.yml --force-clean",
|
||||||
"build:win": "pnpm run build && electron-builder --win",
|
"build:win": "pnpm run build && electron-builder --win",
|
||||||
"build:mac": "pnpm run build && electron-builder --mac",
|
"build:mac": "pnpm run build && electron-builder --mac",
|
||||||
"build:linux": "pnpm run build && electron-builder --linux",
|
"build:linux": "pnpm run build && electron-builder --linux",
|
||||||
|
|||||||
Generated
+235
-1666
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user