From edd0956b250383e534845c95b736aa02186f22fc Mon Sep 17 00:00:00 2001 From: Squibid Date: Tue, 3 Mar 2026 19:36:38 -0500 Subject: [PATCH] add build time option to change where we look for the runtime directory --- build.zig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build.zig b/build.zig index f55356c..7b46a77 100644 --- a/build.zig +++ b/build.zig @@ -7,13 +7,6 @@ pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - // TODO: this will probably change based on the install paths, make this a var - // that can be passed at comptime? - const runtime_path_prefix = switch (builtin.mode) { - .Debug => "runtime/", - else => "/usr/share", - }; - // Add protocol xml files const scanner = Scanner.create(b, .{}); scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml"); @@ -79,6 +72,7 @@ pub fn build(b: *std.Build) void { ) catch "dev\n"; const options = b.addOptions(); + const runtime_path_prefix = b.option([]const u8, "prefix", "Where mez looks for the runtime dir") orelse "runtime/"; options.addOption([]const u8, "runtime_path_prefix", runtime_path_prefix); options.addOption([]const u8, "version", version); mez.root_module.addOptions("config", options);