foxnne / pixi

Pixel art editor made with Zig.
https://foxnne.github.io/pixi/
MIT License
773 stars 25 forks source link

Can't build pixi on Win10 #57

Closed msg-programs closed 5 months ago

msg-programs commented 5 months ago

No branch of pixi builds for me, for one reason or another. Here's what I've tried:

git clone https://github.com/foxnne/pixi.git
cd pixi
zig build

Result:

install
└─ pixi
   └─ install pixi
      └─ zig build-exe pixi Debug native 1 errors
C:\Users\msg\AppData\Local\zig\p\122...54a\src\imgui_mach.zig:4:17: error: 'gpu' is not marked 'pub'
const gpu = core.gpu;
            ~~~~^~~~
C:\Users\msg\AppData\Local\zig\p\122...ca3\src\core\main.zig:42:1: note: declared here
const gpu = if (mach.use_sysgpu) sysgpu.sysgpu else @import("../gpu/main.zig");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Checking out 2024.5.0-mach, origin/2024.5.0-mach or origin/master with -f and building again yield the same error. -f is sometimes needed as on some branches, git detects changes in src/animations.zig and src/assets.zig without me changing anything.

Checking out 0.1.0 with -f and building again yields:

B:\Programme etc\pixi\build.zig.zon:1:2: error: missing top-level 'paths' field
.{
 ^

This seems to be a case of zig being too new.

Checking out appdelegate or origin/appdelegate with -f and building again yields:

B:\Programme etc\pixi\build.zig:11:9: error: local variable is never mutated
    var target = b.standardTargetOptions(.{});
        ^~~~~~

This is probably some test branch that isn't supposed to be built.

Is this a case of user error or are none of the branches currently ready to be built? Let me know if more info is needed. Thanks in advance!

OS: Win10 64bit (22H2, Build 19045.4412)
zig: 0.13.0-dev.351+64ef45eb0 (= 2024.5.0-mach)
git: Git for Windows v2.34.1 (ancient, but shouldn't interfere with zig)
foxnne commented 5 months ago

I apologize, I've been doing a lot of work on pixi and my other projects lately and in the effort to get them all updated to 2024.5.0-mach, I missed updating zig-imgui in the build.zig.zon. If you pull the latest commit now on the main branch, can you tell me if it builds? (zig build run, dawn on windows)

msg-programs commented 5 months ago

It builds now. Thanks for the quick fix; no need to apologize!