41 lines
1.1 KiB
Zig
41 lines
1.1 KiB
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const target = b.resolveTargetQuery(.{
|
|
.cpu_arch = .x86_64,
|
|
.os_tag = .windows,
|
|
.abi = .msvc,
|
|
});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
const zigwin32 = b.dependency("zigwin32", .{});
|
|
const zigwin32_mod = zigwin32.module("win32");
|
|
zigwin32_mod.resolved_target = target;
|
|
zigwin32_mod.optimize = optimize;
|
|
|
|
const exe_mod = b.createModule(.{
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
|
|
exe_mod.addImport("win32", zigwin32_mod);
|
|
|
|
const exe = b.addExecutable(.{
|
|
.name = "sciter",
|
|
.root_module = exe_mod,
|
|
});
|
|
|
|
b.installArtifact(exe);
|
|
b.getInstallStep().dependOn(&b.addInstallBinFile(b.path("vendor/sciter.dll"), "sciter.dll").step);
|
|
|
|
const run_cmd = b.addRunArtifact(exe);
|
|
run_cmd.step.dependOn(b.getInstallStep());
|
|
if (b.args) |args| {
|
|
run_cmd.addArgs(args);
|
|
}
|
|
|
|
const run_step = b.step("run", "Run the app");
|
|
run_step.dependOn(&run_cmd.step);
|
|
}
|