github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/misc/dist/windows/installer.wxs (about)

     1  <?xml version="1.0" encoding="UTF-8"?>
     2  <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
     3  <!--
     4  # Copyright 2010 The Go Authors.  All rights reserved.
     5  # Use of this source code is governed by a BSD-style
     6  # license that can be found in the LICENSE file.
     7  -->
     8  
     9  <?if $(var.Arch) = 386 ?>
    10    <?define ProdId = {FF5B30B2-08C2-11E1-85A2-6ACA4824019B} ?>
    11    <?define UpgradeCode = {1C3114EA-08C3-11E1-9095-7FCA4824019B} ?>
    12    <?define SysFolder=SystemFolder ?>
    13  <?else?>
    14    <?define ProdId = {716c3eaa-9302-48d2-8e5e-5cfec5da2fab} ?>
    15    <?define UpgradeCode = {22ea7650-4ac6-4001-bf29-f4b8775db1c0} ?>
    16    <?define SysFolder=System64Folder ?>
    17  <?endif?>
    18  
    19  <Product
    20      Id="FF5B30B2-08C2-11E1-85A2-6ACA4824019B"
    21      Name="Go Programming Language $(var.Arch) $(var.Version)"
    22      Language="1033"
    23      Codepage="1252"
    24      Version="0.0.0.0"
    25      Manufacturer="http://golang.org"
    26      UpgradeCode="$(var.UpgradeCode)" >
    27      <!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->
    28  
    29  <Package
    30      Id='*' 
    31      Keywords='Installer'
    32      Description="The Go Programming Language Installer"
    33      Comments="The Go programming language is an open source project to make programmers more productive."
    34      InstallerVersion="300"
    35      Compressed="yes"
    36      InstallScope="perMachine"
    37      SummaryCodepage="1252"
    38      Languages="1033" />
    39      <!--    Platform="x86 or x64" -->
    40  
    41  <Property Id="ARPCOMMENTS" Value="The Go programming language is a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language." />
    42  <Property Id="ARPCONTACT" Value="golang-nuts@googlegroups.com" />
    43  <Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" />
    44  <Property Id="ARPREADME" Value="golang.org" />
    45  <Property Id="ARPURLINFOABOUT" Value="golang.org" />
    46  <Property Id="LicenseAccepted">1</Property>
    47  <Icon Id="gopher.ico" SourceFile="images\gopher.ico"/>
    48  <Property Id="ARPPRODUCTICON" Value="gopher.ico" />
    49  <Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />
    50  <Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>
    51  <MajorUpgrade AllowDowngrades="yes" />
    52  <SetDirectory Id="INSTALLDIRROOT" Value="[%SYSTEMDRIVE]"/>
    53  
    54  <CustomAction
    55      Id="SetApplicationRootDirectory"
    56      Property="ARPINSTALLLOCATION"
    57      Value="[INSTALLDIR]" />
    58  
    59  <!-- Define the directory structure and environment variables -->
    60  <Directory Id="TARGETDIR" Name="SourceDir">
    61    <Directory Id="INSTALLDIRROOT">
    62      <Directory Id="INSTALLDIR" Name="Go"/>
    63    </Directory>
    64    <Directory Id="ProgramMenuFolder">
    65      <Directory Id="GoProgramShortcutsDir" Name="Go Programming Language"/>
    66    </Directory>
    67    <Directory Id="EnvironmentEntries">
    68      <Directory Id="GoEnvironmentEntries" Name="Go Programming Language"/>
    69    </Directory>
    70  </Directory>
    71  
    72  <!-- Programs Menu Shortcuts -->
    73  <DirectoryRef Id="GoProgramShortcutsDir">
    74    <Component Id="Component_GoProgramShortCuts" Guid="{f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b}">
    75      <Shortcut
    76          Id="GoDocServerStartMenuShortcut"
    77          Name="GoDocServer"
    78          Description="Starts the Go documentation server (http://localhost:6060)"
    79          Show="minimized"
    80          Arguments='/c start "Godoc Server http://localhost:6060" "[INSTALLDIR]bin\godoc.exe" -http=localhost:6060 -goroot="[INSTALLDIR]." &amp;&amp; start http://localhost:6060'
    81          Icon="gopher.ico"
    82          Target="[%ComSpec]" />
    83      <Shortcut
    84          Id="UninstallShortcut"
    85          Name="Uninstall Go"
    86          Description="Uninstalls Go and all of its components"
    87          Target="[$(var.SysFolder)]msiexec.exe"
    88          Arguments="/x [ProductCode]" />
    89      <RemoveFolder
    90          Id="GoProgramShortcutsDir"
    91          On="uninstall" />
    92      <RegistryValue
    93          Root="HKCU"
    94          Key="Software\GoProgrammingLanguage"
    95          Name="ShortCuts"
    96          Type="integer" 
    97          Value="1"
    98          KeyPath="yes" /> 
    99    </Component>
   100  </DirectoryRef>
   101  
   102  <!-- Registry & Environment Settings -->
   103  <DirectoryRef Id="GoEnvironmentEntries">
   104    <Component Id="Component_GoEnvironment" Guid="{3ec7a4d5-eb08-4de7-9312-2df392c45993}">
   105      <RegistryKey 
   106          Root="HKCU"
   107          Key="Software\GoProgrammingLanguage"
   108          Action="create" >
   109              <RegistryValue
   110                  Name="installed"
   111                  Type="integer"
   112                  Value="1"
   113                  KeyPath="yes" />
   114              <RegistryValue
   115                  Name="installLocation"
   116                  Type="string"
   117                  Value="[INSTALLDIR]" />
   118      </RegistryKey>
   119      <Environment
   120          Id="GoPathEntry"
   121          Action="set"
   122          Part="last"
   123          Name="PATH"
   124          Permanent="no"
   125          System="yes"
   126          Value="[INSTALLDIR]bin" />
   127      <Environment
   128          Id="GoRoot"
   129          Action="set"
   130          Part="all"
   131          Name="GOROOT"
   132          Permanent="no"
   133          System="yes"
   134          Value="[INSTALLDIR]" />
   135      <RemoveFolder
   136          Id="GoEnvironmentEntries"
   137          On="uninstall" />
   138    </Component>
   139  </DirectoryRef>
   140  
   141  <!-- Install the files -->
   142  <Feature
   143      Id="GoTools"
   144      Title="Go"
   145      Level="1">
   146        <ComponentRef Id="Component_GoEnvironment" />
   147        <ComponentGroupRef Id="AppFiles" />
   148        <ComponentRef Id="Component_GoProgramShortCuts" />
   149  </Feature>
   150  
   151  <!-- Update the environment -->
   152  <InstallExecuteSequence>
   153      <Custom Action="SetApplicationRootDirectory" Before="InstallFinalize" />
   154  </InstallExecuteSequence>
   155  
   156  <!-- Include the user interface -->
   157  <WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
   158  <WixVariable Id="WixUIBannerBmp" Value="images\Banner.jpg" />
   159  <WixVariable Id="WixUIDialogBmp" Value="images\Dialog.jpg" />
   160  <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
   161  <UIRef Id="WixUI_InstallDir" />
   162  
   163  </Product>
   164  </Wix>