-
-
Notifications
You must be signed in to change notification settings - Fork 193
Expand file tree
/
Copy pathbuild.zig
More file actions
64 lines (56 loc) · 2.14 KB
/
Copy pathbuild.zig
File metadata and controls
64 lines (56 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const std = @import("std");
pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{});
// ── x32 plugin (.dp32) ──────────────────────────────────────────
const x32_mod = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = b.resolveTargetQuery(.{
.cpu_arch = .x86,
.os_tag = .windows,
.abi = .gnu,
}),
.optimize = optimize,
.single_threaded = true,
});
x32_mod.linkSystemLibrary("kernel32", .{});
x32_mod.linkSystemLibrary("ws2_32", .{});
x32_mod.linkSystemLibrary("user32", .{});
const x32 = b.addLibrary(.{
.name = "x64dbg-MCP-Server",
.root_module = x32_mod,
.linkage = .dynamic,
});
const install_x32 = b.addInstallArtifact(x32, .{
.dest_dir = .{ .override = .{ .custom = "x32/plugins" } },
.dest_sub_path = "x64dbg-MCP-Server.dp32",
.implib_dir = .disabled,
.pdb_dir = .disabled,
});
// ── x64 plugin (.dp64) ──────────────────────────────────────────
const x64_mod = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = b.resolveTargetQuery(.{
.cpu_arch = .x86_64,
.os_tag = .windows,
.abi = .gnu,
}),
.optimize = optimize,
.single_threaded = true,
});
x64_mod.linkSystemLibrary("kernel32", .{});
x64_mod.linkSystemLibrary("ws2_32", .{});
x64_mod.linkSystemLibrary("user32", .{});
const x64 = b.addLibrary(.{
.name = "x64dbg-MCP-Server",
.root_module = x64_mod,
.linkage = .dynamic,
});
const install_x64 = b.addInstallArtifact(x64, .{
.dest_dir = .{ .override = .{ .custom = "x64/plugins" } },
.dest_sub_path = "x64dbg-MCP-Server.dp64",
.implib_dir = .disabled,
.pdb_dir = .disabled,
});
b.default_step.dependOn(&install_x32.step);
b.default_step.dependOn(&install_x64.step);
}