-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zig logo the the compiler binary on Windows #23395
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about doing this sort of thing as well when first adding support for Windows resources 🙃.
The CI failure is due to zig2 disabling support for win32 resources (and all JIT commands). The easy solution would be to only add the resource file when compiling a stage4 compiler, but unsure how to go about that at the moment.
This should probably come with a |
@@ -0,0 +1 @@ | |||
MAINICON ICON "zig-mark.ico" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Missing a trailing newline.
I still haven't figured out a way to know which stage we are currently executing, in order to skip the |
The |
Unless I'm thinking about it wrong, it's the dev environment of the zig binary that's being used to compile that's relevant, which can't currently be queried by I guess you could spawn EDIT: Spawning |
Ah, I misunderstood the issue. |
Well, messing with |
When would the value be greater than 11? EDIT: actually that wouldn't work obviously, since we byte-compare stage3 and stage4. Do we really need to test adding it in CI? |
Yeah... the documentation doesn't say. There are no enums for stage3 or 4, I just assumed these stages would set a different value... |
They do not, since the zig backend remains the same. |
I don't think this is possible. Stages 3 and 4 need to be identical. Stage 3 is compiled from stage 2. Stage 2 doesn't support resources. |
On Windows, an image can be embedded into an executable and displayed by the operating system. This PR adds the zig logo to the zig binary. This gives Zig a more polished look.


This is how it looks in light and dark mode:
The logo was taken from here. The source svg file was transformed into a .ico file via svg2ico.com.
The .ico file is an archive. It contains 4 renditions of the logo as PNG files, for different sizes: 16x16 pixels, 32x32, 48x48 and 256x256, which are the sizes recommended by microsoft.