Bundle all the icons together.
This commit is contained in:
@@ -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" },
|
||||
|
||||
Reference in New Issue
Block a user