-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple binaries in Cargo.toml #78
Comments
I agree, I would greatly appreciate a pull request that adds this functionality. In the mean time, it is possible to add the additional binaries to the generated Single binary: <!-- ... -->
<Component Id='exampleBinary' Guid='*' Win64='$(var.Win64)'>
<File
Id='exampleEXE'
Name='example.exe'
DiskId='1'
Source='target\release\example.exe'
KeyPath='yes'/>
</Component>
<!-- ... --> Multiple binaries: <!-- ... -->
<Component Id='exampleBinary0' Guid='*' Win64='$(var.Win64)'>
<File
Id='exampleEXE0'
Name='example0.exe'
DiskId='1'
Source='target\release\example0.exe'
KeyPath='yes'/>
</Component>
<Component Id='exampleBinary1' Guid='*' Win64='$(var.Win64)'>
<File
Id='exampleEXE1'
Name='example1.exe'
DiskId='1'
Source='target\release\example1.exe'
KeyPath='yes'/>
</Component>
<Component Id='exampleBinary2' Guid='*' Win64='$(var.Win64)'>
<File
Id='exampleEXE2'
Name='example2.exe'
DiskId='1'
Source='target\release\example2.exe'
KeyPath='yes'/>
</Component>
<!-- ... --> The first binary is only read and used for the |
I looked into this a little more. The problem is not reading from the manifest file (Cargo.toml) and looping through the binaries, but the CLI. There is the My initial ideas are to allow the option to appear multiple times and the where each occurrence relates to a binary. The order would need to match the order in the Cargo.toml file. Another thought is to remove the option if it is rarely used. |
Oh, there is another complication. Should each binary be listed as a separate component in the installer that can be toggled for installation or are all binaries a single component, an all or nothing situation? In the first scenario, each I think the default should be the all or nothing approach and a CLI flag/option added to switch to the separate component situation can be added. I think the majority of the time, developers will want users to install all of the binaries, and all of the binaries are need for the application to run correctly. |
Or it could only support a single binary :)
I highly suspect that common scenario is just use
This sounds like a good default behavior. |
Implemented as of d369e84. I have added support for multiple binaries defined in the package's manifest (Cargo.toml). They are all included within the same "feature" for the installer. I have not added the option to break out each binary into separate features (checkboxes for each to install within the GUI) because that appears to be a little more work to implement as an option/toggle within the mustache template and I think the default behavior of including all binaries with the "application" feature is the more common use case. The There are a couple more changes I think I would like to add before making a new release, but the changes are available on the |
Currently, cargo-wix uses only uses the first binary defined in
Cargo.toml
:cargo-wix/src/print/wxs.rs
Line 350 in 7982417
However, it is perfectly valid to have multiple binaries in a single
Cargo.toml
. So, ideally, cargo-wix should collect a list of binaries and handle them all.The text was updated successfully, but these errors were encountered: