SimPaM/patient-monitor-simulation/FLATPAK-ICON.md
GABRIEL Sebastian f0267f5493 v0.6.12 — Application icon and desktop metadata
Added the supplied CCCA SVG as a square, scalable application icon. GTK embeds
it for local Cargo launches, and Flatpak assets include a matching desktop
entry and AppStream metadata under `at.criticalcare.SimPaM`. Added a small
Flatpak asset installer and packaging instructions; the physiological
simulation and audio backend are unchanged.
2026-11-13 20:49:07 +01:00

2.6 KiB

SimPaM application icon / Flatpak integration

The original CCCA SVG has been placed on a square transparent canvas without changing or stretching its artwork. The icon is shipped as data/icons/hicolor/scalable/apps/at.criticalcare.SimPaM.svg.

The Rust build script embeds it as a GLib resource, allowing the GTK application to display the icon even when launched with cargo run. The Flatpak desktop icon must also be installed to /app/share/icons; GTK resources alone are not visible to the host's launcher.

Integrate the existing Flatpak manifest

In the existing manifest at.criticalcare.SimPaM.yml, keep its current app-id: at.criticalcare.SimPaM, command: patient-monitor-simulation, GNOME 51 SDK/runtime and PulseAudio permission. Add one command to the same module's build-commands list, after the executable's installation:

      - sh scripts/install-flatpak-assets.sh

This installs the desktop entry, AppStream metadata, and scalable icon. The manifest's local directory source must include data/ and scripts/; the existing type: dir with path: . ordinarily does.

Do not install or bundle pw-play or paplay. The native PulseAudio backend remains unchanged.

No new Rust dependencies were added. The icon embedding build script uses glib-compile-resources, which is provided by GLib development tools (Fedora: glib2-devel). In a GNOME SDK it is normally already available.

Rebuild and check

From the directory containing at.criticalcare.SimPaM.yml, with the Cargo lockfile updated to the current package version:

cargo check
flatpak-builder --force-clean --repo=flatpak-repo build-flatpak at.criticalcare.SimPaM.yml
flatpak build-bundle flatpak-repo "SimPaM-0.6.12-x86_64.flatpak" at.criticalcare.SimPaM --arch=x86_64 --runtime-repo=https://dl.flathub.org/repo/flathub.flatpakrepo

Since no Rust dependencies changed, you do not need to regenerate cargo-sources.json solely for the icon. If that file or the lockfile is out of sync from previous changes, regenerate them as usual.

Files

  • data/icons/hicolor/scalable/apps/at.criticalcare.SimPaM.svg — square scalable icon
  • data/at.criticalcare.SimPaM.desktop — launcher entry
  • data/at.criticalcare.SimPaM.metainfo.xml — AppStream application metadata
  • data/simpam.gresource.xml — resource path for GTK windows
  • build.rs — creates the embedded GLib resource
  • scripts/install-flatpak-assets.sh — installs launcher, metadata and icon in Flatpak

The source artwork was supplied by Critical Care Club Austria; its reuse and distribution rights are separate from the Rust source-code license.