copy mac binary must depend on binary

This commit is contained in:
Mitchell Hashimoto
2023-03-24 20:33:36 -07:00
parent 9016222da9
commit 86c5b04ff9

View File

@ -291,8 +291,11 @@ pub fn build(b: *std.Build) !void {
// App (Mac) // App (Mac)
if (target.isDarwin()) { if (target.isDarwin()) {
const bin_path = try std.fmt.allocPrint(b.allocator, "{s}/bin/ghostty", .{b.install_path}); const bin_install = b.addInstallFile(
b.installFile(bin_path, "Ghostty.app/Contents/MacOS/ghostty"); .{ .generated = &exe.output_path_source },
"Ghostty.app/Contents/MacOS/ghostty",
);
b.getInstallStep().dependOn(&bin_install.step);
b.installFile("dist/macos/Info.plist", "Ghostty.app/Contents/Info.plist"); b.installFile("dist/macos/Info.plist", "Ghostty.app/Contents/Info.plist");
b.installFile("dist/macos/Ghostty.icns", "Ghostty.app/Contents/Resources/Ghostty.icns"); b.installFile("dist/macos/Ghostty.icns", "Ghostty.app/Contents/Resources/Ghostty.icns");
} }