Icon: scalable SVG (hicolor/scalable) generated by xtask icon

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-09 13:39:03 -04:00
co-authored by Claude Opus 5.5
parent 38a30d6aaf
commit 077ed64739
6 changed files with 15 additions and 0 deletions
+11
View File
@@ -109,6 +109,17 @@ pub fn generate(root: &std::path::Path) -> bool {
ico.extend_from_slice(png);
}
ok &= std::fs::write(dir.join("figcraft.ico"), ico).is_ok();
// Scalable SVG (same artwork, written by FigCraft's SVG exporter).
let tops: Vec<_> = doc.node(page).map(|p| p.children.clone()).unwrap_or_default();
match figcraft_svg::export_svg(&doc, &tops, &Default::default()) {
Some(svg) => {
let sd = dir.join("hicolor/scalable/apps");
let _ = std::fs::create_dir_all(&sd);
ok &= std::fs::write(dir.join("figcraft.svg"), &svg).is_ok();
ok &= std::fs::write(sd.join("ai.storyteller.figcraft.svg"), &svg).is_ok();
}
None => ok = false,
}
eprintln!("icon: wrote {}", dir.display());
ok
}