summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-08 05:43:57 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commit32041350ab22935724b950794c5c1d71374dc76b (patch)
treedca39bd365811d933ed099fea73a5fcdb7645c20
parent146944accb5852c548e25c7194b2865531e67cbb (diff)
downloadpardes-32041350ab22935724b950794c5c1d71374dc76b.tar.gz
pardes-32041350ab22935724b950794c5c1d71374dc76b.zip
build: the gui shell installs as pardes-gui (no longer clobbers zig-out/bin/pardes, so the rebuild-tty-last dance is obsolete), and non linux-x86_64 targets get os-arch appended to the binary name (e.g. pardes-linux-aarch64); native linux-x86_64 tty stays pardes for the snap/e2e harnesses.
-rw-r--r--build.zig9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index 0ef09591..d0b4496e 100644
--- a/build.zig
+++ b/build.zig
@@ -363,8 +363,15 @@ pub fn build(b: *std.Build) void {
web_step.dependOn(&b.addInstallFileWithDir(html, .{ .custom = "web" }, "index.html").step);
b.getInstallStep().dependOn(web_step);
} else {
+ // binary name: the native-shaped linux-x86_64 tty build stays `pardes`
+ // (the snap suite and e2e harness drive zig-out/bin/pardes); the gui
+ // shell gets its own name so it no longer clobbers the tty binary,
+ // and any non linux-x86_64 target carries os-arch in the name.
+ var exe_name: []const u8 = if (platform == .gui) "pardes-gui" else "pardes";
+ if (target.result.os.tag != .linux or target.result.cpu.arch != .x86_64)
+ exe_name = b.fmt("{s}-{s}-{s}", .{ exe_name, @tagName(target.result.os.tag), @tagName(target.result.cpu.arch) });
const exe = b.addExecutable(.{
- .name = "pardes",
+ .name = exe_name,
.linkage = if (static) .static else null,
.root_module = root_mod,
});