Embed icons into built executable?

Hello many applications, when they are downloaded have an icon embedded.

is this available in zig? (i’d assume it’s something handled by the build system?)

It depends on operating system you using.

For example on linux icons are specified in .desktop file separately from executable. Im less familiar with windows but it seems like they are indeed embeded.

You can of course integrate it with build system but i would assume most of the time it would be left for people packaging your software for distribution.

It also depends on the framework/libraries you are using for the app. For example, DVUI lets you set the icon and you could do it either with @embedFile into the binary or load it from the filesystem. With the later, you could use the build system to place the file where you expect it.

For final packaging, it will depend on the OS like AndrewKraevskii said.

so for linux: this seems like a tech-debt issue?

my main target is windows though.

Not tech debt, just how the system is designed. You have given very little for us to work with. Without more details on what you are trying to accomplish and what barriers you are running into, we won’t be able to help very well.

i’m just writing a simple image viewer using sdl3