marlersoft / zigwin32gen

Generates Complete Zig bindings for Win32. See https://github.com/marlersoft/zigwin32 for the bindings themselves.
108 stars 17 forks source link

feat: better support for zig versions #32

Closed weskoerber closed 4 months ago

weskoerber commented 5 months ago

Follow-up from https://github.com/marlersoft/zigwin32/pull/31.

Tired-Fox commented 5 months ago

v0.12.0 also requires b.path to be used for root_source_file

weskoerber commented 5 months ago

v0.12.0 also requires b.path to be used for root_source_file

It's technically not required but it is deprecated (see 0.12.0 release notes here). This change was done in https://github.com/ziglang/zig/pull/19597.

With that said, the switch could definitely be simplified as 0.12.0 supports b.path(). We could just check if the minor version is 11 and use the path field, otherwise use b.path().

marler8997 commented 4 months ago

I incorporated the change in this commit: https://github.com/marlersoft/zigwin32gen/commit/db32e7c0cb3ed5645b4a9a2bf5814e88def0a89b

However I dropped support for 0.11.0, people on that zig version can still use old versions of zigwin32.