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:
32
build.zig
32
build.zig
@ -318,34 +318,28 @@ pub fn build(b: *std.Build) !void {
|
|||||||
|
|
||||||
// Compile the terminfo source into a terminfo database
|
// 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");
|
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.addFileSourceArg(src_source);
|
||||||
_ = run_step.captureStdErr(); // so we don't see stderr
|
_ = run_step.captureStdErr(); // so we don't see stderr
|
||||||
|
|
||||||
|
{
|
||||||
const copy_step = RunStep.create(b, "copy terminfo db");
|
const copy_step = RunStep.create(b, "copy terminfo db");
|
||||||
copy_step.step.dependOn(&run_step.step);
|
copy_step.addArgs(&.{ "cp", "-R" });
|
||||||
copy_step.addArgs(&.{
|
copy_step.addFileSourceArg(path);
|
||||||
"cp",
|
copy_step.addArg(b.fmt("{s}/share", .{b.install_prefix}));
|
||||||
"-R",
|
|
||||||
path,
|
|
||||||
b.fmt("{s}/share", .{b.install_prefix}),
|
|
||||||
});
|
|
||||||
b.getInstallStep().dependOn(©_step.step);
|
b.getInstallStep().dependOn(©_step.step);
|
||||||
|
}
|
||||||
|
|
||||||
if (target.isDarwin()) {
|
if (target.isDarwin()) {
|
||||||
const mac_copy_step = RunStep.create(b, "copy terminfo db");
|
const copy_step = RunStep.create(b, "copy terminfo db");
|
||||||
mac_copy_step.step.dependOn(&run_step.step);
|
copy_step.addArgs(&.{ "cp", "-R" });
|
||||||
mac_copy_step.addArgs(&.{
|
copy_step.addFileSourceArg(path);
|
||||||
"cp",
|
copy_step.addArg(
|
||||||
"-R",
|
|
||||||
path,
|
|
||||||
b.fmt("{s}/Ghostty.app/Contents/Resources", .{b.install_prefix}),
|
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 = "cbt", .value = .{ .string = "\\E[Z" } },
|
||||||
.{ .name = "civis", .value = .{ .string = "\\E[?25l" } },
|
.{ .name = "civis", .value = .{ .string = "\\E[?25l" } },
|
||||||
.{ .name = "clear", .value = .{ .string = "\\E[H\\E[2J" } },
|
.{ .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 = "cr", .value = .{ .string = "\\r" } },
|
||||||
.{ .name = "csr", .value = .{ .string = "\\E[%i%p1%d;%p2%dr" } },
|
.{ .name = "csr", .value = .{ .string = "\\E[%i%p1%d;%p2%dr" } },
|
||||||
.{ .name = "cub", .value = .{ .string = "\\E[%p1%dD" } },
|
.{ .name = "cub", .value = .{ .string = "\\E[%p1%dD" } },
|
||||||
|
Reference in New Issue
Block a user