build: add -Demit-themes option to emit/omit theme resources (#9288)
We'll backport this to 1.2.x for distros that would prefer this.1.2.x
parent
bbbb52ed75
commit
d2a459b7c2
|
|
@ -60,6 +60,7 @@ emit_macos_app: bool = false,
|
|||
emit_terminfo: bool = false,
|
||||
emit_termcap: bool = false,
|
||||
emit_test_exe: bool = false,
|
||||
emit_themes: bool = false,
|
||||
emit_xcframework: bool = false,
|
||||
emit_webdata: bool = false,
|
||||
emit_unicode_table_gen: bool = false,
|
||||
|
|
@ -366,6 +367,12 @@ pub fn init(b: *std.Build) !Config {
|
|||
.ReleaseSafe, .ReleaseFast, .ReleaseSmall => false,
|
||||
};
|
||||
|
||||
config.emit_themes = b.option(
|
||||
bool,
|
||||
"emit-themes",
|
||||
"Install bundled iTerm2-Color-Schemes Ghostty themes",
|
||||
) orelse true;
|
||||
|
||||
config.emit_webdata = b.option(
|
||||
bool,
|
||||
"emit-webdata",
|
||||
|
|
|
|||
|
|
@ -118,14 +118,16 @@ pub fn init(b: *std.Build, cfg: *const Config) !GhosttyResources {
|
|||
}
|
||||
|
||||
// Themes
|
||||
if (b.lazyDependency("iterm2_themes", .{})) |upstream| {
|
||||
const install_step = b.addInstallDirectory(.{
|
||||
.source_dir = upstream.path(""),
|
||||
.install_dir = .{ .custom = "share" },
|
||||
.install_subdir = b.pathJoin(&.{ "ghostty", "themes" }),
|
||||
.exclude_extensions = &.{".md"},
|
||||
});
|
||||
try steps.append(&install_step.step);
|
||||
if (cfg.emit_themes) {
|
||||
if (b.lazyDependency("iterm2_themes", .{})) |upstream| {
|
||||
const install_step = b.addInstallDirectory(.{
|
||||
.source_dir = upstream.path(""),
|
||||
.install_dir = .{ .custom = "share" },
|
||||
.install_subdir = b.pathJoin(&.{ "ghostty", "themes" }),
|
||||
.exclude_extensions = &.{".md"},
|
||||
});
|
||||
try steps.append(&install_step.step);
|
||||
}
|
||||
}
|
||||
|
||||
// Fish shell completions
|
||||
|
|
|
|||
Loading…
Reference in New Issue