Merge pull request #5002 from BrzVlad/feature-sgen-modes
[mono.git] / packaging / Windows / resources / Product.wxs
1 <?xml version="1.0" encoding="UTF-8"?>
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3
4 <?if $(sys.BUILDARCH)=x86 ?>
5   <?define UpgradeCode="177a37ab-9354-487f-ac97-8407195c3043" ?>
6   <?define ProgramFilesX86orX64="ProgramFilesFolder" ?>
7   <?define SystemFolderX86orX64="SystemFolder" ?>
8   <?define MonoProgramFilesGuid="9B7A0108-39DA-4332-AE40-545E28919736" ?>
9   <?define ApplicationShortcutsGuid="CF93ABFD-416B-4C10-9126-EA93BC1D7154" ?>
10 <?elseif $(sys.BUILDARCH)=x64 ?>
11   <?define UpgradeCode="1f58e2dd-d88a-402d-a67f-a27e1efaaf48" ?>
12   <?define ProgramFilesX86orX64="ProgramFiles64Folder" ?>
13   <?define SystemFolderX86orX64="System64Folder" ?>
14   <?define MonoProgramFilesGuid="b4d95bcc-9fa9-48c4-a2d0-1d83f031e974" ?>
15   <?define ApplicationShortcutsGuid="8a74633a-86bb-4891-b9aa-1e7aaf7597c6" ?>
16 <?else?>
17   <?error $(sys.BUILDARCH) is not supported ?>
18 <?endif?>
19
20   <Product Id="*"
21            Name="Mono for Windows ($(sys.BUILDARCH))"
22            Language="1033"
23            Version="$(env.MONO_VERSION)"
24            Manufacturer="Xamarin, Inc."
25            UpgradeCode="$(var.UpgradeCode)">
26     <Package InstallerVersion="405" Compressed="yes" InstallScope="perMachine" Platform="$(sys.BUILDARCH)" />
27
28
29     <MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
30     <MediaTemplate EmbedCab="yes" />
31
32     <Icon Id="app.ico" SourceFile="setup-files\app.ico"/>
33
34     <!-- Entries for the 'Add & Remove Programs' section in control panel -->
35     <Property Id="ARPPRODUCTICON" Value="app.ico" />
36     <Property Id="ARPHELPLINK" Value="http://www.mono-project.com/" />
37     <Property Id="ARPURLINFOABOUT" Value="http://www.mono-project.com/" />
38     <Property Id="ARPURLUPDATEINFO" Value="http://www.mono-project.com/docs/about-mono/releases/" />
39
40     <Property Id="MSIFASTINSTALL" Value="7" />
41
42     <Condition Message="This application is only supported on Windows Vista or higher.">
43       <![CDATA[Installed OR (VersionNT >= 600)]]>
44     </Condition>
45
46     <UIRef Id="WixUI_Minimal" />
47     <WixVariable Id="WixUILicenseRtf" Value="setup-files\license.rtf" />
48     <WixVariable Id="WixUIBannerBmp" Value="setup-files\banner.bmp" />
49     <WixVariable Id="WixUIDialogBmp" Value="setup-files\dialog.bmp" />
50
51     <Feature Id="ProductFeature" Title="Mono" Level="1">
52       <ComponentGroupRef Id="ProductComponents" />
53     </Feature>
54     <DirectoryRef Id="TARGETDIR">
55       <Merge Id="VCRedist2013" SourceFile="$(env.CommonProgramFiles(x86))\Merge Modules\Microsoft_VC120_CRT_x86.msm" DiskId="1" Language="0"/>
56       <Merge Id="VCRedist2015" SourceFile="$(env.CommonProgramFiles(x86))\Merge Modules\Microsoft_VC140_CRT_$(sys.BUILDARCH).msm" DiskId="1" Language="0"/>
57     </DirectoryRef>
58     <Feature Id="VCRedist2013" Title="Visual C++ 12.0 Runtime (x86)" AllowAdvertise="no" Display="hidden" Level="1">
59       <MergeRef Id="VCRedist2013"/>
60     </Feature>
61     <Feature Id="VCRedist2015" Title="Visual C++ 14.0 Runtime" AllowAdvertise="no" Display="hidden" Level="1">
62       <MergeRef Id="VCRedist2015"/>
63     </Feature>
64   </Product>
65
66   <Fragment>
67     <Directory Id="TARGETDIR" Name="SourceDir">
68       <Directory Id="$(var.ProgramFilesX86orX64)">
69         <Directory Id="INSTALLFOLDER" Name="Mono">
70           <Directory Id="binFolder" Name="bin">
71             <Component Id="MonoProgramFiles" Guid="$(var.MonoProgramFilesGuid)">
72               <File KeyPath="yes" Source="bat\setmonopath.bat" />
73               <RegistryValue Root="HKLM" Key="Software\Mono" Name="Installed" Type="integer" Value="1" />
74               <RegistryValue Root="HKLM" Key="Software\Mono" Name="Version" Type="string" Value="$(env.MONO_VERSION)" />
75               <RegistryValue Root="HKLM" Key="Software\Mono" Name="SdkInstallRoot" Type="string" Value="[INSTALLFOLDER]" />
76               <RegistryValue Root="HKLM" Key="Software\Mono" Name="FrameworkAssemblyDirectory" Type="string" Value="[INSTALLFOLDER]lib\" />
77               <RegistryValue Root="HKLM" Key="Software\Mono" Name="MonoConfigDir" Type="string" Value="[INSTALLFOLDER]etc\" />
78               <RegistryValue Root="HKLM" Key="Software\Mono" Name="Architecture" Type="string" Value="$(sys.BUILDARCH)" />
79             </Component>
80           </Directory>
81         </Directory>
82       </Directory>
83
84       <!-- Start Menu Shortcut -->
85       <Directory Id="ProgramMenuFolder">
86         <Directory Id="ApplicationProgramsFolder" Name="Mono">
87           <Component Id="ApplicationShortcuts" Guid="$(var.ApplicationShortcutsGuid)">
88             <Shortcut Id="ApplicationStartMenuShortcutMono"
89                       Name="Open Mono $(sys.BUILDARCH) Command Prompt"
90                       Target="[$(var.SystemFolderX86orX64)]cmd.exe"
91                       Arguments="/k &quot;[INSTALLFOLDER]\bin\setmonopath.bat&quot;"
92                       WorkingDirectory="INSTALLFOLDER"/>
93             <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
94             <RegistryValue Root="HKCU" Key="Software\Mono" Name="Installed" Type="integer" Value="1" KeyPath="yes"/>
95           </Component>
96         </Directory>
97       </Directory>
98     </Directory>
99   </Fragment>
100
101   <Fragment>
102     <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
103       <ComponentGroupRef Id="MonoFiles" />
104       <ComponentRef Id="MonoProgramFiles" />
105       <ComponentRef Id="ApplicationShortcuts" />
106     </ComponentGroup>
107   </Fragment>
108 </Wix>