Skip to content
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

variants #158

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

variants #158

wants to merge 2 commits into from

Conversation

cstkingkey
Copy link
Contributor

Add option to build variants. inspired by cargo deb.
For now, this is a concept demonstration.

Copy link
Owner

@volks73 volks73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the draft implementation. Based on the doc-comments for the variant function, I want to ensure the purpose and desired behavior for a --variant argument.

Variants appear to be used to select different configurations defined in a project's Cargo.toml file, such as:

[package.metadata.wix]
name = "Parent Name"

[package.metadata.wix.variants.child1]
name = "Child 1 Name"

[package.metadata.wix.variants.child2]
name = "Child 2 Name"

So, if Child 2 Name is desired for an installer, cargo wix --variant child2 could be used to change the installer name. This does not necessarily select a package within a Workspace project. Variants could potentially be used for this, but variants are independent of the Workspaces.

I am open to adding this feature. It is an elegant idea for addressing multiple configurations. I just want to note this feature would be independently useful for a single package project, not just Workspaces. Also, please be aware, Workspace support is an ongoing discussion, See #74 and #102,

@@ -308,6 +310,16 @@ impl<'a> Builder<'a> {
self
}

/// Sets the variant.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variants in the cargo-deb project are for defining different configurations of the cargo deb command within a project's Cargo.toml file. It is not for selecting a package within a workspace. The doc-comments do not match the intention of variants.

It appears possible to define different installers for different packages within a Workspace using variants, but the argument does not select the specific package.

@volks73 volks73 changed the title virants variants Jan 21, 2022
@volks73
Copy link
Owner

volks73 commented Sep 6, 2023

@cstkingkey Is this still of interest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants