Fix zig build and minor improvements (#5702)

- Added zig-pkg directory to gitignore
- Brought min zig version to recent nightly release these improvements
  were completed on
- For linux build, only add rglfw.c if the platform is glfw
- Add a None option to the LinuxDisplayBackend
- Fixed xcode-frameworks dependency and update to using most recent
  commit hash
This commit is contained in:
Mr Josh
2026-03-29 10:38:45 +11:00
committed by GitHub
parent 8c44ea5032
commit 5915584cd6
3 changed files with 9 additions and 4 deletions

1
.gitignore vendored
View File

@@ -118,6 +118,7 @@ GTAGS
# Zig programming language
.zig-cache/
zig-cache/
zig-pkg/
zig-out/
build/
build-*/

View File

@@ -2,7 +2,7 @@ const std = @import("std");
const builtin = @import("builtin");
/// Minimum supported version of Zig
const min_ver = "0.16.0-dev.2349+204fa8959";
const min_ver = "0.16.0-dev.3013+abd131e33";
const emccOutputDir = "zig-out" ++ std.fs.path.sep_str ++ "htmlout" ++ std.fs.path.sep_str;
const emccOutputFile = "index.html";
@@ -264,7 +264,10 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
setDesktopPlatform(raylib, .android);
} else {
try c_source_files.append(b.allocator, "src/rglfw.c");
switch (options.platform) {
.glfw => try c_source_files.append(b.allocator, "src/rglfw.c"),
.rgfw, .sdl, .drm, .android => {},
}
if (options.linux_display_backend == .X11 or options.linux_display_backend == .Both) {
raylib.root_module.addCMacro("_GLFW_X11", "");
@@ -434,6 +437,7 @@ pub const OpenglVersion = enum {
};
pub const LinuxDisplayBackend = enum {
None,
X11,
Wayland,
Both,

View File

@@ -7,8 +7,8 @@
.dependencies = .{
.xcode_frameworks = .{
.url = "https://pkg.machengine.org/xcode-frameworks/9a45f3ac977fd25dff77e58c6de1870b6808c4a7.tar.gz",
.hash = "122098b9174895f9708bc824b0f9e550c401892c40a900006459acf2cbf78acd99bb",
.url = "https://pkg.machengine.org/xcode-frameworks/8a1cfb373587ea4c9bb1468b7c986462d8d4e10e.tar.gz",
.hash = "N-V-__8AALShqgXkvqYU6f__FrA22SMWmi2TXCJjNTO1m8XJ",
.lazy = true,
},
.emsdk = .{