mirror of
https://git.xeondev.com/HonkaiSlopRail/sr-launcher.git
synced 2026-01-02 20:06:07 +08:00
Supports CNBETA 3.7.51
This commit is contained in:
35
build.zig
Normal file
35
build.zig
Normal file
@@ -0,0 +1,35 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
const target = b.standardTargetOptions(.{ .default_target = .{ .os_tag = .windows } });
|
||||
|
||||
const launcher = b.addExecutable(.{
|
||||
.name = "cyrene",
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("injector.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
|
||||
const dll = b.addLibrary(.{
|
||||
.name = "cyrene",
|
||||
.linkage = .dynamic,
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/root.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.imports = &.{.{ .name = "zigzag", .module = b.dependency("zigzag", .{}).module("zigzag") }},
|
||||
}),
|
||||
});
|
||||
|
||||
const assets = &.{"sdk_public_key.xml"};
|
||||
|
||||
inline for (assets) |asset| {
|
||||
dll.root_module.addAnonymousImport(asset, .{ .root_source_file = b.path("assets/" ++ asset) });
|
||||
}
|
||||
|
||||
b.installArtifact(launcher);
|
||||
b.installArtifact(dll);
|
||||
}
|
||||
Reference in New Issue
Block a user