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:
이윤진(Lee Yunjin)
2026-08-13 14:39:05 +00:00
committed by GitHub
co-authored by autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Liet Blue Liet Blue
parent 0ef3a26f7d
commit d4fe2bef59
5 changed files with 281 additions and 1672 deletions
@@ -22,25 +22,46 @@ 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
# Electron uses ~/.config/airi when XDG_CONFIG_HOME is not set.
- --filesystem=~/.config/airi:create
modules:
- name: AIRI-App
buildsystem: simple
build-commands:
- mkdir -p /app/bin
- mkdir -p /app/bin/airi
- cp -r ./* /app/bin/airi/
- mkdir -p /app/lib/airi
- cp -r payload/. /app/lib/airi/
- install airi.sh /app/bin/airi.sh
- chmod +x /app/bin/airi/airi.sh
- chmod +x /app/bin/airi/airi
- chmod +x /app/lib/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:
- type: dir
only-arches: [x86_64]
path: dist/linux-unpacked
dest: payload
- type: dir
only-arches: [aarch64]
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
#
# Without the correct zypak-wrapper, application launch will result in this error:
@@ -73,4 +94,4 @@ modules:
commands:
- ulimit -c 0
- 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

+1
View File
@@ -23,6 +23,7 @@
"build": "electron-vite build",
"postinstall": "electron-builder install-app-deps",
"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:mac": "pnpm run build && electron-builder --mac",
"build:linux": "pnpm run build && electron-builder --linux",
+235 -1666
View File
File diff suppressed because it is too large Load Diff