chore: update depdendencies
ZBA now specifically targets Zig v0.11.0-dev.3395+1e7dcaa3a
This commit is contained in:
parent
3040a9f45c
commit
f534aac544
|
@ -20,7 +20,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: goto-bus-stop/setup-zig@v2
|
- uses: goto-bus-stop/setup-zig@v2
|
||||||
with:
|
with:
|
||||||
version: master
|
version: 0.11.0-dev.3395+1e7dcaa3a
|
||||||
- name: prepare-linux
|
- name: prepare-linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
|
@ -54,6 +54,6 @@ jobs:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: goto-bus-stop/setup-zig@v2
|
- uses: goto-bus-stop/setup-zig@v2
|
||||||
with:
|
with:
|
||||||
version: master
|
version: 0.11.0-dev.3395+1e7dcaa3a
|
||||||
- run: zig fmt src/**/*.zig
|
- run: zig fmt src/**/*.zig
|
||||||
|
|
|
@ -1,27 +1,9 @@
|
||||||
[submodule "lib/SDL.zig"]
|
[submodule "lib/SDL.zig"]
|
||||||
path = lib/SDL.zig
|
path = lib/SDL.zig
|
||||||
url = https://github.com/MasterQ32/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"]
|
[submodule "lib/zig-toml"]
|
||||||
path = lib/zig-toml
|
path = lib/zig-toml
|
||||||
url = https://github.com/aeronavery/zig-toml
|
url = https://github.com/aeronavery/zig-toml
|
||||||
[submodule "lib/zba-gdbstub"]
|
|
||||||
path = lib/zba-gdbstub
|
|
||||||
url = https://git.musuka.dev/paoda/zba-gdbstub
|
|
||||||
[submodule "lib/zgui"]
|
[submodule "lib/zgui"]
|
||||||
path = lib/zgui
|
path = lib/zgui
|
||||||
url = https://git.musuka.dev/paoda/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
|
|
||||||
|
|
46
build.zig
46
build.zig
|
@ -2,9 +2,7 @@ const std = @import("std");
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
|
|
||||||
const Sdk = @import("lib/SDL.zig/Sdk.zig");
|
const Sdk = @import("lib/SDL.zig/Sdk.zig");
|
||||||
const gdbstub = @import("lib/zba-gdbstub/build.zig");
|
|
||||||
const zgui = @import("lib/zgui/build.zig");
|
const zgui = @import("lib/zgui/build.zig");
|
||||||
const nfd = @import("lib/nfd-zig/build.zig");
|
|
||||||
|
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
// Minimum Zig Version
|
// Minimum Zig Version
|
||||||
|
@ -26,45 +24,31 @@ pub fn build(b: *std.Build) void {
|
||||||
|
|
||||||
exe.setMainPkgPath("."); // Necessary so that src/main.zig can embed example.toml
|
exe.setMainPkgPath("."); // Necessary so that src/main.zig can embed example.toml
|
||||||
|
|
||||||
// Known Folders (%APPDATA%, XDG, etc.)
|
exe.addModule("known_folders", b.dependency("known-folders", .{}).module("known-folders")); // https://github.com/ziglibs/known-folders
|
||||||
exe.addAnonymousModule("known_folders", .{ .source_file = .{ .path = "lib/known-folders/known-folders.zig" } });
|
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", b.dependency("zba-gdbstub", .{}).module("gdbstub")); // https://git.musuka.dev/paoda/zba-gdbstub
|
||||||
|
exe.addModule("zba-util", b.dependency("zba-util", .{}).module("zba-util")); // https://git.musuka.dev/paoda/zba-util
|
||||||
|
|
||||||
// DateTime Library
|
// https://github.com/fabioarnold/nfd-zig
|
||||||
exe.addAnonymousModule("datetime", .{ .source_file = .{ .path = "lib/zig-datetime/src/main.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/
|
// https://github.com/MasterQ32/SDL.zig
|
||||||
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
|
|
||||||
const sdk = Sdk.init(b, null);
|
const sdk = Sdk.init(b, null);
|
||||||
sdk.link(exe, .dynamic);
|
sdk.link(exe, .dynamic);
|
||||||
exe.addModule("sdl2", sdk.getNativeModule());
|
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
|
// .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 } });
|
const zgui_pkg = zgui.package(b, target, optimize, .{ .options = .{ .backend = .sdl2_opengl3, .shared = true } });
|
||||||
zgui_pkg.link(exe);
|
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
|
||||||
|
|
||||||
b.installArtifact(exe);
|
b.installArtifact(exe);
|
||||||
|
|
||||||
const run_cmd = b.addRunArtifact(exe);
|
const run_cmd = b.addRunArtifact(exe);
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
.{
|
||||||
|
.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",
|
||||||
|
},
|
||||||
|
.@"zba-gdbstub" = .{
|
||||||
|
.url = "https://git.musuka.dev/paoda/zba-gdbstub/archive/39a4260ffd83bae7bb44bb098872c96382fb5ba3.tar.gz",
|
||||||
|
.hash = "12208d44e3ab611b523f66e2d6fdb0283c3ee498a6a9fe4080c6d252ee8469059f1c",
|
||||||
|
},
|
||||||
|
.@"zba-util" = .{
|
||||||
|
.url = "https://git.musuka.dev/paoda/zba-util/archive/e616cf09e53f5c402c8f040d14baa211683e70e3.tar.gz",
|
||||||
|
.hash = "1220b80b2c0989dcc47275ab9d7d70da4858ef3c1fe1f934e8d838e65028127f6ef3",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
Subproject commit e6f9576eab562140632806e57539ef658e62fed9
|
Subproject commit fbe5f599c65b7a5642990443b2a686d1c53a4985
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d13ba6137084e55f873f6afb67447fe8906cc951
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d14635d112531292dfa46476d0f7f8015669b626
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 215e053b9ace6e6e561b64cb06e2516021f76897
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 77d11c9903d7f4a3a31ef59fc954421d7dfa0eb1
|
|
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