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,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");
}