summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 15:17:19 -0300
committerGabriel Schneider <[email protected]>2026-11-17 15:38:03 -0300
commitd0c4da0b37f45b805081eb3f3dd95ae0fa9a99da (patch)
tree3843d3a78e1442393d4d5f32d067d9f9523c948c /build.zig
parentb4faa9da0530be0391a7cc61eb4ea1e4cdbfa038 (diff)
downloadpardes-d0c4da0b37f45b805081eb3f3dd95ae0fa9a99da.tar.gz
pardes-d0c4da0b37f45b805081eb3f3dd95ae0fa9a99da.zip
build: sketchbook's devices by name: the window asks sketchbook (in build/gui.zig only) for its `c`, translated from gui.zig's header over pardes's own SDL (-Dc-header, -Dc-include), its `dev` (the executor, cells, presentation, glyph atlas and scene format: src/gui/gui.zig takes the five from it) and the named font.c, compiled against pardes's FreeType and HarfBuzz as before; every sb.path into sketchbook, the copied shader list, compileGlsl and -Dgpu-only are gone; -Dprebuilt-shaders is passed through; the GPU addons take gpu_scene from the same instance (addons.gpu gets the window's dependency, null off the window, after it); the Cells and Atlas tests are sketchbook's own now (5 fewer here). gui: frame corpus 77/77 byte-identical against mbase, unit-test 1582/1590 (the base's 1582; the 5 moved, the base's 8 failures), tui-has-no-sdl; tui: core-test 811/950 (139 skipped), configures with ../sketchbook moved aside
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig14
1 files changed, 6 insertions, 8 deletions
diff --git a/build.zig b/build.zig
index 4c23c19d..e7997363 100644
--- a/build.zig
+++ b/build.zig
@@ -3,6 +3,7 @@ const builtin = @import("builtin");
const core = @import("build/core.zig");
const docs = @import("build/docs.zig");
const gui = @import("build/gui.zig");
+const addons = @import("build/addons.zig");
const macos = @import("build/macos.zig");
const tools = @import("build/tools.zig");
const tests = @import("build/tests.zig");
@@ -201,14 +202,13 @@ pub fn build(b: *std.Build) void {
// The window's shells: the bare build's pardes-gui; -Dplatform=gui's
// pardes-gui and its static.
- var cells_test: ?*std.Build.Step.Compile = null;
- var atlas_test: ?*std.Build.Step.Compile = null;
+ var sketchbook: ?*std.Build.Dependency = null;
if (also_gui or platform == .gui) {
- const window = gui.make(b, target, optimize, macos_sdk, prebuilt_shaders, a.freetype, test_filters);
+ const window = gui.make(b, target, optimize, macos_sdk, prebuilt_shaders, a.freetype);
for ([_]?*std.Build.Module{ gui_mod, if (platform == .gui) root_mod else null, if (platform == .gui) static_mod else null }) |m| if (m) |gm| window.wire(gm);
- cells_test = window.cells_test;
- atlas_test = window.atlas_test;
+ sketchbook = window.sketchbook;
}
+ const snake_shader_lib = addons.gpu(b, target, optimize, a.addon_mod, sketchbook);
if (platform == .macos) macos.add(b, .{
.macos_identity = macos_identity,
@@ -320,8 +320,6 @@ pub fn build(b: *std.Build) void {
});
tests.add(b, .{
.addon_mod = a.addon_mod,
- .atlas_test = atlas_test,
- .cells_test = cells_test,
.core_lean = core_lean,
.core_module = core_module,
.core_cfg = core_cfg,
@@ -335,7 +333,7 @@ pub fn build(b: *std.Build) void {
.pdf_addon = a.pdf.lib,
.platform = platform,
.root_mod = root_mod,
- .snake_shader_lib = a.snake_shader_lib,
+ .snake_shader_lib = snake_shader_lib,
.target = target,
.test_build = test_build,
.test_filters = test_filters,