Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shdc running - changing filemode #38

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.{
.name = "sokol-d",
.version = "0.1.5",
.version = "0.1.6",
.min_zig_version = "0.13.0",
.paths = .{
"src",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion dub.sdl
Original file line number Diff line number Diff line change
@@ -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"
Expand Down