Add DisplayVersion for rustup to registry on Windows.#3047
Conversation
|
Thanks @jedieaston I had exactly the same issue. My approach is slightly different: key.set_value("DisplayVersion", &common::version())
.context("Failed to set display version")?;Note that this sets the version in the form as outputted by |
|
We prefer for there not to be extraneous information in the DisplayVersion outside of the number on the winget side, as it makes it easier to do comparisons for upgrades. If it is common to do multiple releases of Rustup under the same exact version number I can change it, but I think any stable releases would increment the |
Hello! I'm a contributor to the Windows Package Manager Community Repository (microsoft/winget-pkgs), and we recently had an issue posted to that repo which revealed that Rustup was not publishing a
DisplayVersionto Add and Remove Programs during its install (although it was posting itsDisplayName).The
DisplayVersionis how winget and other tools determine when updates to software are needed, so it is highly recommended to set it whenever possible. This PR does just that, by making it so when Rustup is installed, it adds its version number to the registry alongside its name.This is the most Rust I've ever written, so let me know if I did something wrong and I can fix it :)
Tested: manually by compiling a new version of Rustup and installing it in a VM. If this needs more strenuous tests, I'm happy to oblige.
Resolves: #3055