winresource icon indicating copy to clipboard operation
winresource copied to clipboard

Add multi executable support

Open arihant2math opened this issue 1 year ago • 1 comments

Resolves #8. Its a port of https://github.com/tauri-apps/winres/pull/8.

arihant2math avatar Jun 18 '23 02:06 arihant2math

Thank you for the PR. I reviewed it and, unfortunately, it does not seem to work with the GNU toolchain as mentioned in https://github.com/tauri-apps/winres/pull/8#issuecomment-1531024685 .

  = note: x86_64-w64-mingw32-gcc: error: example-b.o: No such file or directory
          x86_64-w64-mingw32-gcc: error: unrecognized command-line option '--whole-archive'; did you mean '--whole-file'?

I really like the idea of supporting multiple binaries, but I cannot merge this in good conscience as it will lead to toolchain-dependent breakage.

Additionally, a minor blemish: A variable is overwritten without being used, which the compiler warns about:

warning: unused variable: `rc`
   --> lib.rs:694:13
    |
694 |         let rc = output.join("resource.rc");
    |             ^^ help: if this is intentional, prefix it with an underscore: `_rc`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: `winresource` (lib) generated 1 warning (run `cargo fix --lib -p winresource` to apply 1 suggestion)
    Finished dev [unoptimized + debuginfo] target(s) in 3.37s

The line could simply be omitted:

https://github.com/BenjaminRi/winresource/blob/56707dc112e525c37890fdd174da45be6f4d887d/lib.rs#L694

BenjaminRi avatar Jun 18 '23 12:06 BenjaminRi