Skip to content

Commit ca91d97

Browse files
committed
minor fixes: lazypath updated to zig v0.13.0 compat
1 parent a3c5107 commit ca91d97

File tree

6 files changed

+14
-29
lines changed

6 files changed

+14
-29
lines changed

.github/workflows/Linux.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
with:
1111
submodules: recursive
1212
fetch-depth: 0
13-
- uses: goto-bus-stop/setup-zig@v2
14-
with:
15-
version: master
13+
- uses: mlugg/setup-zig@v1
1614

1715
- name: Install buildtools
1816
run: |

.github/workflows/MSYS.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,13 @@ jobs:
1414
]
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
with:
1919
path: temp
2020
submodules: recursive
2121
fetch-depth: 0
2222

23-
- name: Install zig
24-
uses: goto-bus-stop/setup-zig@v2
25-
with:
26-
version: master
27-
23+
- uses: mlugg/setup-zig@v1
2824
- uses: msys2/setup-msys2@v2
2925
with:
3026
msystem: ${{ matrix.msystem }}

.github/workflows/MacOS.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,14 @@ jobs:
66
build:
77
runs-on: macos-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v4
1010
with:
1111
submodules: recursive
1212
fetch-depth: 0
13-
- uses: goto-bus-stop/setup-zig@v2
14-
with:
15-
version: master
16-
13+
- uses: mlugg/setup-zig@v1
1714
- name: Install
1815
run: brew install cmake
19-
20-
- name: Install Qt
21-
uses: jurplel/install-qt-action@v3
16+
- uses: jurplel/install-qt-action@v3
2217
with:
2318
version: 5.15.2
2419
dir: '${{ github.workspace }}/build/'

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
zig-*
2-
.ccls-cache
3-
*.core
1+
*zig-*

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Bindings are based on [DOtherSide](https://github.com/filcuc/dotherside) C bindi
1313
All software required for building.
1414

1515
- Qt 5.15 or higher
16-
- Zig v0.12.0 or higher
16+
- Zig v0.12.0, 0.13.0 or master
1717
- CMake v3.2 or higher (DOtherSide build)
1818

1919
### Question

build.zig

+5-7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ pub fn build(b: *std.Build) !void {
66

77
// Module
88
_ = b.addModule("Qt", .{
9-
.root_source_file = .{
10-
.path = "src/Qt.zig",
11-
},
9+
.root_source_file = b.path("src/Qt.zig"),
1210
});
1311

1412
// Note: If it is not necessary to compile DOtherSide library, please comment on this line.
@@ -68,7 +66,7 @@ pub fn build(b: *std.Build) !void {
6866
fn makeExample(b: *std.Build, src: BuildInfo) !void {
6967
const example = b.addExecutable(.{
7068
.name = src.filename(),
71-
.root_source_file = .{ .path = src.path },
69+
.root_source_file = b.path(src.path),
7270
.optimize = src.optimize,
7371
.target = src.target,
7472
});
@@ -79,7 +77,7 @@ fn makeExample(b: *std.Build, src: BuildInfo) !void {
7977
}
8078

8179
example.root_module.addImport("Qt", b.modules.get("Qt").?);
82-
example.addLibraryPath(.{ .path = "zig-cache/lib" });
80+
example.addLibraryPath(b.path(".zig-cache/lib"));
8381

8482
if (example.rootModuleTarget().os.tag == .windows) {
8583
example.want_lto = false;
@@ -107,15 +105,15 @@ pub fn cmakeBuild(b: *std.Build) *std.Build.Step.Run {
107105
const DOtherSide_configure = b.addSystemCommand(&[_][]const u8{
108106
"cmake",
109107
"-B",
110-
"zig-cache",
108+
".zig-cache",
111109
"-S",
112110
dotherside,
113111
"-DCMAKE_BUILD_TYPE=RelMinSize",
114112
});
115113
const DOtherSide_build = b.addSystemCommand(&[_][]const u8{
116114
"cmake",
117115
"--build",
118-
"zig-cache",
116+
".zig-cache",
119117
"--parallel",
120118
});
121119

0 commit comments

Comments
 (0)