diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7b1f55..0fc336d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,8 @@ jobs: dub build :imgui dub build :droptest + - name: (Zig) Build Shaders + run: zig build shaders - name: (Zig) Running Test if: runner.os != 'Windows' run: zig build test -DzigCC diff --git a/build.zig b/build.zig index 218f2db..1b1ba07 100644 --- a/build.zig +++ b/build.zig @@ -719,6 +719,15 @@ fn buildShaders(b: *Build, target: Build.ResolvedTarget) void { const shdc_step = b.step("shaders", "Compile shaders (needs ../sokol-tools-bin)"); const glsl = if (target.result.isDarwin()) "glsl410" else "glsl430"; const slang = glsl ++ ":metal_macos:hlsl5:glsl300es:wgsl"; + if (builtin.os.tag == .linux or builtin.os.tag == .macos) { + const file = std.fs.openFileAbsolute(shdc_path, .{}) catch |err| { + std.debug.panic("failed to open {s}: {s}", .{ shdc_path, @errorName(err) }); + }; + defer file.close(); + file.chmod(0o755) catch |err| { + std.debug.panic("failed to chmod {s}: {s}", .{ shdc_path, @errorName(err) }); + }; + } inline for (shaders) |shader| { const cmd = b.addSystemCommand(&.{ shdc_path, diff --git a/build.zig.zon b/build.zig.zon index 48ccf44..528c748 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,6 @@ .{ .name = "sokol-d", - .version = "0.1.5", + .version = "0.1.6", .min_zig_version = "0.13.0", .paths = .{ "src", @@ -20,8 +20,8 @@ .hash = "12207f4440f54bfe95e03ec5e54019e5663a5e38b5245cc993cfc814b03eb2f3e894", }, .emsdk = .{ - .url = "git+https://github.com/emscripten-core/emsdk#3.1.68", - .hash = "122084d460283a7f621f64817c12a4689dacda8c8b02cf9c46747a3572c2166bee83", + .url = "git+https://github.com/emscripten-core/emsdk#3.1.71", + .hash = "12201d024e47d97dea4d1d6024a9cf1b35ca8be8e4fa1a0ecf6ee9080e479467183a", }, .shdc = .{ .url = "git+https://github.com/floooh/sokol-tools-bin#9d15a9b3f39624c32faebeaf6284e6d64209f988", diff --git a/dub.sdl b/dub.sdl index 620ebd9..5e5b4d7 100644 --- a/dub.sdl +++ b/dub.sdl @@ -1,5 +1,5 @@ name "sokol-d" -version "0.1.5" +version "0.1.6" description "D bindings for sokol" authors "Matheus Catarino França" "Andre Weissflog" copyright "Copyright 2023-2024 - Matheus Catarino França"