]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dist: updates to installer script
authorAndrew Gerrand <adg@golang.org>
Fri, 23 Mar 2012 00:48:54 +0000 (11:48 +1100)
committerAndrew Gerrand <adg@golang.org>
Fri, 23 Mar 2012 00:48:54 +0000 (11:48 +1100)
Now sets GOROOT.

Fixes #3287.
Fixes #3361.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5877059

misc/dist/windows/installer.wxs

index faece29b022514fd29505783cadd06996d9d7486..805237bcf5b927512ad460a09d7ae59129486c0e 100644 (file)
@@ -7,11 +7,15 @@
 -->\r
 \r
 <?if $(var.Arch) = 386 ?>\r
-  <?define SYSFOLDER=SystemFolder ?>\r
-  <?define Win64=no ?>\r
+  <?define ProdId = {FF5B30B2-08C2-11E1-85A2-6ACA4824019B} ?>\r
+  <?define UpgradeCode = {1C3114EA-08C3-11E1-9095-7FCA4824019B} ?>\r
+  <?define SysFolder=SystemFolder ?>\r
+  <?define IsX64Target = no ?>\r
 <?else?>\r
-  <?define SYSFOLDER=System64Folder ?>\r
-  <?define Win64=yes ?>\r
+  <?define ProdId = {716c3eaa-9302-48d2-8e5e-5cfec5da2fab} ?>\r
+  <?define UpgradeCode = {22ea7650-4ac6-4001-bf29-f4b8775db1c0} ?>\r
+  <?define SysFolder=System64Folder ?>\r
+  <?define IsX64Target = yes ?>\r
 <?endif?>\r
 \r
 <Product\r
@@ -21,7 +25,7 @@
     Codepage="1252"\r
     Version="0.0.0.0"\r
     Manufacturer="http://golang.org"\r
-    UpgradeCode="1C3114EA-08C3-11E1-9095-7FCA4824019B" >\r
+    UpgradeCode="$(var.UpgradeCode)" >\r
     <!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->\r
 \r
 <Package\r
 <Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" />\r
 <Property Id="ARPREADME" Value="golang.org" />\r
 <Property Id="ARPURLINFOABOUT" Value="golang.org" />\r
+<Property Id="LicenseAccepted">1</Property>\r
 <Icon Id="gopher.ico" SourceFile="images\gopher.ico"/>\r
 <Property Id="ARPPRODUCTICON" Value="gopher.ico" />\r
 <Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />\r
 <Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>\r
 <MajorUpgrade AllowDowngrades="yes" />\r
-<SetDirectory Id="INSTALLDIRROOT" Value="C:\"/>\r
 \r
 <CustomAction\r
     Id="SetApplicationRootDirectory"\r
   <Directory Id="EnvironmentEntries">\r
     <Directory Id="GoEnvironmentEntries" Name="Go Programming Language"/>\r
   </Directory>\r
-  <Directory Id="DesktopFolder" Name="Desktop"/>\r
 </Directory>\r
 \r
-<!-- Programs Menu & Desktop Shortcuts -->\r
+<!-- Programs Menu Shortcuts -->\r
 <DirectoryRef Id="GoProgramShortcutsDir">\r
-  <Component Id="Component_GoShortCuts" Guid="f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b">\r
+  <Component Id="Component_GoProgramShortCuts" Guid="{f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b}" Win64="$(var.IsX64Target)">\r
     <Shortcut\r
         Id="GoDocServerStartMenuShortcut"\r
         Name="GoDocServer"\r
         Description="Starts the Go documentation server (http://localhost:6060)"\r
         Show="minimized"\r
-        Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 &amp;&amp; start http://localhost:6060"'\r
+        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'\r
         Icon="gopher.ico"\r
         Target="[%ComSpec]" />\r
-    <Shortcut\r
-        Id="GoDocServerDesktopShortcut"\r
-        Directory="DesktopFolder"\r
-        Name="GoDocServer"\r
-        Description="Starts the godoc server (http://localhost:6060)"\r
-        Show="minimized"\r
-        Icon="gopher.ico"\r
-        Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 &amp;&amp; start http://localhost:6060"'\r
-        Target="[%ComSpec]" />\r
     <Shortcut\r
         Id="UninstallShortcut"\r
         Name="Uninstall Go"\r
         Description="Uninstalls Go and all of its components"\r
-        Target="[$(var.SYSFOLDER)]msiexec.exe"\r
+        Target="[$(var.SysFolder)]msiexec.exe"\r
         Arguments="/x [ProductCode]" />\r
     <RemoveFolder\r
         Id="GoProgramShortcutsDir"\r
 \r
 <!-- Registry & Environment Settings -->\r
 <DirectoryRef Id="GoEnvironmentEntries">\r
-  <Component Id="Component_GoEnvironment" Guid="3ec7a4d5-eb08-4de7-9312-2df392c45993">\r
+  <Component Id="Component_GoEnvironment" Guid="{3ec7a4d5-eb08-4de7-9312-2df392c45993}" Win64="$(var.IsX64Target)">\r
     <RegistryKey \r
         Root="HKCU"\r
         Key="Software\GoProgrammingLanguage"\r
                 Value="[INSTALLDIR]" />\r
     </RegistryKey>\r
     <Environment\r
-        Id="Environment"\r
+        Id="GoPathEntry"\r
         Action="set"\r
         Part="last"\r
         Name="PATH"\r
         Permanent="no"\r
         System="yes"\r
         Value="[INSTALLDIR]bin" />\r
+    <Environment\r
+        Id="GoRoot"\r
+        Action="set"\r
+        Part="all"\r
+        Name="GOROOT"\r
+        Permanent="no"\r
+        System="yes"\r
+        Value="[INSTALLDIR]" />\r
     <RemoveFolder\r
         Id="GoEnvironmentEntries"\r
         On="uninstall" />\r
   </Component>\r
 </DirectoryRef>\r
 \r
-<!-- Components -->\r
-\r
 <!-- Install the files -->\r
 <Feature\r
     Id="GoTools"\r
     Level="1">\r
       <ComponentRef Id="Component_GoEnvironment" />\r
       <ComponentGroupRef Id="AppFiles" />\r
-      <ComponentRef Id="Component_GoShortCuts" />\r
+      <ComponentRef Id="Component_GoProgramShortCuts" />\r
 </Feature>\r
 \r
 <!-- Update the environment -->\r