<?xml version="1.0" encoding="UTF-8"?>\r
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r
<!--\r
# Copyright 2010 The Go Authors. All rights reserved.\r
# Use of this source code is governed by a BSD-style\r
# license that can be found in the LICENSE file.\r
-->\r
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r
\r
- <Product Id="FF5B30B2-08C2-11E1-85A2-6ACA4824019B"\r
- Name="The Go Programming Language $(var.Arch) $(var.Version)"\r
- Language="1033"\r
- Version="0.0.0.0"\r
- Manufacturer="http://golang.org"\r
- UpgradeCode="1C3114EA-08C3-11E1-9095-7FCA4824019B" >\r
- <!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->\r
- \r
- <Package Id='*' Keywords='Installer' \r
- Description="The Go Programming Language Installer"\r
- Comments="The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language." \r
- InstallerVersion="300"\r
- Compressed="yes"\r
- Languages="1033" />\r
+<?if $(var.Arch) = 386 ?>\r
+ <?define SYSFOLDER=SystemFolder ?>\r
+ <?define Win64=no ?>\r
+<?else?>\r
+ <?define SYSFOLDER=System64Folder ?>\r
+ <?define Win64=yes ?>\r
+<?endif?>\r
+\r
+<Product\r
+ Id="FF5B30B2-08C2-11E1-85A2-6ACA4824019B"\r
+ Name="The Go Programming Language $(var.Arch) $(var.Version)"\r
+ Language="1033"\r
+ Version="0.0.0.0"\r
+ Manufacturer="http://golang.org"\r
+ UpgradeCode="1C3114EA-08C3-11E1-9095-7FCA4824019B" >\r
+ <!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->\r
+\r
+<Package\r
+ Id='*' Keywords='Installer'\r
+ Description="The Go Programming Language Installer"\r
+ Comments="The Go programming language is an open source project to make programmers more productive."\r
+ InstallerVersion="300"\r
+ Compressed="yes"\r
+ Manufacturer="http://golang.org"\r
+ InstallScope="perMachine"\r
+ Languages="1033" />\r
+ <!-- Platform="x86 or x64" -->\r
+<!--\r
+<Upgrade Id="">\r
+ <UpgradeVersion\r
+ IncludeMaximum="yes"\r
+ IncludeMinimum="yes"\r
+ Language="1033"\r
+ Maximum=""\r
+ Minimum=""\r
+ Property="" />\r
+</Upgrade>\r
+-->\r
+<Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />\r
+<Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>\r
+<SetDirectory Id="INSTALLDIRROOT" Value="C:\"/>\r
+\r
+<CustomAction\r
+ Id="SetApplicationRootDirectory"\r
+ Property="ARPINSTALLLOCATION"\r
+ Value="[INSTALLDIR]" />\r
\r
- <Media Id='1' Cabinet="go.cab" EmbedCab="yes" />\r
- <Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>\r
- \r
- <SetDirectory Id="SYS_ROOT" Value="C:\"/>\r
- <Property Id="EnableEV" Value="1" />\r
- \r
- <!-- Define the directory structure and environment variables -->\r
- <Directory Id="TARGETDIR" Name="SourceDir">\r
- <Directory Id="SYS_ROOT">\r
- <Directory Id="APPLICATIONROOTDIRECTORY" Name="Go"/>\r
+<!-- Define the directory structure and environment variables -->\r
+<Directory Id="TARGETDIR" Name="SourceDir">\r
+ <Directory Id="INSTALLDIRROOT">\r
+ <Directory Id="INSTALLDIR" Name="Go"/>\r
+ </Directory>\r
+ <Directory Id="ProgramMenuFolder">\r
+ <Directory Id="GoProgramShortcutsDir" Name="Go Programming"/>\r
+ </Directory>\r
+ <Directory Id="DesktopFolder" Name="Desktop"/>\r
+</Directory>\r
\r
- <Component Id="GoEnvVars"\r
- Guid="067EE394-08EF-11E1-ACBC-43FF4824019B">\r
- <CreateFolder />\r
- <Environment Id="GoRootPath"\r
- Action="set" \r
- Part="all"\r
- Name="GOROOT"\r
- Permanent="no"\r
- System="yes"\r
- Value="C:\Go" />\r
+<!-- Programs Menu & Desktop Shortcuts -->\r
+<DirectoryRef Id="GoProgramShortcutsDir">\r
+ <Component Id="Component_GoShortCuts" Guid="f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b">\r
+ <Shortcut\r
+ Id="GoEnvStartMenuShortcut"\r
+ Name="GoEnv"\r
+ Description="Sets the Go environment and spawns a shell window"\r
+ Target="[INSTALLDIR]goenv.bat" />\r
+ <Shortcut\r
+ Id="GoEnvDesktopShortcut"\r
+ Directory="DesktopFolder"\r
+ Name="GoEnv"\r
+ Description="Sets the Go environment and spawns a shell window"\r
+ Target="[INSTALLDIR]goenv.bat" />\r
+ <Shortcut\r
+ Id="GoDocServerStartMenuShortcut"\r
+ Name="GoDocServer"\r
+ Description="Starts the godoc server on localhost:6060"\r
+ Target="[INSTALLDIR]godocserver.bat" />\r
+ <Shortcut\r
+ Id="GoDocServerDesktopShortcut"\r
+ Directory="DesktopFolder"\r
+ Name="GoDocServer"\r
+ Description="Starts the godoc server on localhost:6060"\r
+ Target="[INSTALLDIR]godocserver.bat" />\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
+ Arguments="/x [ProductCode]" />\r
+ <RemoveFolder\r
+ Id="GoProgramShortcutsDir"\r
+ On="uninstall" />\r
+ <RegistryValue\r
+ Root="HKCU"\r
+ Key="Software\Microsoft\TheGoProgrammingLanguage"\r
+ Name="installed"\r
+ Type="integer"\r
+ Value="1"\r
+ KeyPath="yes" />\r
+ </Component>\r
+</DirectoryRef>\r
\r
- <Environment Id="GoBinPath"\r
- Action="set" \r
- Part="all"\r
- Name="GOBIN"\r
- Permanent="no"\r
- System="yes"\r
- Value="C:\Go\bin" />\r
+<!-- Components -->\r
+<DirectoryRef Id="INSTALLDIR">\r
+ <Component Id="Component_GoDocServerBAT" Guid="c40ea60a-4290-4a91-864d-e1d8eb5cf693">\r
+ <File\r
+ Id="FILE_GoDocServerBat"\r
+ Source="godocserver.bat"\r
+ KeyPath="yes" />\r
+ </Component>\r
+ <Component Id="Component_GoEnvBAT" Guid="ee4587d3-fba3-47f9-b45e-ec9ca9c8a9c3">\r
+ <File\r
+ Id="FILE_GoEnvBat"\r
+ Source="goenv.bat"\r
+ KeyPath="yes" />\r
+ </Component>\r
+</DirectoryRef>\r
\r
- <Environment Id="Environment"\r
- Action="set" \r
- Part="last"\r
- Name="PATH"\r
- Permanent="no"\r
- System="yes"\r
- Value="C:\Go\bin" /> \r
- </Component>\r
+<!-- Install the files -->\r
+<Feature\r
+ Id="GoTools"\r
+ Title="Go"\r
+ Level="1">\r
\r
- </Directory>\r
- </Directory>\r
+ <ComponentGroupRef Id="AppFiles" />\r
+ <ComponentRef Id="Component_GoDocServerBAT" />\r
+ <ComponentRef Id="Component_GoEnvBAT" />\r
+ <ComponentRef Id="Component_GoShortCuts" />\r
+</Feature>\r
\r
- <!-- Install the files -->\r
- <Feature Id="GoTools" \r
- Title="Go" \r
- Level="1">\r
- <ComponentGroupRef Id="AppFiles" />\r
- <ComponentRef Id="GoEnvVars" />\r
- </Feature> \r
+<!-- Update the environment -->\r
+<InstallExecuteSequence>\r
+ <Custom\r
+ Action="SetApplicationRootDirectory"\r
+ Before="InstallFinalize" />\r
+</InstallExecuteSequence>\r
\r
- <!-- Update the environment -->\r
- <InstallExecuteSequence>\r
- <WriteEnvironmentStrings>EnableEV=1</WriteEnvironmentStrings>\r
- </InstallExecuteSequence>\r
+<!-- Include the user interface -->\r
+<WixVariable Id="WixUILicenseRtf" Value="LICENSE" />\r
+<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />\r
+<UIRef Id="WixUI_InstallDir" />\r
\r
- </Product>\r
-</Wix>
\ No newline at end of file
+</Product>\r
+</Wix>\r