summaryrefslogtreecommitdiff
path: root/build/gui.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-18 21:23:22 -0300
committerGabriel Schneider <[email protected]>2026-11-18 21:43:03 -0300
commitf9a3179542012ec1a700e2020ac9f616b819f972 (patch)
tree73f4cb241876196331f7b28c9f773301bd341a7f /build/gui.zig
parenta75956bb3443aa8aac778d2ff12c42f5ef99e0e9 (diff)
downloadpardes-f9a3179542012ec1a700e2020ac9f616b819f972.tar.gz
pardes-f9a3179542012ec1a700e2020ac9f616b819f972.zip
dev: the frontends (dev/tui, dev/gui, the macOS app's Swift and resources in dev/macos), host_io, file_watch, fonts, the lsp client and Scip, Art, jump_trail, glide and vaxis_input into dev/ (the reorganisation's tree, step 2b): module `dev` (dev/root.zig) beside the core and the runtime, each naming the others; the window wired into it, sketchbook's devices imported as `sketchbook` (its `dev` would be ours); pardes.zig keeps its re-exports (host_io, file_watch, glide, fonts) so every caller reads as before; core-test and shell-test run the devices' test program too, so the same tests run (the ledger, tui and gui); nothing else changes: frames byte-identical, replicas and process-test the base's
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'build/gui.zig')
-rw-r--r--build/gui.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/build/gui.zig b/build/gui.zig
index cc90bd0a..bec26c0c 100644
--- a/build/gui.zig
+++ b/build/gui.zig
@@ -30,7 +30,7 @@ pub const Window = struct {
gm.addIncludePath(sdl.include);
if (w.sketchbook) |sb| {
gm.addImport("gui_c", sb.module("c"));
- gm.addImport("dev", sb.module("dev"));
+ gm.addImport("sketchbook", sb.module("dev"));
}
if (sdl.trackpad) |object| {
gm.addObjectFile(object);
@@ -47,7 +47,7 @@ pub const Window = struct {
gm.addRPath(.{ .cwd_relative = "/usr/local/lib" });
if (w.sketchbook) |sb| gm.addCSourceFile(.{ .file = sb.namedLazyPath("font.c") });
// the embedded UI font: provided as a build import since assets/ lives
- // outside the src/ module root (@embedFile can't escape it)
+ // outside the dev/ module root (@embedFile can't escape it)
gm.addAnonymousImport("AdwaitaMono-Regular.ttf", .{
.root_source_file = b.path("assets/AdwaitaMono-Regular.ttf"),
});
@@ -77,7 +77,7 @@ pub fn make(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.
\\#include "macos_trackpad.h"
\\
);
- const include: []const std.Build.LazyPath = &.{ dep.path("include"), b.path("src/gui") };
+ const include: []const std.Build.LazyPath = &.{ dep.path("include"), b.path("dev/gui") };
w.sketchbook = b.lazyDependency("sketchbook", .{ .target = target, .optimize = optimize, .@"c-header" = header, .@"c-include" = include, .@"prebuilt-shaders" = prebuilt_shaders });
var sdl: Window.Sdl = .{ .lib = sdl_lib, .include = dep.path("include") };
if (target.result.os.tag == .macos) {
@@ -85,9 +85,9 @@ pub fn make(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.
const shim = b.addSystemCommand(&.{ "xcrun", "clang", "-fobjc-arc", "-O2", "-target", b.fmt("{s}-apple-macos13.0", .{arch}), "-I" });
shim.addDirectoryArg(dep.path("include"));
shim.addArg("-c");
- shim.addFileArg(b.path("src/gui/macos_trackpad.m"));
+ shim.addFileArg(b.path("dev/gui/macos_trackpad.m"));
// Header changes invalidate the independently compiled adapter.
- shim.addFileInput(b.path("src/gui/macos_trackpad.h"));
+ shim.addFileInput(b.path("dev/gui/macos_trackpad.h"));
shim.addArg("-o");
sdl.trackpad = shim.addOutputFileArg("macos_trackpad.o");
}
@@ -136,8 +136,8 @@ pub fn make(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.
const adapter_test = b.addSystemCommand(&.{ "xcrun", "clang", "-fobjc-arc", "-O1", "-framework", "Cocoa", "-I" });
adapter_test.addDirectoryArg(sdl.include);
adapter_test.addFileArg(b.path("test/macos_trackpad.m"));
- adapter_test.addFileInput(b.path("src/gui/macos_trackpad.m"));
- adapter_test.addFileInput(b.path("src/gui/macos_trackpad.h"));
+ adapter_test.addFileInput(b.path("dev/gui/macos_trackpad.m"));
+ adapter_test.addFileInput(b.path("dev/gui/macos_trackpad.h"));
adapter_test.addArg("-o");
const adapter_bin = adapter_test.addOutputFileArg("macos-trackpad-test");
const run_adapter = std.Build.Step.Run.create(b, "run macos-trackpad-test");