Commit e9fef33d authored by Andrew Gerrand's avatar Andrew Gerrand

misc/dist: updates to installer script

Now sets GOROOT.

Fixes #3287.
Fixes #3361.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5877059
parent 5ac18697
...@@ -7,11 +7,15 @@ ...@@ -7,11 +7,15 @@
--> -->
<?if $(var.Arch) = 386 ?> <?if $(var.Arch) = 386 ?>
<?define SYSFOLDER=SystemFolder ?> <?define ProdId = {FF5B30B2-08C2-11E1-85A2-6ACA4824019B} ?>
<?define Win64=no ?> <?define UpgradeCode = {1C3114EA-08C3-11E1-9095-7FCA4824019B} ?>
<?define SysFolder=SystemFolder ?>
<?define IsX64Target = no ?>
<?else?> <?else?>
<?define SYSFOLDER=System64Folder ?> <?define ProdId = {716c3eaa-9302-48d2-8e5e-5cfec5da2fab} ?>
<?define Win64=yes ?> <?define UpgradeCode = {22ea7650-4ac6-4001-bf29-f4b8775db1c0} ?>
<?define SysFolder=System64Folder ?>
<?define IsX64Target = yes ?>
<?endif?> <?endif?>
<Product <Product
...@@ -21,7 +25,7 @@ ...@@ -21,7 +25,7 @@
Codepage="1252" Codepage="1252"
Version="0.0.0.0" Version="0.0.0.0"
Manufacturer="http://golang.org" Manufacturer="http://golang.org"
UpgradeCode="1C3114EA-08C3-11E1-9095-7FCA4824019B" > UpgradeCode="$(var.UpgradeCode)" >
<!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format --> <!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->
<Package <Package
...@@ -41,12 +45,12 @@ ...@@ -41,12 +45,12 @@
<Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" /> <Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" />
<Property Id="ARPREADME" Value="golang.org" /> <Property Id="ARPREADME" Value="golang.org" />
<Property Id="ARPURLINFOABOUT" Value="golang.org" /> <Property Id="ARPURLINFOABOUT" Value="golang.org" />
<Property Id="LicenseAccepted">1</Property>
<Icon Id="gopher.ico" SourceFile="images\gopher.ico"/> <Icon Id="gopher.ico" SourceFile="images\gopher.ico"/>
<Property Id="ARPPRODUCTICON" Value="gopher.ico" /> <Property Id="ARPPRODUCTICON" Value="gopher.ico" />
<Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" /> <Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />
<Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition> <Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>
<MajorUpgrade AllowDowngrades="yes" /> <MajorUpgrade AllowDowngrades="yes" />
<SetDirectory Id="INSTALLDIRROOT" Value="C:\"/>
<CustomAction <CustomAction
Id="SetApplicationRootDirectory" Id="SetApplicationRootDirectory"
...@@ -64,34 +68,24 @@ ...@@ -64,34 +68,24 @@
<Directory Id="EnvironmentEntries"> <Directory Id="EnvironmentEntries">
<Directory Id="GoEnvironmentEntries" Name="Go Programming Language"/> <Directory Id="GoEnvironmentEntries" Name="Go Programming Language"/>
</Directory> </Directory>
<Directory Id="DesktopFolder" Name="Desktop"/>
</Directory> </Directory>
<!-- Programs Menu & Desktop Shortcuts --> <!-- Programs Menu Shortcuts -->
<DirectoryRef Id="GoProgramShortcutsDir"> <DirectoryRef Id="GoProgramShortcutsDir">
<Component Id="Component_GoShortCuts" Guid="f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b"> <Component Id="Component_GoProgramShortCuts" Guid="{f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b}" Win64="$(var.IsX64Target)">
<Shortcut <Shortcut
Id="GoDocServerStartMenuShortcut" Id="GoDocServerStartMenuShortcut"
Name="GoDocServer" Name="GoDocServer"
Description="Starts the Go documentation server (http://localhost:6060)" Description="Starts the Go documentation server (http://localhost:6060)"
Show="minimized" Show="minimized"
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 &amp;&amp; start http://localhost:6060"' Arguments='/c start "Godoc Server http://localhost:6060" /d"[INSTALLDIR]bin" godoc.exe -http=:6060 -goroot="[INSTALLDIR]" -path="%GOPATH%" &amp;&amp; start http://localhost:6060'
Icon="gopher.ico" Icon="gopher.ico"
Target="[%ComSpec]" /> Target="[%ComSpec]" />
<Shortcut
Id="GoDocServerDesktopShortcut"
Directory="DesktopFolder"
Name="GoDocServer"
Description="Starts the godoc server (http://localhost:6060)"
Show="minimized"
Icon="gopher.ico"
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 &amp;&amp; start http://localhost:6060"'
Target="[%ComSpec]" />
<Shortcut <Shortcut
Id="UninstallShortcut" Id="UninstallShortcut"
Name="Uninstall Go" Name="Uninstall Go"
Description="Uninstalls Go and all of its components" Description="Uninstalls Go and all of its components"
Target="[$(var.SYSFOLDER)]msiexec.exe" Target="[$(var.SysFolder)]msiexec.exe"
Arguments="/x [ProductCode]" /> Arguments="/x [ProductCode]" />
<RemoveFolder <RemoveFolder
Id="GoProgramShortcutsDir" Id="GoProgramShortcutsDir"
...@@ -108,7 +102,7 @@ ...@@ -108,7 +102,7 @@
<!-- Registry & Environment Settings --> <!-- Registry & Environment Settings -->
<DirectoryRef Id="GoEnvironmentEntries"> <DirectoryRef Id="GoEnvironmentEntries">
<Component Id="Component_GoEnvironment" Guid="3ec7a4d5-eb08-4de7-9312-2df392c45993"> <Component Id="Component_GoEnvironment" Guid="{3ec7a4d5-eb08-4de7-9312-2df392c45993}" Win64="$(var.IsX64Target)">
<RegistryKey <RegistryKey
Root="HKCU" Root="HKCU"
Key="Software\GoProgrammingLanguage" Key="Software\GoProgrammingLanguage"
...@@ -124,21 +118,27 @@ ...@@ -124,21 +118,27 @@
Value="[INSTALLDIR]" /> Value="[INSTALLDIR]" />
</RegistryKey> </RegistryKey>
<Environment <Environment
Id="Environment" Id="GoPathEntry"
Action="set" Action="set"
Part="last" Part="last"
Name="PATH" Name="PATH"
Permanent="no" Permanent="no"
System="yes" System="yes"
Value="[INSTALLDIR]bin" /> Value="[INSTALLDIR]bin" />
<Environment
Id="GoRoot"
Action="set"
Part="all"
Name="GOROOT"
Permanent="no"
System="yes"
Value="[INSTALLDIR]" />
<RemoveFolder <RemoveFolder
Id="GoEnvironmentEntries" Id="GoEnvironmentEntries"
On="uninstall" /> On="uninstall" />
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<!-- Components -->
<!-- Install the files --> <!-- Install the files -->
<Feature <Feature
Id="GoTools" Id="GoTools"
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
Level="1"> Level="1">
<ComponentRef Id="Component_GoEnvironment" /> <ComponentRef Id="Component_GoEnvironment" />
<ComponentGroupRef Id="AppFiles" /> <ComponentGroupRef Id="AppFiles" />
<ComponentRef Id="Component_GoShortCuts" /> <ComponentRef Id="Component_GoProgramShortCuts" />
</Feature> </Feature>
<!-- Update the environment --> <!-- Update the environment -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment