fix windows build order

This commit is contained in:
Speedy_Lex 2025-07-03 10:39:16 +02:00
parent 1512b8356c
commit 21129aab20

View File

@ -66,9 +66,13 @@ fn compileTheRightLua(b: *std.Build, c: *std.Build.Step.Compile, version: LuaVer
fn addRunArtifact(b: *std.Build, os: std.Target.Os.Tag, exe: *std.Build.Step.Compile) *std.Build.Step.Run { fn addRunArtifact(b: *std.Build, os: std.Target.Os.Tag, exe: *std.Build.Step.Compile) *std.Build.Step.Run {
if (os == .windows) { if (os == .windows) {
// do this so that windows can find dll's // do this so that windows can find dll's
return b.addSystemCommand(&[_][]const u8{ const installed = b.addInstallArtifact(exe, .{});
b.getInstallPath(.bin, exe.name),
}); // run the installed executable by path
const exe_path = b.getInstallPath(.bin, exe.name);
const run_cmd = b.addSystemCommand(&[_][]const u8{exe_path});
run_cmd.step.dependOn(&installed.step);
return run_cmd;
} else { } else {
return b.addRunArtifact(exe); return b.addRunArtifact(exe);
} }