summaryrefslogtreecommitdiff
path: root/build/gui.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 14:45:02 -0300
committerGabriel Schneider <[email protected]>2026-11-17 14:53:20 -0300
commitb4faa9da0530be0391a7cc61eb4ea1e4cdbfa038 (patch)
tree33e7a733af74d2718cb4a133228e37dbdc25e0a1 /build/gui.zig
parent3e77fdcd57693b337d915873e9919de2e1ec6521 (diff)
parent5467df693e6aba8fd17d6acd035ac28cc1b620ef (diff)
downloadpardes-b4faa9da0530be0391a7cc61eb4ea1e4cdbfa038.tar.gz
pardes-b4faa9da0530be0391a7cc61eb4ea1e4cdbfa038.zip
integration: the build script made readable, with sketchbook's files where step 1 of its reorganisation put them
A merge of pardes-build-2 (uukslmmu) and reorg-1 (nrsxpmro). One conflict, build.zig: the restructured script is kept and the moved paths (sketchbook's src/gpu/ is dev/draw/, src/font/Atlas.zig is dev/text/Atlas.zig) are applied where those lines live now, build/gui.zig and one option's description. Against sketchbook's reorg-1: frame corpus 77/77 identical in Debug (baseline .scratch/sketch/gpu/mbase), unit-test on gui 1587/1595 with no failure the baseline has not; on tui core-test 811/950 (139 skipped), shell-test 993/996, syntax-test 40/40. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'build/gui.zig')
-rw-r--r--build/gui.zig20
1 files changed, 10 insertions, 10 deletions
diff --git a/build/gui.zig b/build/gui.zig
index 9b46f6c5..24aa6277 100644
--- a/build/gui.zig
+++ b/build/gui.zig
@@ -94,25 +94,25 @@ pub fn make(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.
const gui_c_mod = gui_c.createModule();
var sdl: Window.Sdl = .{ .lib = sdl_lib, .include = dep.path("include"), .gui_c = gui_c_mod };
if (sketchbook) |sb| {
- const gpu = b.createModule(.{ .root_source_file = sb.path("src/gpu/Executor.zig"), .imports = &.{ .{ .name = "abi", .module = sb.module("abi") }, .{ .name = "c", .module = gui_c_mod } } });
- // The glyph atlas (src/font/Atlas.zig) over the font shim
+ const gpu = b.createModule(.{ .root_source_file = sb.path("dev/draw/Executor.zig"), .imports = &.{ .{ .name = "abi", .module = sb.module("abi") }, .{ .name = "c", .module = gui_c_mod } } });
+ // The glyph atlas (dev/text/Atlas.zig) over the font shim
// (vendor/font.{c,h}), compiled below against pardes's
// FreeType and HarfBuzz.
- const atlas_mod = b.createModule(.{ .root_source_file = sb.path("src/font/Atlas.zig"), .imports = &.{.{ .name = "c", .module = gui_c_mod }} });
- // pardes's renderer, moved to sketchbook (src/gpu/), compiled
+ const atlas_mod = b.createModule(.{ .root_source_file = sb.path("dev/text/Atlas.zig"), .imports = &.{.{ .name = "c", .module = gui_c_mod }} });
+ // pardes's renderer, moved to sketchbook (dev/draw/), compiled
// against pardes's SDL; its tests run with unit-test. Its
// SPIR-V is sketchbook's GLSL through glslc, or the prebuilt
// copies with -Dprebuilt-shaders.
- const cells_mod = b.createModule(.{ .root_source_file = sb.path("src/gpu/Cells.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } });
+ const cells_mod = b.createModule(.{ .root_source_file = sb.path("dev/draw/Cells.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } });
for (gui_shaders) |name| cells_mod.addAnonymousImport(b.fmt("{s}.spv", .{name}), .{
.root_source_file = if (prebuilt_shaders)
- sb.path(b.fmt("src/gpu/shaders/prebuilt/{s}.spv", .{name}))
+ sb.path(b.fmt("dev/draw/shaders/prebuilt/{s}.spv", .{name}))
else
- compileGlsl(b, sb.path(b.fmt("src/gpu/shaders/{s}.glsl", .{name})), name),
+ compileGlsl(b, sb.path(b.fmt("dev/draw/shaders/{s}.glsl", .{name})), name),
});
- const present = b.createModule(.{ .root_source_file = sb.path("src/gpu/Present.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "gpu_cells", .module = cells_mod } } });
+ const present = b.createModule(.{ .root_source_file = sb.path("dev/draw/Present.zig"), .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "gpu_cells", .module = cells_mod } } });
sdl.renderer = .{ .{ .name = "sketch_gpu", .module = gpu }, .{ .name = "font_atlas", .module = atlas_mod }, .{ .name = "gpu_cells", .module = cells_mod }, .{ .name = "gpu_present", .module = present }, .{ .name = "gpu_scene", .module = sb.module("gpu_scene") } };
- w.cells_test = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = sb.path("src/gpu/Cells.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } }), .filters = test_filters });
+ w.cells_test = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = sb.path("dev/draw/Cells.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "c", .module = gui_c_mod }, .{ .name = "font_atlas", .module = atlas_mod } } }), .filters = test_filters });
gui_c.addIncludePath(sb.path("vendor"));
}
if (target.result.os.tag == .macos) {
@@ -169,7 +169,7 @@ pub fn make(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.lang.
// The Atlas's own tests, over the same FreeType, HarfBuzz and
// shim, the embedded face theirs to draw.
if (w.sdl) |sdl| if (sketchbook) |sb| {
- const atlas_mod = b.createModule(.{ .root_source_file = sb.path("src/font/Atlas.zig"), .target = target, .optimize = optimize, .link_libc = true, .imports = &.{.{ .name = "c", .module = sdl.gui_c }} });
+ const atlas_mod = b.createModule(.{ .root_source_file = sb.path("dev/text/Atlas.zig"), .target = target, .optimize = optimize, .link_libc = true, .imports = &.{.{ .name = "c", .module = sdl.gui_c }} });
atlas_mod.linkLibrary(ft);
atlas_mod.linkLibrary(harfbuzz);
atlas_mod.addIncludePath(upstream.path("src"));