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>
diff --git a/cmd/release/releaselet.go b/cmd/release/releaselet.go
index dce6e78..ab1e29d 100644
--- a/cmd/release/releaselet.go
+++ b/cmd/release/releaselet.go
@@ -486,7 +486,7 @@
<?endif?>
<Product
- Id="FF5B30B2-08C2-11E1-85A2-6ACA4824019B"
+ Id="*"
Name="Go Programming Language $(var.Arch) $(var.GoVersion)"
Language="1033"
Version="$(var.WixGoVersion)"