From 60dfe0ae6036947c3ffbd69b1dacded0d2155a40 Mon Sep 17 00:00:00 2001 From: Peter Li Date: Sat, 1 Nov 2025 15:19:03 -0700 Subject: [PATCH] compiling platform now --- engine/platform/build.zig | 1 + engine/platform/build.zig.zon | 1 + engine/platform/src/platform.zig | 4 ++-- lib/{filewatch => watcher}/build.zig | 0 lib/{filewatch => watcher}/build.zig.zon | 0 lib/{filewatch => watcher}/src/include/FileWatch.hpp | 0 lib/{filewatch => watcher}/src/watcher.cpp | 0 lib/{filewatch => watcher}/src/watcher.zig | 0 lib/{filewatch => watcher}/src/watcherstub.cpp | 0 lib/{filewatch => watcher}/tests/test.zig | 0 10 files changed, 4 insertions(+), 2 deletions(-) rename lib/{filewatch => watcher}/build.zig (100%) rename lib/{filewatch => watcher}/build.zig.zon (100%) rename lib/{filewatch => watcher}/src/include/FileWatch.hpp (100%) rename lib/{filewatch => watcher}/src/watcher.cpp (100%) rename lib/{filewatch => watcher}/src/watcher.zig (100%) rename lib/{filewatch => watcher}/src/watcherstub.cpp (100%) rename lib/{filewatch => watcher}/tests/test.zig (100%) diff --git a/engine/platform/build.zig b/engine/platform/build.zig index 55443d7..c790a73 100644 --- a/engine/platform/build.zig +++ b/engine/platform/build.zig @@ -5,6 +5,7 @@ const dependencyList = [_][]const u8{ "core", "sdl3", "nfd", + "watcher", }; pub fn build(b: *std.Build) void { diff --git a/engine/platform/build.zig.zon b/engine/platform/build.zig.zon index 1562a0a..64b1480 100644 --- a/engine/platform/build.zig.zon +++ b/engine/platform/build.zig.zon @@ -5,6 +5,7 @@ .core = .{ .path = "../core" }, .sdl3 = .{ .path = "../../lib/sdl3" }, .nfd = .{ .path = "../../lib/nfd" }, + .watcher = .{ .path = "../../lib/watcher" }, .shaderTypes = .{ .path = "../../lib/sdl3/shaderTypes" }, }, .paths = .{ diff --git a/engine/platform/src/platform.zig b/engine/platform/src/platform.zig index 237987d..5bf018b 100644 --- a/engine/platform/src/platform.zig +++ b/engine/platform/src/platform.zig @@ -56,7 +56,7 @@ pub fn getMouseVisible() bool { pub fn watchPath(path: []const u8) void { watchPathPacker(core.fs(), path) catch { - core.engine_log("unable to set up watch on path", .{path}); + core.engine_log("unable to set up watch on path {s}", .{path}); }; } @@ -89,7 +89,7 @@ pub fn start_module(spec: *core.SpecVariantMap, args: anytype, allocator: std.me return; } - core.getModuleLoader().watchInitializedFn = watchModules; + core.getModuleLoader().watchInitializeFn = watchModules; const parameters = windowing.PlatformParams.init(); diff --git a/lib/filewatch/build.zig b/lib/watcher/build.zig similarity index 100% rename from lib/filewatch/build.zig rename to lib/watcher/build.zig diff --git a/lib/filewatch/build.zig.zon b/lib/watcher/build.zig.zon similarity index 100% rename from lib/filewatch/build.zig.zon rename to lib/watcher/build.zig.zon diff --git a/lib/filewatch/src/include/FileWatch.hpp b/lib/watcher/src/include/FileWatch.hpp similarity index 100% rename from lib/filewatch/src/include/FileWatch.hpp rename to lib/watcher/src/include/FileWatch.hpp diff --git a/lib/filewatch/src/watcher.cpp b/lib/watcher/src/watcher.cpp similarity index 100% rename from lib/filewatch/src/watcher.cpp rename to lib/watcher/src/watcher.cpp diff --git a/lib/filewatch/src/watcher.zig b/lib/watcher/src/watcher.zig similarity index 100% rename from lib/filewatch/src/watcher.zig rename to lib/watcher/src/watcher.zig diff --git a/lib/filewatch/src/watcherstub.cpp b/lib/watcher/src/watcherstub.cpp similarity index 100% rename from lib/filewatch/src/watcherstub.cpp rename to lib/watcher/src/watcherstub.cpp diff --git a/lib/filewatch/tests/test.zig b/lib/watcher/tests/test.zig similarity index 100% rename from lib/filewatch/tests/test.zig rename to lib/watcher/tests/test.zig