-
Notifications
You must be signed in to change notification settings - Fork 26
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
Ephemeral Builds and Command #88
Comments
Instead of |
A separate |
So, I actually now think this is overkill. If an "ephemeral" installer is desired, then this can be handled with adding an
where the Alternatively, if the following package manifest was defined: [package.metadata.wix]
upgrade-code = "<UPGRADE_CODE_GUID>"
path-guid = "<PATH_GUID>" then the script or CI configuration would be:
and every time the script or CI executed, the same GUIDs would be used (pulled from the package's manifest) when the installer is created. The Note, under normal usage, the This implementation would not affect the create (default) subcommand. No WiX variables are needed and no separate templates or subcommands would be needed. |
I have been thinking about the implementation of this feature and would appreciate some comments on the following:
--product-guid
option for thecreate
(default) command, but I am actually leaning towards a new subcommand:cargo wix ephemeral <UPGRADE-CODE-GUID> <PATH-GUID> <WXS-FILE>|<CARGO-TOML>
. The<UPGRADE-CODE-GUID>
and<PATH-GUID>
(See Item 3) would be required, while<WXS-FILE>|<CARGO-TOML>
would be optional. If specified, a customized WXS file could be used, but it would need to contain the WIX variables for the Upgrade Code and path, respectively (See Item 2). This would allow users to generate a WXS file once with thecargo wix init
command, customize as necessary, but store the Upgrade and Path GUIDs somewhere else. If not specified or the value is a path to a Cargo.toml file, the internal ephemeral template (See Item 2) would be used. The issue is that the GUIDs must be supplied and what is the best way to make this obvious and ergomonic?PATH
system environment variable need a hard-coded/explicit GUID? It was a long time ago that I developed and tested the current WXS template. I think the GUID needs to be hard-coded/explicit so that it is properly uninstalled and/or not added twice during upgrades. Then, we need to figure out how to require this value and the upgrade code GUID in the CLI and a WIX variable will need to be added for thePATH
GUID.cargo wix print
subcommand will need a new flag or new template value to allow for printing of the concrete WXS template (auto-generates a GUID each time) or the ephemeral WXS template (includes the WIX variables).ephemeral.rs
source file need to be created or should thecreate.rs
be updated with twoExecution
types:Concrete
andEphemeral
? The answer to this question would be: Is the Builder the same for both "creation" executions?cargo wix
should be added to the crate's documentation. Is acargo wix guid
command needed/useful?ephemeral
field with Upgrade Code and PATH Guid sub-fields would be needed.Some additional comments and background:
Having to update the same information in multiple places ultimately leads to chaos.
I think the variability of the contents of the Cargo.toml file and use of a concrete WXS file is related to the timing of the project's development process and introduction of an installer. Do you want, or need, an installer during the early stages of project development when configurations, names, etc. are highly instable (changing frequently), or is an installer only needed in later, stable stages of project development? There is no right or wrong answer to this question, but currently
cargo wix
is only supporting the late, stable stage of development, which is mostly due to its origin story.The subcommand came about from another project where I needed to create a Windows installer for an existing, stable project and I had several other cargo-related, stable projects that would benefit from Windows installers. I was copying-n-pasting the same WXS file over-and-over and making small modifications to the product name, upgrade code, etc. which we all agree is a source of pain and headaches. So,
cargo wix
was the solution to adding installers to late stage development projects.Originally posted by @volks73 in #85 (comment)
The text was updated successfully, but these errors were encountered: