chore: update depdendencies
ZBA now specifically targets Zig v0.11.0-dev.3395+1e7dcaa3a
This commit is contained in:
parent
3040a9f45c
commit
33dd96b45c
|
@ -20,7 +20,7 @@ jobs:
|
|||
steps:
|
||||
- uses: goto-bus-stop/setup-zig@v2
|
||||
with:
|
||||
version: master
|
||||
version: 0.11.0-dev.3395+1e7dcaa3a
|
||||
- name: prepare-linux
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
|
@ -54,6 +54,6 @@ jobs:
|
|||
submodules: recursive
|
||||
- uses: goto-bus-stop/setup-zig@v2
|
||||
with:
|
||||
version: master
|
||||
version: 0.11.0-dev.3395+1e7dcaa3a
|
||||
- run: zig fmt src/**/*.zig
|
||||
|
|
@ -1,15 +1,6 @@
|
|||
[submodule "lib/SDL.zig"]
|
||||
path = lib/SDL.zig
|
||||
url = https://github.com/MasterQ32/SDL.zig
|
||||
[submodule "lib/zig-clap"]
|
||||
path = lib/zig-clap
|
||||
url = https://github.com/Hejsil/zig-clap
|
||||
[submodule "lib/known-folders"]
|
||||
path = lib/known-folders
|
||||
url = https://github.com/ziglibs/known-folders
|
||||
[submodule "lib/zig-datetime"]
|
||||
path = lib/zig-datetime
|
||||
url = https://github.com/frmdstryr/zig-datetime
|
||||
[submodule "lib/zig-toml"]
|
||||
path = lib/zig-toml
|
||||
url = https://github.com/aeronavery/zig-toml
|
||||
|
@ -19,9 +10,6 @@
|
|||
[submodule "lib/zgui"]
|
||||
path = lib/zgui
|
||||
url = https://git.musuka.dev/paoda/zgui
|
||||
[submodule "lib/nfd-zig"]
|
||||
path = lib/nfd-zig
|
||||
url = https://github.com/fabioarnold/nfd-zig
|
||||
[submodule "lib/zba-util"]
|
||||
path = lib/zba-util
|
||||
url = https://git.musuka.dev/paoda/zba-util.git
|
||||
|
|
45
build.zig
45
build.zig
|
@ -4,7 +4,6 @@ const builtin = @import("builtin");
|
|||
const Sdk = @import("lib/SDL.zig/Sdk.zig");
|
||||
const gdbstub = @import("lib/zba-gdbstub/build.zig");
|
||||
const zgui = @import("lib/zgui/build.zig");
|
||||
const nfd = @import("lib/nfd-zig/build.zig");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
// Minimum Zig Version
|
||||
|
@ -26,45 +25,31 @@ pub fn build(b: *std.Build) void {
|
|||
|
||||
exe.setMainPkgPath("."); // Necessary so that src/main.zig can embed example.toml
|
||||
|
||||
// Known Folders (%APPDATA%, XDG, etc.)
|
||||
exe.addAnonymousModule("known_folders", .{ .source_file = .{ .path = "lib/known-folders/known-folders.zig" } });
|
||||
exe.addModule("known_folders", b.dependency("known-folders", .{}).module("known-folders")); // https://github.com/ziglibs/known-folders
|
||||
exe.addModule("datetime", b.dependency("zig-datetime", .{}).module("zig-datetime")); // https://github.com/frmdstryr/zig-datetime
|
||||
exe.addModule("clap", b.dependency("zig-clap", .{}).module("clap")); // https://github.com/Hejsil/zig-clap
|
||||
exe.addModule("gdbstub", gdbstub.getModule(b)); // https://git.musuka.dev/paoda/zba-gdbstub
|
||||
|
||||
// DateTime Library
|
||||
exe.addAnonymousModule("datetime", .{ .source_file = .{ .path = "lib/zig-datetime/src/main.zig" } });
|
||||
// https://github.com/fabioarnold/nfd-zig
|
||||
const nfd_dep = b.dependency("nfd", .{ .target = target, .optimize = optimize });
|
||||
exe.linkLibrary(nfd_dep.artifact("nfd"));
|
||||
exe.addModule("nfd", nfd_dep.module("nfd"));
|
||||
|
||||
// Bitfield type from FlorenceOS: https://github.com/FlorenceOS/
|
||||
exe.addAnonymousModule("bitfield", .{ .source_file = .{ .path = "lib/bitfield.zig" } });
|
||||
|
||||
// Argument Parsing Library
|
||||
exe.addAnonymousModule("clap", .{ .source_file = .{ .path = "lib/zig-clap/clap.zig" } });
|
||||
|
||||
// TOML Library
|
||||
exe.addAnonymousModule("toml", .{ .source_file = .{ .path = "lib/zig-toml/src/toml.zig" } });
|
||||
|
||||
// OpenGL 3.3 Bindings
|
||||
exe.addAnonymousModule("gl", .{ .source_file = .{ .path = "lib/gl.zig" } });
|
||||
|
||||
// ZBA utility code
|
||||
exe.addAnonymousModule("zba-util", .{ .source_file = .{ .path = "lib/zba-util/src/lib.zig" } });
|
||||
|
||||
// gdbstub
|
||||
exe.addModule("gdbstub", gdbstub.getModule(b));
|
||||
|
||||
// NativeFileDialog(ue) Bindings
|
||||
exe.linkLibrary(nfd.makeLib(b, target, optimize));
|
||||
exe.addModule("nfd", nfd.getModule(b));
|
||||
|
||||
// Zig SDL Bindings: https://github.com/MasterQ32/SDL.zig
|
||||
// https://github.com/MasterQ32/SDL.zig
|
||||
const sdk = Sdk.init(b, null);
|
||||
sdk.link(exe, .dynamic);
|
||||
exe.addModule("sdl2", sdk.getNativeModule());
|
||||
|
||||
// Dear ImGui bindings
|
||||
|
||||
// https://git.musuka.dev/paoda/zgui
|
||||
// .shared option should stay in sync with SDL.zig call above where true == .dynamic, and false == .static
|
||||
const zgui_pkg = zgui.package(b, target, optimize, .{ .options = .{ .backend = .sdl2_opengl3, .shared = true } });
|
||||
zgui_pkg.link(exe);
|
||||
|
||||
exe.addAnonymousModule("bitfield", .{ .source_file = .{ .path = "lib/bitfield.zig" } }); // https://github.com/FlorenceOS/
|
||||
exe.addAnonymousModule("toml", .{ .source_file = .{ .path = "lib/zig-toml/src/toml.zig" } }); // https://github.com/aeronavery/zig-toml
|
||||
exe.addAnonymousModule("gl", .{ .source_file = .{ .path = "lib/gl.zig" } }); // https://github.com/MasterQ32/zig-opengl
|
||||
exe.addAnonymousModule("zba-util", .{ .source_file = .{ .path = "lib/zba-util/src/lib.zig" } }); // https://git.musuka.dev/paoda/zba-util
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
.{
|
||||
.name = "zba",
|
||||
.version = "0.1.0",
|
||||
.dependencies = .{
|
||||
.nfd = .{
|
||||
.url = "https://github.com/fabioarnold/nfd-zig/archive/8520a6807f046a23ecf3143e22fc49d2a9d1c189.tar.gz",
|
||||
.hash = "122089e0f5ab5e4729a09aed48d721b98ed2b362923ead797c6af3b54ef9a725203f",
|
||||
},
|
||||
.@"known-folders" = .{
|
||||
.url = "https://github.com/ziglibs/known-folders/archive/d13ba6137084e55f873f6afb67447fe8906cc951.tar.gz",
|
||||
.hash = "122028c00915d9b37296059be8a3883c718dbb5bd174350caedf152fed1f46f99607",
|
||||
},
|
||||
.@"zig-datetime" = .{
|
||||
.url = "https://github.com/frmdstryr/zig-datetime/archive/e4a2bc92b3771a745145c9a6961f0b5277a48335.tar.gz",
|
||||
.hash = "12209fc05ecb5add8f87152f03f99243a419c9dd5a04c6b4a359d6b4f13426fede0c",
|
||||
},
|
||||
.@"zig-clap" = .{
|
||||
.url = "https://github.com/Hejsil/zig-clap/archive/a1b7a7301b0006bb4c8daaaf5ade8a6df8ec13ae.tar.gz",
|
||||
.hash = "12205aeff59f41f96033d280471730c171c9a825d8758743249bed834e1590f593e3",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit e6f9576eab562140632806e57539ef658e62fed9
|
||||
Subproject commit fbe5f599c65b7a5642990443b2a686d1c53a4985
|
|
@ -1 +0,0 @@
|
|||
Subproject commit d13ba6137084e55f873f6afb67447fe8906cc951
|
|
@ -1 +0,0 @@
|
|||
Subproject commit d14635d112531292dfa46476d0f7f8015669b626
|
2
lib/zgui
2
lib/zgui
|
@ -1 +1 @@
|
|||
Subproject commit 281f95b4606d449b7877f13cd5f408790b410491
|
||||
Subproject commit 5149d4b1def740194cf627d8d68bce18024dc7ce
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 05a50fe7fe833059db8550c34bc69fedd8bb0af8
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 46ba305a45a30747066d29421bcac0699254d4ae
|
Loading…
Reference in New Issue