From 1656f327660b46e4e43ea0ddb53617c5871dc6a4 Mon Sep 17 00:00:00 2001 From: Locria Cyber <74560659+locriacyber@users.noreply.github.com> Date: Sun, 24 Apr 2022 15:05:40 +0200 Subject: [PATCH] Add "run" command --- build.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.zig b/build.zig index 7431b33..df8e4d7 100644 --- a/build.zig +++ b/build.zig @@ -15,4 +15,16 @@ pub fn build(b: *std.build.Builder) !void { lib.export_symbol_names = &[_][]const u8{ "start", "update" }; lib.install(); + + + const run_cmd = b.addSystemCommand(&.{"w4", "run-native"}); + run_cmd.step.dependOn(&lib.step); + run_cmd.addFileSourceArg(lib.getOutputSource()); + if (b.args) |args| { + run_cmd.addArgs(args); + } + + const run_step = b.step("run", "Run Cartridge with w4"); + run_step.dependOn(&run_cmd.step); + }