From 0f9d750069cfb1ac65030c0fd790c4970e169ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Forment?= Date: Fri, 6 Feb 2026 00:46:40 +0100 Subject: [PATCH] Feat: trying to improve bundling and compilation --- CHANGELOG.md | 1 + Cargo.toml | 5 ++++- cagire_pixel.png => assets/Cagire.png | Bin build.rs | 11 +++++++++++ src/bin/desktop.rs | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) rename cagire_pixel.png => assets/Cagire.png (100%) create mode 100644 build.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index a10e4f1..b43c593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## [0.0.8] - 2026-06-05 ### Added +- Proper desktop app icon and metadata across all platforms: moved icon to `assets/Cagire.png`, added Windows `.exe` icon and file properties embedding via `winres` build script, added PNG to cargo-bundle icon list for Linux `.deb` packaging. - Universal macOS `.pkg` installer in CI: combines Intel and Apple Silicon builds into fat binaries via `lipo`, then packages `Cagire.app` and CLI into a single `.pkg` installer. Releases now include `cagire-macos-universal`, `cagire-macos-universal-desktop.app.zip`, and `Cagire--universal.pkg`. - New themes: **Eden** (dark forest — black background with green-only palette, terminal aesthetic) and **Georges** (Commodore 64 palette on pure black background). - `bounce` word: ping-pong cycle through n items by step runs (e.g., `60 64 67 72 4 bounce` → 60 64 67 72 67 64 60 64...). diff --git a/Cargo.toml b/Cargo.toml index 1cde2ee..883e87a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,6 +80,9 @@ soft_ratatui = { version = "0.1.3", features = ["unicodefonts"], optional = true image = { version = "0.25", default-features = false, features = ["png"], optional = true } +[target.'cfg(windows)'.build-dependencies] +winres = "0.1" + [profile.release] opt-level = 3 lto = "fat" @@ -90,7 +93,7 @@ strip = true [package.metadata.bundle.bin.cagire-desktop] name = "Cagire" identifier = "com.sova.cagire" -icon = ["assets/Cagire.icns", "assets/Cagire.ico"] +icon = ["assets/Cagire.icns", "assets/Cagire.ico", "assets/Cagire.png"] copyright = "Copyright (c) 2025 Raphaël Forment" category = "Music" short_description = "Forth-based music sequencer" diff --git a/cagire_pixel.png b/assets/Cagire.png similarity index 100% rename from cagire_pixel.png rename to assets/Cagire.png diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..08c5870 --- /dev/null +++ b/build.rs @@ -0,0 +1,11 @@ +fn main() { + #[cfg(windows)] + { + let mut res = winres::WindowsResource::new(); + res.set_icon("assets/Cagire.ico") + .set("ProductName", "Cagire") + .set("FileDescription", "Forth-based music sequencer") + .set("LegalCopyright", "Copyright (c) 2025 Raphaël Forment"); + res.compile().expect("Failed to compile Windows resources"); + } +} diff --git a/src/bin/desktop.rs b/src/bin/desktop.rs index 8a38d44..8642ad0 100644 --- a/src/bin/desktop.rs +++ b/src/bin/desktop.rs @@ -458,7 +458,7 @@ impl eframe::App for CagireDesktop { } fn load_icon() -> egui::IconData { - const ICON_BYTES: &[u8] = include_bytes!("../../cagire_pixel.png"); + const ICON_BYTES: &[u8] = include_bytes!("../../assets/Cagire.png"); let img = image::load_from_memory(ICON_BYTES) .expect("Failed to load embedded icon")