BenjaminRi / winresource

Create and set windows icons and metadata for executables with a rust build script
MIT License
49 stars 10 forks source link

Support for a multi executable build #8

Open arihant2math opened 1 year ago

arihant2math commented 1 year ago

If someone has a cargo.toml that has multiple output binaries, like this:

[[bin]]
name = "foo"
path = "bin/foo.rs"

[[bin]]
name = "bar"
path = "bin/bar.rs"

[[bin]]
name = "buzz"
path = "bin/buzz.rs"

Then there isn't a way to tell win resource which icon to apply to which binary, short of making a new cargo project. Is this impossible due to build.rs limitations, or can it be accomplished?

BenjaminRi commented 1 year ago

That is a good question. I feel like your use-case makes sense, but the library currently does not support it.

There is an issue about cargo adding support for multiple build scripts: https://github.com/rust-lang/cargo/issues/1430

And there is a PR about this in tauri-winres (a sister fork of the same crate) with someone trying to accomplish the same: https://github.com/tauri-apps/winres/pull/8

Perhaps I'll merge that PR if it looks good.