Skip to content

How do you set the binary file icon? #2026

Answered by nozwock
MrTanoshii asked this question in Q&A
Discussion options

You must be logged in to vote

This is not really an egui question but Icon resources for windows binaries can easily be set using the winres crate.

Though for Rust 1.61 and above, the crate doesn't work, so you'll have to use a fork containing the fix instead.
So just add the forked winres as a build dependency in your Cargo.toml:

[build-dependencies]
winres = { git = "https://github.com/Nilstrieb/winres", branch = "linking-flags" }

After that, you'll also need to add winres metadata section to your Cargo.toml, see winres for details.
The section can be left completely empty if you want though, I had to add it since winres fails for me if I don't have its section in the Cargo.toml.

Then, at last you'll need to add a b…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MrTanoshii
Comment options

Answer selected by MrTanoshii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants