diff --git a/build.zig b/build.zig index cb60aabb7..e12ced7d7 100644 --- a/build.zig +++ b/build.zig @@ -305,6 +305,28 @@ pub fn build(b: *std.Build) !void { } } + // Themes + { + const upstream = b.dependency("iterm2_themes", .{}); + const install = b.addInstallDirectory(.{ + .source_dir = upstream.path("ghostty"), + .install_dir = .{ .custom = "share" }, + .install_subdir = "themes", + }); + b.getInstallStep().dependOn(&install.step); + + if (target.isDarwin() and exe_ != null) { + const mac_install = b.addInstallDirectory(options: { + var copy = install.options; + copy.install_dir = .{ + .custom = "Ghostty.app/Contents/Resources", + }; + break :options copy; + }); + b.getInstallStep().dependOn(&mac_install.step); + } + } + // Terminfo { // Encode our terminfo diff --git a/build.zig.zon b/build.zig.zon index cc50c887c..2a99a393f 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -43,5 +43,11 @@ // System headers .apple_sdk = .{ .path = "./pkg/apple-sdk" }, + + // Themes + .iterm2_themes = .{ + .url = "https://github.com/mbadolato/iTerm2-Color-Schemes/archive/d58e107fc18955fd199166f3f3cc6b3d36bc2beb.tar.gz", + .hash = "12205ab6860789d67adebe483b14663d6ee67743937fd990c275f42bfa9c76ab4021", + }, }, }