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.
This commit is contained in:
GABRIEL Sebastian 2026-11-13 20:49:07 +01:00
commit f0267f5493
13 changed files with 622 additions and 5 deletions

View file

@ -0,0 +1,457 @@
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "patient-monitor-simulation"
-version = "0.6.11"
+version = "0.6.12"
edition = "2021"
license = "MIT"
description = "Synthetic patient-monitor simulation for teaching (not for clinical use)"
--- /dev/null
+++ b/FLATPAK-ICON.md
@@ -0,0 +1,42 @@
+# 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:
+
+```yaml
+ - 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:
+
+```sh
+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.
--- a/README.de.md
+++ b/README.de.md
@@ -1,4 +1,4 @@
-# SimPaM — Patientenmonitor-Simulation v0.6.11
+# SimPaM — Patientenmonitor-Simulation v0.6.12
Der in Rust/GTK4 entwickelte **SimPaM** simuliert einen Patientenmonitor
für die Lehre unter Fedora Linux. Die Anwendung besitzt ein **Admin-Fenster**
@@ -687,6 +687,18 @@
`flatpak-cargo-generator` neu erzeugt werden. Das vorhandene Flatpak-Manifest
wird gesondert gepflegt und ist nicht Teil dieser Quellcodeänderung.
+### Programmsymbol und Desktop-Integration (v0.6.12)
+
+Das bereitgestellte CCCA-Logo dient als Programmsymbol von SimPaM. Es wird für
+die Monitor- und Admin-Fenster, den Linux-Anwendungsstarter und den Flatpak-Export
+verwendet. Das skalierbare SVG liegt auf einer quadratischen Zeichenfläche unter
+`data/icons/hicolor/scalable/apps/`. Über `build.rs` wird es auch bei direktem
+Start mit Cargo als GTK-Ressource bereitgestellt.
+
+Die einmalige Ergänzung des vorhandenen Flatpak-Manifests sowie die
+Paketierungsbefehle sind in [FLATPAK-ICON.md](FLATPAK-ICON.md) dokumentiert.
+Es sind keine neuen Rust-Crates oder Flatpak-Berechtigungen erforderlich.
+
## Changelog
### Änderungen seit v0.2.2
@@ -883,3 +895,11 @@
selektive zweiminütige Alarmpause bleiben erhalten. Der Testton ist auch bei
deaktivierten akustischen Alarmen verfügbar. In Flatpak werden die
PulseAudio-Socket-Berechtigung und `libpulse-simple` benötigt.
+
+### v0.6.12 – Programmsymbol und Desktop-Metadaten
+
+Das bereitgestellte CCCA-SVG wurde als quadratisches, skalierbares Programmsymbol
+integriert. GTK bindet es für den lokalen Cargo-Start ein. Für Flatpak wurden
+Desktop-Datei und AppStream-Metadaten unter `at.criticalcare.SimPaM` ergänzt.
+Ein Installationsskript und Paketierungshinweise wurden hinzugefügt; die
+Simulation und die Audioausgabe bleiben unverändert.
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# SimPaM — Patient Monitor Simulation v0.6.11
+# SimPaM — Patient Monitor Simulation v0.6.12
A Rust/GTK4 patient-monitor simulator with two main windows for teaching on Fedora Linux.
@@ -695,6 +695,17 @@
contains application sources; an existing Flatpak manifest is maintained
separately and was not modified by this update.
+### Application icon and desktop integration (v0.6.12)
+
+The CCCA logo is used as SimPaM's application icon. It appears on the monitor
+and Admin windows, the Linux desktop launcher, and Flatpak exports. The source
+image is stored as a square, scalable SVG in `data/icons/hicolor/scalable/apps/`.
+A GTK resource compiled by `build.rs` supplies the icon for direct Cargo runs.
+
+See [FLATPAK-ICON.md](FLATPAK-ICON.md) for the one-line addition needed in your
+existing Flatpak manifest and for packaging commands. No new Cargo crates or
+new Flatpak permissions are required.
+
## Changelog
### Changes since v0.2.2
@@ -887,3 +898,11 @@
controls, alarm priorities and selective alarm-pause logic are retained.
A manual test tone remains available with audible alarms switched off.
Flatpak requires the PulseAudio socket and `libpulse-simple` in its SDK/runtime.
+
+### 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.
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,20 @@
+//! Embed the desktop icon for `cargo run` as well as Flatpak builds.
+//! `glib-compile-resources` is provided by the GLib development tools.
+use std::{env, path::PathBuf, process::Command};
+
+fn main() {
+ println!("cargo:rerun-if-changed=data/simpam.gresource.xml");
+ println!("cargo:rerun-if-changed=data/icons/hicolor/scalable/apps/at.criticalcare.SimPaM.svg");
+
+ let source_root = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR")
+ .expect("Cargo must provide CARGO_MANIFEST_DIR"));
+ let target = PathBuf::from(env::var_os("OUT_DIR")
+ .expect("Cargo must provide OUT_DIR")).join("simpam.gresource");
+ let result = Command::new("glib-compile-resources")
+ .arg(source_root.join("data/simpam.gresource.xml"))
+ .arg(format!("--sourcedir={}", source_root.join("data").display()))
+ .arg(format!("--target={}", target.display()))
+ .status()
+ .expect("glib-compile-resources is required (install glib2-devel on Fedora)");
+ assert!(result.success(), "failed to compile SimPaM icon resources");
+}
--- /dev/null
+++ b/data/at.criticalcare.SimPaM.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Name=SimPaM
+GenericName=Patient Monitor Simulator
+GenericName[de]=Patientenmonitor-Simulator
+Comment=Simulated patient monitor for medical teaching
+Comment[de]=Patientenmonitor-Simulation für die medizinische Lehre
+Exec=patient-monitor-simulation
+Icon=at.criticalcare.SimPaM
+Terminal=false
+Categories=Education;Science;
+StartupNotify=true
--- /dev/null
+++ b/data/at.criticalcare.SimPaM.metainfo.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop-application">
+ <id>at.criticalcare.SimPaM</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>MIT</project_license>
+ <name>SimPaM</name>
+ <summary>Patient monitor simulation for teaching</summary>
+ <summary xml:lang="de">Patientenmonitor-Simulation für die Lehre</summary>
+ <description>
+ <p>SimPaM displays synthetic ECG, pulse oximetry, invasive arterial pressure, capnography and non-invasive blood pressure for educational simulations.</p>
+ <p>Instructors can change physiology, trigger clinical scenarios, and use interactive alarms and patient-monitor controls. SimPaM is not a medical device and must not be used for clinical decisions.</p>
+ </description>
+ <launchable type="desktop-id">at.criticalcare.SimPaM.desktop</launchable>
+ <categories>
+ <category>Education</category>
+ <category>Science</category>
+ </categories>
+ <releases>
+ <release version="0.6.12" date="2026-11-13" />
+ </releases>
+</component>
--- /dev/null
+++ b/data/icons/hicolor/scalable/apps/at.criticalcare.SimPaM.svg
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Creator: CorelDRAW -->
+
+<svg
+ xml:space="preserve"
+ width="226mm"
+ height="226mm"
+ viewBox="-27.51108 -14.28590 226 226"
+ version="1.1"
+ id="svg17"
+ style="clip-rule:evenodd;fill-rule:evenodd;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
+ id="metadata23"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs21">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <g
+ id="s"><g
+ id="c"><path
+ transform="rotate(18,3.1568758,-0.5)"
+ d="M 0,0 V 1 H 0.5 Z"
+ id="t" /><use
+ id="use1574"
+ transform="scale(-1,1)"
+ xlink:href="#t"
+ x="0"
+ y="0"
+ width="100%"
+ height="100%" /></g><g
+ id="a"><use
+ id="use1577"
+ transform="rotate(72)"
+ xlink:href="#c"
+ x="0"
+ y="0"
+ width="100%"
+ height="100%" /><use
+ id="use1579"
+ transform="rotate(144)"
+ xlink:href="#c"
+ x="0"
+ y="0"
+ width="100%"
+ height="100%" /></g><use
+ id="use1582"
+ transform="scale(-1,1)"
+ xlink:href="#a"
+ x="0"
+ y="0"
+ width="100%"
+ height="100%" /></g></defs>
+
+<polygon
+ points="543,2.230855 723,314 543,625.76914 183,625.76914 3,314 183,2.230855 "
+ fill="#ffffff"
+ stroke="#000000"
+ stroke-width="4"
+ id="polygon2"
+ transform="matrix(0,0.26458333,-0.26458333,0,168.56808,2.6703517)"
+ style="stroke:#268bd2;stroke-width:22.6772;stroke-dasharray:none;stroke-opacity:1" /><path
+ d="m 66.641837,26.695253 v 39.419031 l -34.1508,-19.72275 -19.060921,33.01245 34.150811,19.72275 -34.150811,19.696276 19.060921,33.01243 34.1508,-19.72275 v 39.44551 h 38.121823 v -39.41904 l 34.12435,19.69628 19.06091,-33.01243 -34.1508,-19.696276 34.1508,-19.72275 -19.06091,-33.01245 -34.12435,19.69628 V 26.695253 Z"
+ id="rect14795-2"
+ style="clip-rule:evenodd;opacity:1;fill:#268bd2;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.05833;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" /><rect
+ style="clip-rule:evenodd;fill:#ffea00;fill-opacity:1;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ x="9.3380384"
+ id="rect3-0"
+ height="50.694874"
+ width="152.08463"
+ y="74.575668" /><rect
+ style="clip-rule:evenodd;fill:#00c853;fill-opacity:1;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ x="9.3380384"
+ height="25.347437"
+ width="25.347437"
+ y="74.575706"
+ id="_150212920-9" /><rect
+ style="clip-rule:evenodd;fill:#00c853;fill-opacity:1;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ height="25.347437"
+ width="25.347437"
+ y="74.575706"
+ x="60.032913"
+ id="_150137568-3" /><rect
+ style="clip-rule:evenodd;fill:#00c853;fill-opacity:1;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ y="99.923134"
+ height="25.347437"
+ width="25.347437"
+ x="34.685478"
+ id="_150137496-0" /><rect
+ style="clip-rule:evenodd;fill:#dc322f;fill-opacity:1;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ y="99.923134"
+ height="25.347437"
+ width="25.347437"
+ x="85.380348"
+ id="_150140872-6" /><rect
+ style="clip-rule:evenodd;fill:#dc322f;fill-opacity:1;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ y="99.923134"
+ height="25.347437"
+ width="25.347437"
+ x="136.07521"
+ id="_150138960-2" /><rect
+ style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ height="25.347437"
+ width="25.347437"
+ y="99.923134"
+ x="110.72778"
+ id="_150808000-3-6" /><rect
+ style="clip-rule:evenodd;fill:#00c853;fill-opacity:1;fill-rule:evenodd;stroke-width:1.0139;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ height="25.347437"
+ width="25.347437"
+ y="74.575699"
+ x="110.72778"
+ id="_150137568-3-0" /><rect
+ style="clip-rule:evenodd;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ id="rect841-1"
+ width="152.08463"
+ height="50.69492"
+ x="9.3380384"
+ y="74.575668" /><g
+ style="clip-rule:evenodd;fill:#ffea00;fill-opacity:1;fill-rule:evenodd;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
+ transform="matrix(2.4227357,0,0,2.4227357,85.651385,49.626457)"
+ id="g1606-2"><use
+ height="100%"
+ width="100%"
+ x="0"
+ xlink:href="#s"
+ y="-6"
+ id="use1589-9"
+ style="fill:#ffea00;fill-opacity:1" /><use
+ height="100%"
+ width="100%"
+ x="0"
+ xlink:href="#s"
+ y="6"
+ id="use1591-3"
+ style="fill:#ffea00;fill-opacity:1" /><g
+ id="l-1"
+ style="fill:#ffea00;fill-opacity:1"><use
+ height="100%"
+ width="100%"
+ y="0"
+ xlink:href="#s"
+ x="-6"
+ id="use1593-9"
+ style="fill:#ffea00;fill-opacity:1" /><use
+ height="100%"
+ width="100%"
+ y="0"
+ x="0"
+ xlink:href="#s"
+ transform="rotate(-144,-2.3441661,-2.1106967)"
+ id="use1595-4"
+ style="fill:#ffea00;fill-opacity:1" /><use
+ height="100%"
+ width="100%"
+ y="0"
+ x="0"
+ xlink:href="#s"
+ transform="rotate(144,-2.1106967,-2.3441661)"
+ id="use1597-7"
+ style="fill:#ffea00;fill-opacity:1" /><use
+ height="100%"
+ width="100%"
+ y="0"
+ x="0"
+ xlink:href="#s"
+ transform="rotate(72,-4.6626491,-2.0759451)"
+ id="use1599-8"
+ style="fill:#ffea00;fill-opacity:1" /><use
+ height="100%"
+ width="100%"
+ y="0"
+ x="0"
+ xlink:href="#s"
+ transform="rotate(72,-5.0759451,0.53350333)"
+ id="use1601-4"
+ style="fill:#ffea00;fill-opacity:1" /></g><use
+ height="100%"
+ width="100%"
+ y="0"
+ x="0"
+ xlink:href="#l-1"
+ transform="scale(-1,1)"
+ id="use1604-5"
+ style="fill:#ffea00;fill-opacity:1" /></g><path
+ d="m 81.402105,42.57879 c -0.09163,-2.763298 2.4118,-5.340915 5.08721,-5.340915 1.914109,0 4.271072,1.456017 4.215677,3.883282 -0.669377,29.331745 -2.45153,88.837663 -3.12485,118.449243 -0.02036,0.89544 -1.148086,0.49858 -1.189006,-0.41996 C 85.082775,129.78206 82.387608,72.298164 81.402105,42.57879 Z"
+ id="path2161-7"
+ style="clip-rule:evenodd;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#268bd2;stroke-width:0.79375;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" /><path
+ d="m 82.689596,46.548556 c 2.122644,0 3.075766,1.290685 4.388906,2.426252 1.26846,1.096925 2.263135,2.100532 2.263135,3.179702 0,1.134136 -0.832522,0.794299 -1.714655,1.210837 -0.46468,0.219418 -0.423214,0.693579 -1.182201,0.693579 -1.82439,0 -2.550763,-1.716657 -5.042676,-1.716657 -2.05359,0 -4.720804,2.460755 -4.720804,6.973915 0,6.816258 2.628629,9.870771 5.740068,12.231173 l 0.321873,8.100465 c -3.326021,-1.39478 -11.9093,-8.95873 -11.9093,-19.47331 0,-9.150657 5.941085,-13.625956 11.855654,-13.625956 z"
+ id="path4102-9"
+ style="clip-rule:evenodd;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#268bd2;stroke-width:0.79375;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" /><path
+ d="m 83.49428,48.828489 c 1.517493,-0.240561 1.364854,0.671099 2.038528,1.260669 -1.557432,0.04629 -1.902501,-0.606959 -2.038528,-1.260669 z"
+ id="path5075-2"
+ style="clip-rule:evenodd;fill:#268bd2;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.847152px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" /><path
+ d="m 89.878095,74.927023 -0.214583,7.724949 c 0,4.72241 -12.499401,13.00772 -12.499401,21.458198 0,6.50787 5.230436,10.67546 7.161674,11.64107 l -0.241406,-6.81298 c 0,0 -2.360401,-1.59182 -2.360401,-4.29164 0,-3.82037 14.376989,-13.659598 14.376989,-21.189958 0,-5.33935 -3.647886,-7.33156 -6.222872,-8.529639 z"
+ id="path8971-0"
+ style="clip-rule:evenodd;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#268bd2;stroke-width:0.79375;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" /><path
+ d="m 88.885657,112.72027 c 0,0 4.908558,3.2452 4.908558,7.32261 0,3.48814 -2.674864,6.67906 -5.834757,9.97888 -3.691393,3.85485 -4.470918,8.68051 -2.292536,13.73242 l 0.187759,4.1307 c -1.582542,-1.28749 -4.077058,-5.30886 -4.077058,-12.01659 0,-8.07406 6.920271,-10.50309 6.920271,-17.9444 z"
+ id="path11880-2"
+ style="clip-rule:evenodd;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#268bd2;stroke-width:0.79375;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" /><path
+ d="m 87.920031,146.35599 c 0,0 2.27994,1.22663 2.27994,4.42575 0,3.01133 -3.770486,5.76116 -4.34529,6.16924 -0.55683,0.39531 -0.770246,-0.11951 -0.321873,-0.53646 0.462951,-0.43051 2.360402,-2.97332 2.360402,-5.90101 z"
+ id="path12851-3"
+ style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd;stroke:#268bd2;stroke-width:0.79375;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" /></svg>
--- /dev/null
+++ b/data/simpam.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/at/criticalcare/SimPaM/icons">
+ <file alias="scalable/apps/at.criticalcare.SimPaM.svg">icons/hicolor/scalable/apps/at.criticalcare.SimPaM.svg</file>
+ </gresource>
+</gresources>
--- /dev/null
+++ b/scripts/install-flatpak-assets.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Run from the Cargo project root during the Flatpak module's build commands.
+# Deliberately separate from the executable installation.
+set -eu
+prefix="${1:-/app}"
+id='at.criticalcare.SimPaM'
+install -Dm644 "data/${id}.desktop" "${prefix}/share/applications/${id}.desktop"
+install -Dm644 "data/${id}.metainfo.xml" "${prefix}/share/metainfo/${id}.metainfo.xml"
+install -Dm644 "data/icons/hicolor/scalable/apps/${id}.svg" "${prefix}/share/icons/hicolor/scalable/apps/${id}.svg"
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,4 +10,7 @@
use gtk::prelude::*;
fn main() -> gtk::glib::ExitCode {
+ // GTK finds the icon for Cargo launches without a system-wide install.
+ gtk::gio::resources_register_include!("simpam.gresource")
+ .expect("failed to register SimPaM icon resources");
let application = gtk::Application::builder()
@@ -15,4 +18,7 @@
.build();
- application.connect_activate(ui::create_windows);
+ application.connect_activate(|app| {
+ gtk::Window::set_default_icon_name("at.criticalcare.SimPaM");
+ ui::create_windows(app);
+ });
application.run()
}

View file

@ -506,7 +506,7 @@ dependencies = [
[[package]]
name = "patient-monitor-simulation"
version = "0.6.11"
version = "0.6.12"
dependencies = [
"gtk4",
"libpulse-binding",

View file

@ -1,6 +1,6 @@
[package]
name = "patient-monitor-simulation"
version = "0.6.11"
version = "0.6.12"
edition = "2021"
license = "MIT"
description = "Synthetic patient-monitor simulation for teaching (not for clinical use)"

View file

@ -0,0 +1,42 @@
# 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:
```yaml
- 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:
```sh
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.

View file

@ -1,4 +1,4 @@
# SimPaM — Patientenmonitor-Simulation v0.6.11
# SimPaM — Patientenmonitor-Simulation v0.6.12
Der in Rust/GTK4 entwickelte **SimPaM** simuliert einen Patientenmonitor
für die Lehre unter Fedora Linux. Die Anwendung besitzt ein **Admin-Fenster**
@ -687,6 +687,18 @@ Nach dem Aktualisieren von `Cargo.lock` muss `cargo-sources.json` mit
`flatpak-cargo-generator` neu erzeugt werden. Das vorhandene Flatpak-Manifest
wird gesondert gepflegt und ist nicht Teil dieser Quellcodeänderung.
### Programmsymbol und Desktop-Integration (v0.6.12)
Das bereitgestellte CCCA-Logo dient als Programmsymbol von SimPaM. Es wird für
die Monitor- und Admin-Fenster, den Linux-Anwendungsstarter und den Flatpak-Export
verwendet. Das skalierbare SVG liegt auf einer quadratischen Zeichenfläche unter
`data/icons/hicolor/scalable/apps/`. Über `build.rs` wird es auch bei direktem
Start mit Cargo als GTK-Ressource bereitgestellt.
Die einmalige Ergänzung des vorhandenen Flatpak-Manifests sowie die
Paketierungsbefehle sind in [FLATPAK-ICON.md](FLATPAK-ICON.md) dokumentiert.
Es sind keine neuen Rust-Crates oder Flatpak-Berechtigungen erforderlich.
## Changelog
### Änderungen seit v0.2.2
@ -883,3 +895,11 @@ sättigungsabhängige QRS-Töne, Stummschaltung, Alarmprioritäten und die
selektive zweiminütige Alarmpause bleiben erhalten. Der Testton ist auch bei
deaktivierten akustischen Alarmen verfügbar. In Flatpak werden die
PulseAudio-Socket-Berechtigung und `libpulse-simple` benötigt.
### v0.6.12 – Programmsymbol und Desktop-Metadaten
Das bereitgestellte CCCA-SVG wurde als quadratisches, skalierbares Programmsymbol
integriert. GTK bindet es für den lokalen Cargo-Start ein. Für Flatpak wurden
Desktop-Datei und AppStream-Metadaten unter `at.criticalcare.SimPaM` ergänzt.
Ein Installationsskript und Paketierungshinweise wurden hinzugefügt; die
Simulation und die Audioausgabe bleiben unverändert.

View file

@ -1,4 +1,4 @@
# SimPaM — Patient Monitor Simulation v0.6.11
# SimPaM — Patient Monitor Simulation v0.6.12
A Rust/GTK4 patient-monitor simulator with two main windows for teaching on Fedora Linux.
@ -695,6 +695,17 @@ using `flatpak-cargo-generator` before building offline. The project archive
contains application sources; an existing Flatpak manifest is maintained
separately and was not modified by this update.
### Application icon and desktop integration (v0.6.12)
The CCCA logo is used as SimPaM's application icon. It appears on the monitor
and Admin windows, the Linux desktop launcher, and Flatpak exports. The source
image is stored as a square, scalable SVG in `data/icons/hicolor/scalable/apps/`.
A GTK resource compiled by `build.rs` supplies the icon for direct Cargo runs.
See [FLATPAK-ICON.md](FLATPAK-ICON.md) for the one-line addition needed in your
existing Flatpak manifest and for packaging commands. No new Cargo crates or
new Flatpak permissions are required.
## Changelog
### Changes since v0.2.2
@ -887,3 +898,11 @@ The existing two-tone alarm sounds, SpO₂-dependent QRS tones, rhythms, mute
controls, alarm priorities and selective alarm-pause logic are retained.
A manual test tone remains available with audible alarms switched off.
Flatpak requires the PulseAudio socket and `libpulse-simple` in its SDK/runtime.
### 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.

View file

@ -40,6 +40,8 @@ modules:
target/release/patient-monitor-simulation
/app/bin/patient-monitor-simulation
- sh scripts/install-flatpak-assets.sh
- install -Dm644
at.criticalcare.SimPaM.desktop
/app/share/applications/at.criticalcare.SimPaM.desktop

View file

@ -0,0 +1,20 @@
//! Embed the desktop icon for `cargo run` as well as Flatpak builds.
//! `glib-compile-resources` is provided by the GLib development tools.
use std::{env, path::PathBuf, process::Command};
fn main() {
println!("cargo:rerun-if-changed=data/simpam.gresource.xml");
println!("cargo:rerun-if-changed=data/icons/hicolor/scalable/apps/at.criticalcare.SimPaM.svg");
let source_root = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR")
.expect("Cargo must provide CARGO_MANIFEST_DIR"));
let target = PathBuf::from(env::var_os("OUT_DIR")
.expect("Cargo must provide OUT_DIR")).join("simpam.gresource");
let result = Command::new("glib-compile-resources")
.arg(source_root.join("data/simpam.gresource.xml"))
.arg(format!("--sourcedir={}", source_root.join("data").display()))
.arg(format!("--target={}", target.display()))
.status()
.expect("glib-compile-resources is required (install glib2-devel on Fedora)");
assert!(result.success(), "failed to compile SimPaM icon resources");
}

View file

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=SimPaM
GenericName=Patient Monitor Simulator
GenericName[de]=Patientenmonitor-Simulator
Comment=Simulated patient monitor for medical teaching
Comment[de]=Patientenmonitor-Simulation für die medizinische Lehre
Exec=patient-monitor-simulation
Icon=at.criticalcare.SimPaM
Terminal=false
Categories=Education;Science;
StartupNotify=true

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>at.criticalcare.SimPaM</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<name>SimPaM</name>
<developer id="at.criticalcare">
<name>Critical Care Club Austria</name>
</developer>
<summary>Patient monitor simulation for teaching</summary>
<summary xml:lang="de">Patientenmonitor-Simulation für die Lehre</summary>
<description>
<p>SimPaM displays synthetic ECG, pulse oximetry, invasive arterial pressure, capnography and non-invasive blood pressure for educational simulations.</p>
<p>Instructors can change physiology, trigger clinical scenarios, and use interactive alarms and patient-monitor controls. SimPaM is not a medical device and must not be used for clinical decisions.</p>
</description>
<launchable type="desktop-id">at.criticalcare.SimPaM.desktop</launchable>
<categories>
<category>Education</category>
<category>Science</category>
</categories>
<releases>
<release version="0.6.12" date="2026-11-13" />
</releases>
</component>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/at/criticalcare/SimPaM/icons">
<file alias="scalable/apps/at.criticalcare.SimPaM.svg">icons/hicolor/scalable/apps/at.criticalcare.SimPaM.svg</file>
</gresource>
</gresources>

View file

@ -0,0 +1,9 @@
#!/bin/sh
# Run from the Cargo project root during the Flatpak module's build commands.
# Deliberately separate from the executable installation.
set -eu
prefix="${1:-/app}"
id='at.criticalcare.SimPaM'
install -Dm644 "data/${id}.desktop" "${prefix}/share/applications/${id}.desktop"
install -Dm644 "data/${id}.metainfo.xml" "${prefix}/share/metainfo/${id}.metainfo.xml"
install -Dm644 "data/icons/hicolor/scalable/apps/${id}.svg" "${prefix}/share/icons/hicolor/scalable/apps/${id}.svg"

View file

@ -10,9 +10,15 @@ mod ui;
use gtk::prelude::*;
fn main() -> gtk::glib::ExitCode {
// GTK finds the icon for Cargo launches without a system-wide install.
gtk::gio::resources_register_include!("simpam.gresource")
.expect("failed to register SimPaM icon resources");
let application = gtk::Application::builder()
.application_id("at.criticalcare.SimPaM")
.build();
application.connect_activate(ui::create_windows);
application.connect_activate(|app| {
gtk::Window::set_default_icon_name("at.criticalcare.SimPaM");
ui::create_windows(app);
});
application.run()
}