Bundle all the icons together.

This commit is contained in:
Greyson Parrelli
2026-08-20 14:19:30 -04:00
parent a742b51d3b
commit db69dc41b2
25 changed files with 204 additions and 0 deletions
+15
View File
@@ -32,6 +32,21 @@ pub fn build(b: *std.Build) void {
exe.root_module.addImport("ghostty-vt", ghostty.module("ghostty-vt"));
// The symbolic icons the app names are compiled into the binary, so that
// showing a terminal or web-browser glyph doesn't depend on which icon
// theme the host has installed. glib-compile-resources comes from the same
// Nix shell as GTK itself; the compiled bundle is embedded by src/icons.zig
// and registered at startup.
const gresource = b.addSystemCommand(&.{"glib-compile-resources"});
gresource.addArg("--sourcedir");
gresource.addDirectoryArg(b.path("assets/icons"));
gresource.addArg("--target");
const icons_gresource = gresource.addOutputFileArg("icons.gresource");
gresource.addFileArg(b.path("assets/icons/icons.gresource.xml"));
exe.root_module.addAnonymousImport("icons.gresource", .{
.root_source_file = icons_gresource,
});
const gobject_imports = .{
.{ "adw", "adw1" },
.{ "cairo", "cairo1" },