From da7a077a9fe3c676ab733721b73164dd7d8656b4 Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Mon, 3 Mar 2025 17:00:52 +0800 Subject: [PATCH 1/4] fix: zig master dev --- build.zig | 2 +- build.zig.zon | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index f422af9..33f1bfc 100644 --- a/build.zig +++ b/build.zig @@ -39,7 +39,7 @@ pub fn build(b: *Build) !void { } } - // create a options for command paramter + // create a options for command parameter const flags_options = b.addOptions(); // add option diff --git a/build.zig.zon b/build.zig.zon index ead3d8c..9832cea 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,7 +1,8 @@ .{ - .name = "zig-webui", + .name = .zig_webui, .version = "0.0.1", .minimum_zig_version = "0.12.0", + .fingerprint = 0x95965ed3cdfb8c33, .dependencies = .{ .webui = .{ .url = "https://github.com/webui-dev/webui/archive/c512af1e6c0fe62bdf458e00fefa456ce11a6cee.tar.gz", From 7da52da0172d2cafee1cdec7705f59813f1324a2 Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Thu, 6 Mar 2025 10:17:56 +0800 Subject: [PATCH 2/4] update ci and dependency --- .github/workflows/ci.yml | 2 +- build.zig.zon | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb811bb..8a1e3da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - version: [0.12.0, 0.13.0, ""] + version: [0.14.0, ""] fail-fast: false runs-on: ${{ matrix.os }} steps: diff --git a/build.zig.zon b/build.zig.zon index 9832cea..df638d0 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,11 +5,13 @@ .fingerprint = 0x95965ed3cdfb8c33, .dependencies = .{ .webui = .{ - .url = "https://github.com/webui-dev/webui/archive/c512af1e6c0fe62bdf458e00fefa456ce11a6cee.tar.gz", - .hash = "1220100d77f4adf277ccc7d472952ed8ebef2e766c1225f3fbc56901bf4942e3c4dd", + .url = "https://github.com/webui-dev/webui/archive/5d497e3b839a93736be82107b333b4c0390dea2d.tar.gz", + .hash = "webui-2.5.0-beta.3-pxqD5WZmNgCLmrqQW0U_NI4iq-z706dyreyXr-e7kFmZ", }, }, .paths = .{ - "", + "build.zig", + "build.zig.zon", + "src", }, } From 635764b1838fd16d6c00c7107bb85e86a531f283 Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Thu, 6 Mar 2025 10:23:40 +0800 Subject: [PATCH 3/4] docs: update readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fca2ae..8a76e74 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ Like `zig build run_minimal`, this will build and run the `minimal` example. ## Installation -### Zig `0.12` \ `0.13.0` \ `nightly` +> note: for `0.13.0` and previous version, please use tag `2.5.0-beta.2` + +### Zig `0.14.0` \ `nightly` > To be honest, I don’t recommend using the nightly version because the API of the build system is not yet stable, which means that there may be problems with not being able to build after nightly is updated. From 7f84d825e1e5471b0e4d09e2a3a273b6bb51173a Mon Sep 17 00:00:00 2001 From: Tobias Simetsreiter Date: Fri, 7 Mar 2025 13:33:52 +0100 Subject: [PATCH 4/4] do not fail on missing examples (when used as zig package) --- build.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 33f1bfc..bc10ca5 100644 --- a/build.zig +++ b/build.zig @@ -110,7 +110,13 @@ fn build_examples(b: *Build, optimize: OptimizeMode, target: Build.ResolvedTarge const examples_path = lazy_path.getPath(b); - var iter_dir = try std.fs.openDirAbsolute(examples_path, .{ .iterate = true }); + var iter_dir = std.fs.openDirAbsolute(examples_path, .{ .iterate = true }) + catch |err| { + switch (err) { + error.FileNotFound => return, + else => return err, + } + }; defer iter_dir.close(); var itera = iter_dir.iterate();