1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff --git a/build.zig b/build.zig
index 6b92a095..ca2bd330 100644
--- a/build.zig
+++ b/build.zig
@@ -528,27 +528,21 @@ pub fn build(b: *std.Build) !void {
run_step.step.dependOn(&src_install.step);
{
- // Use cp -R instead of Step.InstallDir because we need to preserve
- // symlinks in the terminfo database. Zig's InstallDir step doesn't
- // handle symlinks correctly yet.
- const copy_step = RunStep.create(b, "copy terminfo db");
- copy_step.addArgs(&.{ "cp", "-R" });
- copy_step.addFileArg(path);
- copy_step.addArg(b.fmt("{s}/share", .{b.install_path}));
- b.getInstallStep().dependOn(©_step.step);
+ const install_dir_step = b.addInstallDirectory(.{
+ .source_dir = path,
+ .install_dir = .prefix,
+ .install_subdir = "share/terminfo",
+ });
+ b.getInstallStep().dependOn(&install_dir_step.step);
}
if (target.result.os.tag == .macos and exe_ != null) {
- // Use cp -R instead of Step.InstallDir because we need to preserve
- // symlinks in the terminfo database. Zig's InstallDir step doesn't
- // handle symlinks correctly yet.
- const copy_step = RunStep.create(b, "copy terminfo db");
- copy_step.addArgs(&.{ "cp", "-R" });
- copy_step.addFileArg(path);
- copy_step.addArg(
- b.fmt("{s}/Ghostty.app/Contents/Resources", .{b.install_path}),
- );
- b.getInstallStep().dependOn(©_step.step);
+ const install_dir_step = b.addInstallDirectory(.{
+ .source_dir = path,
+ .install_dir = .prefix,
+ .install_subdir = "Ghostty.app/Contents/Resources/terminfo",
+ });
+ b.getInstallStep().dependOn(&install_dir_step.step);
}
}
}
|