mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
build: fix race conditions, use actual filesource
This commit is contained in:
36
build.zig
36
build.zig
@ -318,34 +318,28 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
// Compile the terminfo source into a terminfo database
|
||||
{
|
||||
// Hardcoded until: https://github.com/ziglang/zig/issues/16187
|
||||
const path = "zig-cache/tmp/terminfo";
|
||||
|
||||
const run_step = RunStep.create(b, "tic");
|
||||
run_step.addArgs(&.{ "tic", "-x", "-o", path });
|
||||
run_step.addArgs(&.{ "tic", "-x", "-o" });
|
||||
const path = run_step.addOutputFileArg("terminfo");
|
||||
run_step.addFileSourceArg(src_source);
|
||||
_ = run_step.captureStdErr(); // so we don't see stderr
|
||||
|
||||
const copy_step = RunStep.create(b, "copy terminfo db");
|
||||
copy_step.step.dependOn(&run_step.step);
|
||||
copy_step.addArgs(&.{
|
||||
"cp",
|
||||
"-R",
|
||||
path,
|
||||
b.fmt("{s}/share", .{b.install_prefix}),
|
||||
});
|
||||
b.getInstallStep().dependOn(©_step.step);
|
||||
{
|
||||
const copy_step = RunStep.create(b, "copy terminfo db");
|
||||
copy_step.addArgs(&.{ "cp", "-R" });
|
||||
copy_step.addFileSourceArg(path);
|
||||
copy_step.addArg(b.fmt("{s}/share", .{b.install_prefix}));
|
||||
b.getInstallStep().dependOn(©_step.step);
|
||||
}
|
||||
|
||||
if (target.isDarwin()) {
|
||||
const mac_copy_step = RunStep.create(b, "copy terminfo db");
|
||||
mac_copy_step.step.dependOn(&run_step.step);
|
||||
mac_copy_step.addArgs(&.{
|
||||
"cp",
|
||||
"-R",
|
||||
path,
|
||||
const copy_step = RunStep.create(b, "copy terminfo db");
|
||||
copy_step.addArgs(&.{ "cp", "-R" });
|
||||
copy_step.addFileSourceArg(path);
|
||||
copy_step.addArg(
|
||||
b.fmt("{s}/Ghostty.app/Contents/Resources", .{b.install_prefix}),
|
||||
});
|
||||
b.getInstallStep().dependOn(&mac_copy_step.step);
|
||||
);
|
||||
b.getInstallStep().dependOn(©_step.step);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ pub const ghostty: Source = .{
|
||||
.{ .name = "cbt", .value = .{ .string = "\\E[Z" } },
|
||||
.{ .name = "civis", .value = .{ .string = "\\E[?25l" } },
|
||||
.{ .name = "clear", .value = .{ .string = "\\E[H\\E[2J" } },
|
||||
.{ .name = "cnorm", .value = .{ .string = "\\E[?25h" } },
|
||||
.{ .name = "cnorm", .value = .{ .string = "\\E[?12l\\E[?25h" } },
|
||||
.{ .name = "cr", .value = .{ .string = "\\r" } },
|
||||
.{ .name = "csr", .value = .{ .string = "\\E[%i%p1%d;%p2%dr" } },
|
||||
.{ .name = "cub", .value = .{ .string = "\\E[%p1%dD" } },
|
||||
|
Reference in New Issue
Block a user