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

add --target-bin-dir to execute #209

Closed Gankra closed 1 year ago

Gankra commented 1 year ago

This sets CargoTargetBinDir in the wix template, allowing something orchestrating cargo-wix to take the reigns on building/gathering binaries completely. Setting this an --no-build supresses the warning (as at this point there's a pretty clear signal the user is doing this intentionally and not as a temp thing).

No integration tests were added for this functionality because it wasn't clear to me how to reasonable test this, but the functionality is boring enough that it's easy to trust with just the unit tests.

As compensation some backlog tests/docs were added.


Also does some cleanups to factor target-triple/profile logic so that things aren't recomputed in a bunch of places.

Also adds the arguably-forgotten-to-be-added package.metadata.wix.profile (for projects that always want to build with a special profile).

Note that --target-bin-dir this time is intentionally without a package.metadata pair, because it's pretty exceptional to want to fully bake the target dir.

Gankra commented 1 year ago

This is the most important part of #207, everything else is bonus.