mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-04 21:04:41 +00:00
build: make zig build run on macOS work with an empty zig-out
This commit is contained in:
16
build.zig
16
build.zig
@@ -29,15 +29,7 @@ pub fn build(b: *std.Build) !void {
|
||||
// If we aren't emitting docs we need to emit a placeholder so
|
||||
// our macOS xcodeproject builds since it expects the `share/man`
|
||||
// directory to exist to copy into the app bundle.
|
||||
var wf = b.addWriteFiles();
|
||||
const path = "share/man/.placeholder";
|
||||
b.getInstallStep().dependOn(&b.addInstallFile(
|
||||
wf.add(
|
||||
path,
|
||||
"emit-docs not true so no man pages",
|
||||
),
|
||||
path,
|
||||
).step);
|
||||
docs.installDummy(b.getInstallStep());
|
||||
}
|
||||
|
||||
// Ghostty webdata
|
||||
@@ -155,6 +147,12 @@ pub fn build(b: *std.Build) !void {
|
||||
&xcframework_native,
|
||||
);
|
||||
|
||||
// The app depends on the resources and i18n to be in the
|
||||
// install directory too.
|
||||
resources.addStepDependencies(&macos_app_native_only.build.step);
|
||||
i18n.addStepDependencies(&macos_app_native_only.build.step);
|
||||
docs.installDummy(&macos_app_native_only.build.step);
|
||||
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&macos_app_native_only.open.step);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user