From f0586325bbfd0716c4ec0a293c79f721f6ae120f Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sun, 5 Jan 2025 15:32:54 +0100 Subject: [PATCH] feat(win32 gui): produce both tui and gui executables for windows targets --- build.zig | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 838e2cd..66ddd2e 100644 --- a/build.zig +++ b/build.zig @@ -75,7 +75,7 @@ fn build_release( strip: ?bool, use_llvm: ?bool, pie: ?bool, - gui: bool, + _: bool, //gui ) void { const targets: []const std.Target.Query = &.{ .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .musl }, @@ -117,8 +117,26 @@ fn build_release( strip orelse true, use_llvm, pie, - gui, + false, //gui ); + + if (t.os_tag == .windows) + build_exe( + b, + run_step, + check_step, + test_step, + lint_step, + target, + optimize, + .{ .dest_dir = .{ .override = .{ .custom = target_path } } }, + tracy_enabled, + use_tree_sitter, + strip orelse true, + use_llvm, + pie, + true, //gui + ); } }