go /
build /
06bbf3a13937d7f66c06cc7f8bd975742cb80c63 x/build/cmd/release: on windows, allow direct upgrade of go with MSI
On Windows, the ProductCode must be different¹ for different versions of
the same product while the UpgradeCode must remain the same².
By setting the Id-field in the Product-tag in installer.wxs file to "*"
(instead of the static GUID), a new ProductCode will be generated by the
WiX-Toolkit on each run of the building process. This allows to upgrade
from previously installed versions of Go without uninstalling them
manually.
Quotes from MSDN
¹) https://msdn.microsoft.com/en-us/library/aa370854(v=vs.85).aspx:
" The ProductCode property is a unique identifier for the particular
product release, [...]. This ID must vary for different versions and
languages. "
²) https://msdn.microsoft.com/en-us/library/aa372375(v=vs.85).aspx:
" The UpgradeCode property is a GUID representing a related set of
products. The UpgradeCode is used in the Upgrade Table to search for
related versions of the product that are already installed. "
Fixes golang/go#12213
Change-Id: I5d04eef7786107d0d7d4a913e8799838e8788a4f
Reviewed-on: https://go-review.googlesource.com/18071
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
1 file changed