Skip to content

Commit

Permalink
Upgrade zig to 0.14.0-dev.2577+271452d22 aka 2024.11.0-mach
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraVoves committed Jan 19, 2025
1 parent 6267068 commit c278855
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 22 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [linux-large, macos-13-large, windows-large]
os:
# FIXME: Problem with x11 in CI (latest ubuntu). But it works on linux
#- linux-large
- macos-13-large
- windows-large

runs-on: ${{matrix.os}}
name: "Build examples"
timeout-minutes: 15
Expand All @@ -75,6 +80,9 @@ jobs:
with:
submodules: true

# - if: matrix.os == 'linux-large'
# run: sudo apt update && sudo apt install libx11-6

- name: Read .zig-version
id: zigversion
uses: juliangruber/read-file-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .zigversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.0-dev.1911+3bf89f55c
2024.11.0-mach
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Zig binding is licensed by [WTFPL](LICENSE)

## Zig version

Minimal is `0.14.0-dev.1911+3bf89f55c`. But you know try your version and believe.
Minimal is `0.14.0-dev.2577+271452d22` a.k.a `2024.11.0-mach`. But you know try your version and believe.

## Bgfx version

Expand Down
14 changes: 7 additions & 7 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub fn build(b: *std.Build) !void {
bgfx.linkLibrary(bx);
bgfx.linkLibrary(bimg);

bgfx.defineCMacro("BGFX_CONFIG_MULTITHREADED", if (options.multithread) "1" else "0");
bgfx.root_module.addCMacro("BGFX_CONFIG_MULTITHREADED", if (options.multithread) "1" else "0");

bgfx.addIncludePath(b.path("includes"));

Expand All @@ -138,8 +138,8 @@ pub fn build(b: *std.Build) !void {
bgfx.linkFramework("IOKit");
bgfx.linkFramework("OpenGL");
bgfx.linkFramework("QuartzCore");
bgfx.linkFrameworkWeak("Metal");
bgfx.linkFrameworkWeak("MetalKit");
bgfx.linkFramework("Metal");
bgfx.linkFramework("MetalKit");

bgfx.addCSourceFiles(.{
.flags = &mm_options,
Expand Down Expand Up @@ -548,11 +548,11 @@ pub fn build(b: *std.Build) !void {
}

fn bxInclude(b: *std.Build, step: *std.Build.Step.Compile, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) void {
step.defineCMacro("__STDC_LIMIT_MACROS", null);
step.defineCMacro("__STDC_FORMAT_MACROS", null);
step.defineCMacro("__STDC_CONSTANT_MACROS", null);
step.root_module.addCMacro("__STDC_LIMIT_MACROS", "1");
step.root_module.addCMacro("__STDC_FORMAT_MACROS", "1");
step.root_module.addCMacro("__STDC_CONSTANT_MACROS", "1");

step.defineCMacro("BX_CONFIG_DEBUG", if (optimize == .Debug) "1" else "0");
step.root_module.addCMacro("BX_CONFIG_DEBUG", if (optimize == .Debug) "1" else "0");

switch (target.result.os.tag) {
.freebsd => step.addIncludePath(b.path("libs/bx/include/compat/freebsd")),
Expand Down
2 changes: 1 addition & 1 deletion examples/00-minimal/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub fn main() anyerror!u8 {
//
// Create window
//
zglfw.windowHintTyped(.client_api, .no_api);
zglfw.windowHint(.client_api, .no_api);
const window = try zglfw.Window.create(WIDTH, HEIGHT, "ZBgfx - minimal", null);
defer window.destroy();
window.setSizeLimits(400, 400, -1, -1);
Expand Down
2 changes: 1 addition & 1 deletion examples/01-zgui/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn main() anyerror!u8 {
//
// Create window
//
zglfw.windowHintTyped(.client_api, .no_api);
zglfw.windowHint(.client_api, .no_api);
const window = try zglfw.Window.create(WIDTH, HEIGHT, "ZBgfx - zgui", null);
defer window.destroy();
window.setSizeLimits(400, 400, -1, -1);
Expand Down
2 changes: 1 addition & 1 deletion examples/02-runtime-shaderc/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub fn main() anyerror!u8 {
//
// Create window
//
zglfw.windowHintTyped(.client_api, .no_api);
zglfw.windowHint(.client_api, .no_api);
const window = try zglfw.Window.create(WIDTH, HEIGHT, "ZBgfx - runtime shaderc", null);
defer window.destroy();
window.setSizeLimits(400, 400, -1, -1);
Expand Down
2 changes: 1 addition & 1 deletion examples/03-debugdraw/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn main() anyerror!u8 {
//
// Create window
//
zglfw.windowHintTyped(.client_api, .no_api);
zglfw.windowHint(.client_api, .no_api);
const window = try zglfw.Window.create(WIDTH, HEIGHT, "ZBgfx - debugdraw", null);
defer window.destroy();
window.setSizeLimits(400, 400, -1, -1);
Expand Down
16 changes: 8 additions & 8 deletions examples/build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
.zbgfx = .{ .path = "../" },

.zglfw = .{
.url = "https://github.com/zig-gamedev/zglfw/archive/d18b30438d630d44e50aa30e2300a96c4f4ff67d.tar.gz",
.hash = "1220074231fcf6556b27e0ac6a3b22a19062c0c4bc3fd77c6fdcede15303af824c27",
.url = "https://github.com/zig-gamedev/zglfw/archive/1c8f7de20bb01076c94582e22d9393a8d6bf30fe.tar.gz",
.hash = "1220aac39fd472cb7a70b1987249f3ac73799e702ff27516d799e1d5e566097f0a8b",
},

.zmath = .{
.url = "https://github.com/zig-gamedev/zmath/archive/fb075f0f2f90d6d938a5959a3a79700cdec155c2.tar.gz",
.hash = "1220081d55b58b968d953db1afc2fb01b2f5733929144e69522461ce25fa6450d84e",
.zgui = .{
.url = "https://github.com/zig-gamedev/zgui/archive/c16629e67e7bc1bca9a5c67d5123874c75f5374d.tar.gz",
.hash = "12202063c813c1b95affa57d83a6a4817d9a4114bd9db052f87740f81b1843ceca09",
},

.zgui = .{
.url = "https://github.com/zig-gamedev/zgui/archive/d23ed60a659d8c9c6d664b2e9bd78fae1675154e.tar.gz",
.hash = "1220ffffdf1d0d2aca86a1ea31ba17ee48090b38cefb2a8487d2d801eb1fdd78becb",
.zmath = .{
.url = "https://github.com/zig-gamedev/zmath/archive/f40bb8a935b4878c707c3fccfd5c234cfcb43bf2.tar.gz",
.hash = "1220c1ab7d1e49106f59c6adb4004befdb95525a72056364a663757aaa1365aae64a",
},
},
}

0 comments on commit c278855

Please sign in to comment.