@@ -11,7 +11,9 @@ package main
11
11
import (
12
12
"archive/zip"
13
13
"bytes"
14
+ "crypto/sha256"
14
15
"errors"
16
+ "fmt"
15
17
"io"
16
18
"io/ioutil"
17
19
"log"
@@ -291,7 +293,8 @@ func windowsMSI() error {
291
293
)
292
294
}
293
295
294
- const wixBinaries = "https://storage.googleapis.com/go-builder-data/wix35-binaries.zip"
296
+ const wixBinaries = "https://storage.googleapis.com/go-builder-data/wix311-binaries.zip"
297
+ const wixSha256 = "da034c489bd1dd6d8e1623675bf5e899f32d74d6d8312f8dd125a084543193de"
295
298
296
299
// installWix fetches and installs the wix toolkit to the specified path.
297
300
func installWix (path string ) error {
@@ -301,6 +304,12 @@ func installWix(path string) error {
301
304
return err
302
305
}
303
306
307
+ // Verify sha256
308
+ sum := sha256 .Sum256 (body )
309
+ if fmt .Sprintf ("%x" , sum ) != wixSha256 {
310
+ return errors .New ("sha256 mismatch for wix toolkit" )
311
+ }
312
+
304
313
// Unzip to path.
305
314
zr , err := zip .NewReader (bytes .NewReader (body ), int64 (len (body )))
306
315
if err != nil {
@@ -632,8 +641,7 @@ var windowsData = map[string]string{
632
641
<Component Id="Component_GoEnvironment" Guid="{3ec7a4d5-eb08-4de7-9312-2df392c45993}">
633
642
<RegistryKey
634
643
Root="HKCU"
635
- Key="Software\GoProgrammingLanguage"
636
- Action="create" >
644
+ Key="Software\GoProgrammingLanguage">
637
645
<RegistryValue
638
646
Name="installed"
639
647
Type="integer"
@@ -681,6 +689,9 @@ var windowsData = map[string]string{
681
689
<Custom Action="SetApplicationRootDirectory" Before="InstallFinalize" />
682
690
</InstallExecuteSequence>
683
691
692
+ <!-- Notify top level applications of the new PATH variable (golang.org/issue/18680) -->
693
+ <CustomActionRef Id="WixBroadcastEnvironmentChange" />
694
+
684
695
<!-- Include the user interface -->
685
696
<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
686
697
<WixVariable Id="WixUIBannerBmp" Value="images\Banner.jpg" />
0 commit comments