app icon: unicorn (owner's ArtCraft drawing), Dock/taskbar/launcher wiring, palette docs
- assets/app-icon/: master and light SVGs, 1024 px PNG, .icns (Apple grid), .ico (16-256), hicolor 16-512 + scalable, LICENSE.txt, README with palette (#e0368f / #efe9dc / #0b0b0c), tile geometry and provenance; attribution sidecars + ATTRIBUTION.md rows. - packaging/icons.sh regenerates everything with resvg, iconutil and the new `cargo xtask ico`. - Runtime icon via ViewportBuilder::with_icon (padded variant on macOS) and Wayland app ID ai.storyteller.effectcraft; packaging/linux/ai.storyteller.effectcraft.desktop. - apps/effectcraft/build.rs embeds the .ico and VERSIONINFO into effectcraft.exe (winresource, Windows targets only; a missing resource compiler is a warning). - Web favicon.svg is now the unicorn icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ea1bd0e0c4
commit
3411309d6d
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 343 KiB |
@@ -1,9 +1,8 @@
|
||||
asset: favicon.svg
|
||||
title: EffectCraft web app icon (favicon)
|
||||
author: EffectCraft contributors
|
||||
author: EffectCraft contributors (drawing by the project owner in ArtCraft)
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-01 by EffectCraft contributors (Claude agent, M15 web app)
|
||||
notes: Hand-written SVG of the code-drawn EffectCraft mark (`paint_logo` in
|
||||
crates/ui-egui/src/header.rs): a navy rounded square split into blue and violet halves
|
||||
with a white keyframe diamond, from basic shapes. Not derived from any other product's icon.
|
||||
license-file: assets/app-icon/LICENSE.txt
|
||||
added: 2026-10-02 by EffectCraft contributors (Claude agent, app icon)
|
||||
notes: Copy of assets/app-icon/effectcraft-small.svg (the lighter vector trace of the app icon). Replaces the earlier code-drawn split-square mark.
|
||||
|
||||
@@ -19,6 +19,10 @@ serde_json = { workspace = true }
|
||||
rfd = { workspace = true }
|
||||
cpal = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
# Icon + VERSIONINFO for effectcraft.exe; build.rs only uses it when targeting Windows.
|
||||
winresource = "0.1"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
# Same winit as eframe: macOS event-loop options (no app activation when driven by an agent).
|
||||
winit = { version = "0.30", default-features = false }
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//! Windows only: embed the app icon and version info (VERSIONINFO) into `effectcraft.exe`.
|
||||
//!
|
||||
//! On every other target this does nothing. A missing resource compiler is a warning, so a
|
||||
//! cross-compile from macOS or Linux still links, unless `EFFECTCRAFT_REQUIRE_WINRES=1` turns it
|
||||
//! into an error (for release builds).
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=../../assets/app-icon/effectcraft.ico");
|
||||
println!("cargo:rerun-if-env-changed=EFFECTCRAFT_REQUIRE_WINRES");
|
||||
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") {
|
||||
return;
|
||||
}
|
||||
let mut res = winresource::WindowsResource::new();
|
||||
res.set_icon("../../assets/app-icon/effectcraft.ico")
|
||||
.set("ProductName", "EffectCraft")
|
||||
.set("FileDescription", "EffectCraft motion graphics and visual effects")
|
||||
.set("LegalCopyright", "Copyright (c) 2026 The EffectCraft contributors. MIT OR Apache-2.0.")
|
||||
.set("OriginalFilename", "effectcraft.exe")
|
||||
.set("InternalName", "effectcraft");
|
||||
if let Err(e) = res.compile() {
|
||||
if std::env::var_os("EFFECTCRAFT_REQUIRE_WINRES").is_some() {
|
||||
panic!("embedding Windows resources failed: {e}");
|
||||
}
|
||||
println!("cargo:warning=effectcraft.exe built without icon/version resources: {e}");
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,16 @@ mod control_server;
|
||||
use effectcraft_ui_egui::EffectcraftApp;
|
||||
use serde_json::json;
|
||||
|
||||
/// The app icon for the window, taskbar and Dock (assets/app-icon, regenerated by
|
||||
/// `packaging/icons.sh`). macOS gets the padded variant so it sits on Apple's icon grid in the Dock.
|
||||
fn app_icon() -> egui::IconData {
|
||||
#[cfg(target_os = "macos")]
|
||||
let png: &[u8] = include_bytes!("../../../assets/app-icon/effectcraft-macos-512.png");
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let png: &[u8] = include_bytes!("../../../assets/app-icon/hicolor/256x256/apps/ai.storyteller.effectcraft.png");
|
||||
eframe::icon_data::from_png_bytes(png).unwrap_or_default()
|
||||
}
|
||||
|
||||
fn main() -> eframe::Result {
|
||||
let mut control_port: Option<u16> = std::env::var("EFFECTCRAFT_CONTROL_PORT").ok().and_then(|p| p.parse().ok());
|
||||
let mut files = Vec::new();
|
||||
@@ -37,7 +47,10 @@ fn main() -> eframe::Result {
|
||||
.with_min_inner_size([960.0, 600.0])
|
||||
.with_drag_and_drop(true)
|
||||
// Started for an agent (`--control`): open without taking the user's keyboard focus.
|
||||
.with_active(control_port.is_none()),
|
||||
.with_active(control_port.is_none())
|
||||
.with_icon(app_icon())
|
||||
// Wayland matches the window to `ai.storyteller.effectcraft.desktop` by this ID.
|
||||
.with_app_id("ai.storyteller.effectcraft"),
|
||||
event_loop_builder: agent_event_loop(control_port.is_some()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user