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:
parent
a28451762c
commit
f0267f5493
13 changed files with 622 additions and 5 deletions
2
patient-monitor-simulation/Cargo.lock
generated
2
patient-monitor-simulation/Cargo.lock
generated
|
|
@ -506,7 +506,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "patient-monitor-simulation"
|
||||
version = "0.6.11"
|
||||
version = "0.6.12"
|
||||
dependencies = [
|
||||
"gtk4",
|
||||
"libpulse-binding",
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
|
|
|
|||
42
patient-monitor-simulation/FLATPAK-ICON.md
Normal file
42
patient-monitor-simulation/FLATPAK-ICON.md
Normal 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.
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
20
patient-monitor-simulation/build.rs
Normal file
20
patient-monitor-simulation/build.rs
Normal 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");
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -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>
|
||||
6
patient-monitor-simulation/data/simpam.gresource.xml
Normal file
6
patient-monitor-simulation/data/simpam.gresource.xml
Normal 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>
|
||||
|
|
@ -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"
|
||||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue