build: all-variants builds everything, -D flags control inclusion

- all-variants now builds combined DLL + noperf + standalone variants
- -D flags exclude modules from all outputs (combined, noperf, variants)
- Simplify RELEASING.md to single build command
- Remove local README.md (lives in remote/WeirdUtils/ only)
This commit is contained in:
MarcelineVQ
2026-03-28 06:27:22 -07:00
parent db675c7a7e
commit 5b85390206
4 changed files with 60 additions and 77 deletions
+5
View File
@@ -6,3 +6,8 @@ docs/
ideas/
wiki/
src/**/assets_backup/
.kangentic/
.claude/settings.local.json
kangentic.local.json
remote/
+3 -5
View File
@@ -126,15 +126,13 @@ Tracks various npc types and useful objects like Oranges and Brainwasher and Mai
### Clickthrough
Smart cursor targeting that prioritizes useful interactions. Instead of always selecting the nearest object under the cursor, the module finds the most useful target along the ray in priority order: lootable corpses first, then interactable game objects, then interactable NPCs, then normal selection.
Smart cursor targeting that prioritizes useful interactions. Instead of always selecting the nearest object under the cursor, the module finds the most useful target along the ray in priority order.
- Lootable corpses are always reachable, even through players, pets, and non-lootable dead bodies
- Interactable game objects (mailboxes, portals, soulwells) are reachable through players and non-interactable units
- Interactable NPCs (vendors, trainers, quest givers) are reachable through players
- Lootable corpses first, then interactable game objects/portals, then interactable NPCs, then normal selection
- Dead non-lootable corpses can still be selected when nothing more useful is behind them
- Disabled inside battlegrounds to prevent targeting objectives through enemy players
Can replaces SuperWoW's `Clickthrough()` toggle with always-on smart targeting that doesn't require a manual toggle and preserves the ability to select dead bodies when needed. Disable corpse-clickthrough in SuperAPI if you want this.
Can replace SuperWoW's `Clickthrough()` toggle with always-on smart targeting that doesn't require a manual toggle and preserves the ability to select dead bodies when needed. Disable corpse-clickthrough in SuperAPI if you want this.
No configuration needed, install and forget.
+8 -29
View File
@@ -38,39 +38,18 @@ defaults. List them with:
zig build --help 2>&1 | grep 'Enable'
```
### Combined DLL
Build `weirdutils.dll` with only the modules for this release. Explicitly
disable everything not being included - defaults may enable modules you don't
want:
`all-variants` builds everything in one command: the combined DLL, the noperf
variant, and a standalone DLL per module. `-D` flags control which modules are
included across all of them -- disabled modules are excluded from the combined
DLL, noperf, and won't get a standalone variant built.
```sh
# Example: only transmogfix + customassets + healtextfix
zig build -Doptimize=ReleaseSmall \
-Dscreenshot=false -Dinteract=false -Doutline=false \
-Dworldmarkers=false -Dframecrash=false -Dlogsessions=false \
-Dminimapicons=false \
-Dtransmogfix=true -Dcustomassets=true -Dhealtextfix=true
zig build all-variants -Doptimize=ReleaseSmall \
-Dworldmarkers=false -Dinteract=false -Doutline=false \
-Dframecrash=false -Ddpslog=false -Daddonperf=false \
-Dssemaths=false -Dsilicon=false -Dtransform44=false
```
### Individual variant DLLs
```sh
zig build all-variants -Doptimize=ReleaseSmall
```
This builds all variants - you only attach the ones for this release.
### No-performance variant
```sh
zig build noperf -Doptimize=ReleaseSmall
```
Builds `weirdutils_noperf.dll` - the combined DLL with all default modules
except `weirdperformance`. Provided as a release asset for users who experience
issues with the performance module (e.g. Wine compatibility).
### Output locations
| Artifact | Path |
+44 -43
View File
@@ -312,52 +312,53 @@ pub fn build(b: *std.Build) void {
// Convenience step to build all single-module variants
const build_all_step = b.step("all-variants", "Build all DLL variants");
build_all_step.dependOn(b.getInstallStep());
build_all_step.dependOn(&noperf_install.step);
inline for (module_list) |variant_mod| {
if (!variant_mod.default) continue;
@setEvalBranchQuota(10000);
const opts = b.addOptions();
inline for (module_list) |m| {
opts.addOption(bool, "enable_" ++ m.name, std.mem.eql(u8, m.name, variant_mod.name));
inline for (module_list, 0..) |variant_mod, variant_idx| {
if (module_enabled[variant_idx]) {
@setEvalBranchQuota(10000);
const opts = b.addOptions();
inline for (module_list) |m| {
opts.addOption(bool, "enable_" ++ m.name, std.mem.eql(u8, m.name, variant_mod.name));
}
addFileListOptions(b, opts);
const names: []const []const u8 = comptime blk: {
var n: [module_list.len][]const u8 = undefined;
for (module_list, 0..) |m2, mi| n[mi] = m2.name;
const final = n;
break :blk &final;
};
opts.addOption([]const []const u8, "all_module_names", names);
const versions: []const []const u8 = comptime blk: {
var v: [module_list.len][]const u8 = undefined;
for (module_list, 0..) |m2, mi| v[mi] = m2.version;
const final = v;
break :blk &final;
};
opts.addOption([]const []const u8, "all_module_versions", versions);
const variant_lib = b.addLibrary(.{
.name = variant_mod.name,
.linkage = .dynamic,
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "zhook", .module = zhook_mod },
.{ .name = "build_options", .module = opts.createModule() },
},
}),
});
objs.linkFor(variant_lib.root_module, variant_mod.name);
const install_variant = b.addInstallArtifact(variant_lib, .{
.dest_dir = .{ .override = .{ .custom = "variants" } },
});
build_all_step.dependOn(&install_variant.step);
}
addFileListOptions(b, opts);
// Variant builds also need the module name list for addons.zig
const names: []const []const u8 = comptime blk: {
var n: [module_list.len][]const u8 = undefined;
for (module_list, 0..) |m2, mi| n[mi] = m2.name;
const final = n;
break :blk &final;
};
opts.addOption([]const []const u8, "all_module_names", names);
const versions: []const []const u8 = comptime blk: {
var v: [module_list.len][]const u8 = undefined;
for (module_list, 0..) |m2, mi| v[mi] = m2.version;
const final = v;
break :blk &final;
};
opts.addOption([]const []const u8, "all_module_versions", versions);
const variant_lib = b.addLibrary(.{
.name = variant_mod.name,
.linkage = .dynamic,
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "zhook", .module = zhook_mod },
.{ .name = "build_options", .module = opts.createModule() },
},
}),
});
objs.linkFor(variant_lib.root_module, variant_mod.name);
const install_variant = b.addInstallArtifact(variant_lib, .{
.dest_dir = .{ .override = .{ .custom = "variants" } },
});
build_all_step.dependOn(&install_variant.step);
}
}