volks73 / cargo-wix

A cargo subcommand to build Windows installers for rust projects using the WiX Toolset
https://volks73.github.io/cargo-wix
Apache License 2.0
306 stars 25 forks source link

package.metadata.wix.product-name doesn't work #270

Open nazar-pc opened 9 months ago

nazar-pc commented 9 months ago

Setting it in Cargo.toml has no effect, only CLI option works right now.

I think some fallback like this is necessary for product-name: https://github.com/volks73/cargo-wix/blob/0a88f0ce2e8c8a00a66730f1921500163f4a3cb7/src/print/wxs.rs#L699

volks73 commented 9 months ago

Thank you for the issue. This is most likely a bug, either in the documentation for suggesting this is an implemented key or in the implementation for supporting the key if it is implemented. Would be able to submit a PR to resolve this issue?

volks73 commented 9 months ago

I have looked into this just briefly, and the product-name field is not supported. This is because the product name is taken from the name field for the package:

https://github.com/volks73/cargo-wix/blob/0a88f0ce2e8c8a00a66730f1921500163f4a3cb7/src/lib.rs#L217

[package]
name = "product-name-here"

There is the --product-name CLI option that can be used to override and/or explicitly define the product name, but there is no product-name field under the [package.metadata.wix] section.

nazar-pc commented 9 months ago

I see, I somehow completely missed that and assumed it was symmetrical. Do you think it would make sense to support that though? It is interesting that name and product-icon can be changed that way, but product-name can't.