feat: Windows release packaging

Embed the app icon and version info into the exe, generated from
musyx.png by tool/make_ico.ps1, and hide the console window in
release builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yuriy.pandClaude Opus 5.5 committed 2026-10-18 01:06:42 +06:00
1 parent c496275101
commit 4b1f0bb8a0
6 files changed
+94

No files matched your search

+3
View File
@@ -27,6 +27,9 @@ objc2-foundation = "0.3.2"
objc2-app-kit = "0.3.2"
block2 = "0.6.2"
[build-dependencies]
winresource = "0.1.34"
[dev-dependencies]
iced_test = "0.14"
tokio = { version = "1", features = ["macros", "rt"] }
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

+12
View File
@@ -0,0 +1,12 @@
fn main() {
// Embed the icon and version info into the Windows executable, so Explorer and the taskbar show them.
println!("cargo:rerun-if-changed=assets/icon/musyx.ico");
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
let mut res = winresource::WindowsResource::new();
res.set_icon("assets/icon/musyx.ico")
.set("ProductName", "Musyx")
.set("FileDescription", "Musyx")
.set("OriginalFilename", "Musyx.exe");
res.compile().expect("failed to embed Windows resources");
}
}
+3
View File
@@ -1,3 +1,6 @@
// No console window behind the app in Windows release builds.
#![cfg_attr(all(windows, not(debug_assertions)), windows_subsystem = "windows")]
mod app;
mod covers;
mod i18n;