The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
fix(windows): the window and the .exe carry Concat's icon
Jareere7561f877cc0
diff --git a/src/Cargo.lock b/src/Cargo.lockindex eed50159..3ab870bd 100644--- a/src/Cargo.lock+++ b/src/Cargo.lock@@ -1154,6 +1154,7 @@ dependencies = ["slint-build","toml","wgpu",+ "winresource",][[package]]@@ -1946,7 +1947,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"dependencies = ["libc",- "windows-sys 0.52.0",+ "windows-sys 0.61.2",][[package]]@@ -4795,7 +4796,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967"dependencies = ["libc",- "windows-sys 0.45.0",+ "windows-sys 0.61.2",][[package]]@@ -5637,7 +5638,7 @@ dependencies = ["errno","libc","linux-raw-sys 0.12.1",- "windows-sys 0.52.0",+ "windows-sys 0.61.2",][[package]]@@ -6375,7 +6376,7 @@ dependencies = ["getrandom 0.4.3","once_cell","rustix 1.1.4",- "windows-sys 0.52.0",+ "windows-sys 0.61.2",][[package]]@@ -7625,7 +7626,7 @@ version = "0.1.11"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"dependencies = [- "windows-sys 0.52.0",+ "windows-sys 0.61.2",][[package]]@@ -8057,6 +8058,16 @@ dependencies = ["memchr",]+[[package]]+name = "winresource"+version = "0.1.31"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0986a8b1d586b7d3e4fe3d9ea39fb451ae22869dcea4aa109d287a374d866087"+dependencies = [+ "toml",+ "version_check",+]+[[package]]name = "wit-bindgen"version = "0.57.1"diff --git a/src/crates/concat/Cargo.toml b/src/crates/concat/Cargo.tomlindex d4af2186..bbba86f6 100644--- a/src/crates/concat/Cargo.toml+++ b/src/crates/concat/Cargo.toml@@ -129,6 +129,9 @@ image = { version = "0.25", default-features = false, features = ["jpeg"] }[build-dependencies]slint-build = "1.18"+# The .exe's icon, for Explorer and the Start menu, as a Windows resource.+# Used only when the target is Windows; see build.rs.+winresource = "0.1"[lints]workspace = truediff --git a/src/crates/concat/build.rs b/src/crates/concat/build.rsindex 4ce1e523..ba1ebfbd 100644--- a/src/crates/concat/build.rs+++ b/src/crates/concat/build.rs@@ -37,6 +37,19 @@ fn main() {.expect("the Slint compiler thread panicked").expect("failed to compile ui/app.slint");+ // The .exe's icon. The window's own is set in app.slint, but Explorer,+ // the Start menu and a pinned taskbar button read the file's resources,+ // and without one they show Windows' generic program icon. Needs the+ // Windows SDK's rc.exe, which an MSVC toolchain has.+ if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {+ let icon = "../../../assets/icons/concat.ico";+ println!("cargo:rerun-if-changed={icon}");+ winresource::WindowsResource::new()+ .set_icon(icon)+ .compile()+ .expect("could not embed the Windows icon");+ }+// Three facts about the build that the built thing cannot ask for at run// time. Settings > About shows them in the block a bug report is copied// out of: which triple this binary is for, which profile it came out of,diff --git a/src/crates/concat/ui/app.slint b/src/crates/concat/ui/app.slintindex baad13b3..90f75d38 100644--- a/src/crates/concat/ui/app.slint+++ b/src/crates/concat/ui/app.slint@@ -65,6 +65,10 @@ export {export component App inherits Window {title: "Concat";+ // The taskbar's and Alt-Tab's picture on Windows, and the window+ // list's on X11. A Mac takes its Dock icon from the bundle and ignores+ // this; the .exe's own, for Explorer, is embedded by build.rs.+ icon: @image-url("../../../../assets/icons/concat_logo_256.png");// Where the strip carries its own window buttons the platform's// decorations are not wanted, and this is the property Slint keeps// them off with: the winit backend re-applies `no-frame` to the