mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
build: must set run condition to always now
This commit is contained in:
@ -135,7 +135,6 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// On Mac we can build the app.
|
// On Mac we can build the app.
|
||||||
const macapp = b.step("macapp", "Build macOS app using XCode.");
|
|
||||||
if (builtin.target.isDarwin()) {
|
if (builtin.target.isDarwin()) {
|
||||||
const static_lib_aarch64 = lib: {
|
const static_lib_aarch64 = lib: {
|
||||||
const lib = b.addStaticLibrary(.{
|
const lib = b.addStaticLibrary(.{
|
||||||
@ -147,7 +146,6 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
lib.bundle_compiler_rt = true;
|
lib.bundle_compiler_rt = true;
|
||||||
lib.linkLibC();
|
lib.linkLibC();
|
||||||
lib.addOptions("build_options", exe_options);
|
lib.addOptions("build_options", exe_options);
|
||||||
b.default_step.dependOn(&lib.step);
|
|
||||||
|
|
||||||
// Create a single static lib with all our dependencies merged
|
// Create a single static lib with all our dependencies merged
|
||||||
var lib_list = try addDeps(b, lib, true);
|
var lib_list = try addDeps(b, lib, true);
|
||||||
@ -157,6 +155,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
.out_name = "libghostty-aarch64-fat.a",
|
.out_name = "libghostty-aarch64-fat.a",
|
||||||
.sources = lib_list.items,
|
.sources = lib_list.items,
|
||||||
});
|
});
|
||||||
|
libtool.step.dependOn(&lib.step);
|
||||||
b.default_step.dependOn(&libtool.step);
|
b.default_step.dependOn(&libtool.step);
|
||||||
|
|
||||||
break :lib libtool;
|
break :lib libtool;
|
||||||
@ -172,7 +171,6 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
lib.bundle_compiler_rt = true;
|
lib.bundle_compiler_rt = true;
|
||||||
lib.linkLibC();
|
lib.linkLibC();
|
||||||
lib.addOptions("build_options", exe_options);
|
lib.addOptions("build_options", exe_options);
|
||||||
b.default_step.dependOn(&lib.step);
|
|
||||||
|
|
||||||
// Create a single static lib with all our dependencies merged
|
// Create a single static lib with all our dependencies merged
|
||||||
var lib_list = try addDeps(b, lib, true);
|
var lib_list = try addDeps(b, lib, true);
|
||||||
@ -182,6 +180,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
.out_name = "libghostty-x86_64-fat.a",
|
.out_name = "libghostty-x86_64-fat.a",
|
||||||
.sources = lib_list.items,
|
.sources = lib_list.items,
|
||||||
});
|
});
|
||||||
|
libtool.step.dependOn(&lib.step);
|
||||||
b.default_step.dependOn(&libtool.step);
|
b.default_step.dependOn(&libtool.step);
|
||||||
|
|
||||||
break :lib libtool;
|
break :lib libtool;
|
||||||
@ -206,7 +205,6 @@ pub fn build(b: *std.build.Builder) !void {
|
|||||||
});
|
});
|
||||||
xcframework.step.dependOn(&static_lib_universal.step);
|
xcframework.step.dependOn(&static_lib_universal.step);
|
||||||
b.default_step.dependOn(&xcframework.step);
|
b.default_step.dependOn(&xcframework.step);
|
||||||
macapp.dependOn(&xcframework.step);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// wasm
|
// wasm
|
||||||
|
@ -295,7 +295,3 @@ pub const Wasm = if (!builtin.target.isWasm()) struct {} else struct {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const CAPI = struct {
|
|
||||||
const Ghostty = @import("main_c.zig").Ghostty;
|
|
||||||
};
|
|
||||||
|
@ -59,6 +59,7 @@ fn make(step: *Step) !void {
|
|||||||
"libtool {s}",
|
"libtool {s}",
|
||||||
.{self.name},
|
.{self.name},
|
||||||
));
|
));
|
||||||
|
run.condition = .always;
|
||||||
run.addArgs(&.{ "libtool", "-static", "-o", output_path });
|
run.addArgs(&.{ "libtool", "-static", "-o", output_path });
|
||||||
for (self.sources) |source| {
|
for (self.sources) |source| {
|
||||||
run.addArg(source.getPath(self.builder));
|
run.addArg(source.getPath(self.builder));
|
||||||
|
@ -61,6 +61,7 @@ fn make(step: *Step) !void {
|
|||||||
"lipo {s}",
|
"lipo {s}",
|
||||||
.{self.name},
|
.{self.name},
|
||||||
));
|
));
|
||||||
|
run.condition = .always;
|
||||||
run.addArgs(&.{
|
run.addArgs(&.{
|
||||||
"lipo",
|
"lipo",
|
||||||
"-create",
|
"-create",
|
||||||
|
@ -59,6 +59,7 @@ fn make(step: *Step) !void {
|
|||||||
"xcframework delete {s}",
|
"xcframework delete {s}",
|
||||||
.{self.name},
|
.{self.name},
|
||||||
));
|
));
|
||||||
|
run.condition = .always;
|
||||||
run.addArgs(&.{ "rm", "-rf", output_path });
|
run.addArgs(&.{ "rm", "-rf", output_path });
|
||||||
try run.step.make();
|
try run.step.make();
|
||||||
}
|
}
|
||||||
@ -67,6 +68,7 @@ fn make(step: *Step) !void {
|
|||||||
"xcframework {s}",
|
"xcframework {s}",
|
||||||
.{self.name},
|
.{self.name},
|
||||||
));
|
));
|
||||||
|
run.condition = .always;
|
||||||
run.addArgs(&.{
|
run.addArgs(&.{
|
||||||
"xcodebuild", "-create-xcframework",
|
"xcodebuild", "-create-xcframework",
|
||||||
"-library", self.library.getPath(self.builder),
|
"-library", self.library.getPath(self.builder),
|
||||||
|
@ -21,7 +21,6 @@ const main = @import("main.zig");
|
|||||||
/// Global options so we can log. This is identical to main.
|
/// Global options so we can log. This is identical to main.
|
||||||
pub const std_options = main.std_options;
|
pub const std_options = main.std_options;
|
||||||
|
|
||||||
pub usingnamespace @import("App.zig").CAPI;
|
|
||||||
pub usingnamespace @import("config.zig").CAPI;
|
pub usingnamespace @import("config.zig").CAPI;
|
||||||
|
|
||||||
/// Initialize ghostty global state. It is possible to have more than
|
/// Initialize ghostty global state. It is possible to have more than
|
||||||
|
Reference in New Issue
Block a user