Merge pull request #15 from speedy-lex/fix-build

fix windows build order
This commit is contained in:
Quantum Tomato 2025-07-03 10:46:58 +02:00 committed by GitHub
commit c1fe6b1c95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);
} }