build: add iterm2 themes repository, install into resources dir

This commit is contained in:
Mitchell Hashimoto
2023-11-22 21:08:26 -08:00
parent 9ee1c939fd
commit 7a91a23e40
2 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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",
},
},
}