1
0
mirror of https://github.com/golang/go synced 2024-10-03 08:11:27 -06:00
go/misc/dist/windows/installer.wxs
Joe Poirier a9e57f743d misc/dist/windows: ongoing dev
Added the (properly formatted) license file back,
the installer adds go\bin to the system PATH now,
the output package names are in line with the linux
and darwin versions, dist.bat extracts GOARCH in a
sane way, readme cleanup.

Tested on Windows 7 only. It would be helpful if
someone else could give it a try. See the readme
for details.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5673099
2012-02-19 22:21:41 -06:00

147 lines
4.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!--
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-->
<?if $(var.Arch) = 386 ?>
<?define SYSFOLDER=SystemFolder ?>
<?define Win64=no ?>
<?else?>
<?define SYSFOLDER=System64Folder ?>
<?define Win64=yes ?>
<?endif?>
<Product
Id="FF5B30B2-08C2-11E1-85A2-6ACA4824019B"
Name="Go Programming Language $(var.Arch) $(var.Version)"
Language="1033"
Codepage="1252"
Version="0.0.0.0"
Manufacturer="http://golang.org"
UpgradeCode="1C3114EA-08C3-11E1-9095-7FCA4824019B" >
<!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->
<Package
Id='*' Keywords='Installer'
Description="The Go Programming Language Installer"
Comments="The Go programming language is an open source project to make programmers more productive."
InstallerVersion="300"
Compressed="yes"
InstallScope="perMachine"
SummaryCodepage="1252"
Languages="1033" />
<!-- Platform="x86 or x64" -->
<Property Id="ARPCOMMENTS" Value="The Go programming language is a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language." />
<Property Id="ARPCONTACT" Value="golang-nuts@googlegroups.com" />
<Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" />
<Property Id="ARPREADME" Value="golang.org" />
<Property Id="ARPURLINFOABOUT" Value="golang.org" />
<!--
<Upgrade Id="">
<UpgradeVersion
IncludeMaximum="yes"
IncludeMinimum="yes"
Language="1033"
Maximum=""
Minimum=""
Property="" />
</Upgrade>
-->
<Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />
<Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>
<SetDirectory Id="INSTALLDIRROOT" Value="C:\"/>
<CustomAction
Id="SetApplicationRootDirectory"
Property="ARPINSTALLLOCATION"
Value="[INSTALLDIR]" />
<!-- Define the directory structure and environment variables -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLDIRROOT">
<Directory Id="INSTALLDIR" Name="Go"/>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="GoProgramShortcutsDir" Name="Go Programming Language"/>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop"/>
</Directory>
<!-- Programs Menu & Desktop Shortcuts, Registry & Environment Settings -->
<DirectoryRef Id="GoProgramShortcutsDir">
<Component Id="Component_GoShortCuts" Guid="f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b">
<Shortcut
Id="GoDocServerStartMenuShortcut"
Name="GoDocServer"
Description="Starts the Go documentation server (http://localhost:6060)"
Show="minimized"
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 &amp;&amp; start http://localhost:6060"'
Target="[%ComSpec]" />
<Shortcut
Id="GoDocServerDesktopShortcut"
Directory="DesktopFolder"
Name="GoDocServer"
Description="Starts the godoc server (http://localhost:6060)"
Show="minimized"
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 &amp;&amp; start http://localhost:6060"'
Target="[%ComSpec]" />
<Shortcut
Id="UninstallShortcut"
Name="Uninstall Go"
Description="Uninstalls Go and all of its components"
Target="[$(var.SYSFOLDER)]msiexec.exe"
Arguments="/x [ProductCode]" />
<RemoveFolder
Id="GoProgramShortcutsDir"
On="uninstall" />
<RegistryValue
Root="HKCU"
Key="Software\Microsoft\TheGoProgrammingLanguage"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes" />
<Environment
Id="Environment"
Action="set"
Part="last"
Name="PATH"
Permanent="no"
System="yes"
Value="[INSTALLDIR]bin" />
</Component>
</DirectoryRef>
<!-- Components -->
<!-- Install the files -->
<Feature
Id="GoTools"
Title="Go"
Level="1">
<ComponentGroupRef Id="AppFiles" />
<ComponentRef Id="Component_GoShortCuts" />
</Feature>
<!-- Update the environment -->
<InstallExecuteSequence>
<Custom
Action="SetApplicationRootDirectory"
Before="InstallFinalize" />
</InstallExecuteSequence>
<!-- Include the user interface -->
<WixVariable Id="WixUILicenseRtf" Value="LICENSE" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UIRef Id="WixUI_InstallDir" />
</Product>
</Wix>