-
Notifications
You must be signed in to change notification settings - Fork 150
/
Product.wxs
157 lines (138 loc) · 10.4 KB
/
Product.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="UTF-8"?>
<?include AssemblyVersion.wxi ?>
<?include SharedIncludes.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="$(var.ProductName)" Id='$(var.ProductCode)' Language='1033' Version='$(var.WixVersionLong)' Manufacturer='$(var.Manufacturer)' UpgradeCode='$(var.UpgradeCode)'>
<Package Languages='1033' InstallerVersion="200" Compressed="yes" />
<Upgrade Id='$(var.UpgradeCode)'>
<UpgradeVersion OnlyDetect='yes' Minimum='$(var.WixVersionLong)' IncludeMinimum='no' Property='NEWERVERSIONDETECTED' />
<UpgradeVersion OnlyDetect='no' Minimum='0.0.0' IncludeMinimum='yes' Maximum='$(var.WixVersionLong)' IncludeMaximum='no' Property='OLDERVERSIONBEINGUPGRADED' MigrateFeatures='yes' />
</Upgrade>
<!-- Disallow installing an older version over a newer version -->
<Condition Message="A later version of [ProductName] is already installed."><![CDATA[NOT NEWERVERSIONDETECTED]]></Condition>
<Feature Id='Feature_StyleCopPackage'
Title='Visual Studio integration'
Description="Files for setting up StyleCop integration with Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, and Visual Studio 2013."
Level="1" Display='expand' ConfigurableDirectory='INSTALLDIR' AllowAdvertise='no' InstallDefault='local' Absent='allow'>
<ComponentGroupRef Id="VisualStudio_Common" />
<!-- Require VS 2008, 2010, 2012, or 2013 to be installed -->
<Condition Level="1"><![CDATA[VS90DEVENV <> "" OR VS2010DEVENV <> "" OR VS2012DEVENV <> "" OR VS2013DEVENV <> ""]]></Condition>
<Condition Level="0"><![CDATA[VS90DEVENV = "" AND VS2010DEVENV = "" AND VS2012DEVENV = "" AND VS2013DEVENV = ""]]></Condition>
<Feature Id='Feature_ReSharper'
Title='R# integration'
Description='Files for integration with JetBrains ReSharper 5.1.3, 6.0, 6.1, 6.1.1, 7.0.1, 7.1 or 8.2.'
Level='500' AllowAdvertise="no" Display="expand" InstallDefault="local" TypicalDefault="install" Absent="allow">
<ComponentGroupRef Id="ReSharper_Common" />
<Condition Level="1"><![CDATA[RESHARPER51_VERSION <> "" OR RESHARPER60_VERSION <> "" OR RESHARPER61_VERSION <> "" OR RESHARPER70_VERSION <> "" OR RESHARPER71_VERSION <> ""OR RESHARPER82_VERSION <> ""]]></Condition>
<Condition Level="0"><![CDATA[RESHARPER51_VERSION = "" AND RESHARPER60_VERSION = "" AND RESHARPER61_VERSION = "" AND RESHARPER70_VERSION = "" AND RESHARPER71_VERSION = "" AND RESHARPER82_VERSION = ""]]></Condition>
</Feature>
<Feature Id='Feature_VisualStudioTemplates'
Title='Visual Studio 2010 templates'
Description='Files for updating the standard Visual Studio 2010 templates to be StyleCop compliant.'
Level='500' AllowAdvertise="no" Display="expand" InstallDefault="local" TypicalDefault="install" Absent="allow">
<ComponentGroupRef Id="VSTemplates_Common" />
<Condition Level="1"><![CDATA[VS2010DEVENV <> ""]]></Condition>
<Condition Level="0"><![CDATA[VS2010DEVENV = ""]]></Condition>
</Feature>
</Feature>
<Feature Id='Feature_MSBuild'
Title='MSBuild integration'
Description='Files for setting up StyleCop integration with Microsoft MSBuild.'
Level='1' AllowAdvertise="no" Display="expand" InstallDefault="local" TypicalDefault="install" Absent="allow">
<ComponentGroupRef Id="MSBuild_Common" />
</Feature>
<InstallUISequence>
<Custom Action='IsPrivileged' Before='AppSearch'><![CDATA[NOT Privileged]]></Custom>
<Custom Action="ToggleALLUSERSToPerUser" Before="FindRelatedProducts"><![CDATA[STYLECOP_PREVIOUS_INSTALL_PER_USER AND NOT Installed]]></Custom>
<Custom Action="RevertALLUSERSToPerMachine" After="FindRelatedProducts"><![CDATA[STYLECOP_PREVIOUS_INSTALL_PER_USER AND NOT Installed]]></Custom>
<!-- Move AppSearch to before FindRelatedProduct so that RegistrySearch properties get evaluated before they are used -->
<AppSearch Before="FindRelatedProducts" />
</InstallUISequence>
<InstallExecuteSequence>
<Custom Action='IsPrivileged' Before='AppSearch'><![CDATA[NOT Privileged]]></Custom>
<Custom Action="ToggleALLUSERSToPerUser" Before="FindRelatedProducts"><![CDATA[STYLECOP_PREVIOUS_INSTALL_PER_USER AND NOT Installed]]></Custom>
<Custom Action="RevertALLUSERSToPerMachine" After="FindRelatedProducts"><![CDATA[STYLECOP_PREVIOUS_INSTALL_PER_USER AND NOT Installed]]></Custom>
<!-- Move AppSearch to before FindRelatedProduct so that RegistrySearch properties get evaluated before they are used -->
<AppSearch Before="FindRelatedProducts" />
<RemoveExistingProducts After="InstallInitialize" />
<!-- We replace the use of VS90Setup with StyleCopVS90Setup to add support for other devenv.exe flags -->
<Custom Action="StyleCopVS90Setup" Before="InstallFinalize"><![CDATA[&Feature_StyleCopPackage > 1 AND VS90DEVENV <> "" AND NOT Installed]]></Custom>
<Custom Action="StyleCopVS10Setup" Before="InstallFinalize"><![CDATA[(&Feature_StyleCopPackage > 1 AND VS2010DEVENV <> "" AND NOT Installed) OR (&Feature_VisualStudioTemplates = 3)]]></Custom>
<Custom Action="StyleCopVS11Setup" Before="InstallFinalize"><![CDATA[(&Feature_StyleCopPackage > 1 AND VS2012DEVENV <> "" AND NOT Installed) OR (&Feature_VisualStudioTemplates = 3)]]></Custom>
<Custom Action="StyleCopVS12Setup" Before="InstallFinalize"><![CDATA[(&Feature_StyleCopPackage > 1 AND VS2013DEVENV <> "" AND NOT Installed) OR (&Feature_VisualStudioTemplates = 3)]]></Custom>
<Custom Action="SetARPINSTALLLOCATION" After="InstallValidate"></Custom>
<Custom Action='CA_BackupVisualStudioTemplateFiles' Before='InstallFiles'><![CDATA[&Feature_VisualStudioTemplates = 3]]></Custom>
<Custom Action='CA_RestoreVisualStudioTemplateFiles' Before='InstallFinalize'><![CDATA[&Feature_VisualStudioTemplates = 2 AND !Feature_VisualStudioTemplates = 3]]></Custom>
</InstallExecuteSequence>
<WixVariable Id="WixUISupportPerUser" Value="0" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" />
<UI>
<UIRef Id="WixUI_FeatureTreeCustom" />
<UIRef Id="WixUI_ErrorProgressText" />
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ReSharperVersionDlg" Order="1">
<![CDATA[
(&Feature_ReSharper = 3)
AND
(
(RESHARPER51_VERSION <> "" AND RESHARPER51_VERSION <> "$(var.SupportedReSharper51Version)")
OR
(RESHARPER60_VERSION <> "" AND RESHARPER60_VERSION <> "$(var.SupportedReSharper60Version)")
OR
(
RESHARPER61_VERSION <> "" AND
(
RESHARPER61_VERSION <> "$(var.SupportedReSharper610Version)" OR RESHARPER61_VERSION <> "$(var.SupportedReSharper611Version)"
)
)
OR
(RESHARPER70_VERSION <> "" AND RESHARPER70_VERSION <> "$(var.SupportedReSharper700Version)")
OR
(RESHARPER71_VERSION <> "" AND RESHARPER71_VERSION <> "$(var.SupportedReSharper710Version)")
OR
(RESHARPER82_VERSION <> "" AND RESHARPER82_VERSION <> "$(var.SupportedReSharper820Version)")
)
]]>
</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="2">
<![CDATA[
(&Feature_ReSharper = 3)
AND
(
(RESHARPER51_VERSION = "" OR RESHARPER51_VERSION = "$(var.SupportedReSharper51Version)")
AND
(RESHARPER60_VERSION = "" OR RESHARPER60_VERSION = "$(var.SupportedReSharper60Version)")
AND
(RESHARPER61_VERSION = "" OR RESHARPER61_VERSION = "$(var.SupportedReSharper610Version)" OR RESHARPER61_VERSION = "$(var.SupportedReSharper611Version)")
AND
(RESHARPER70_VERSION = "" OR RESHARPER70_VERSION = "$(var.SupportedReSharper700Version)")
AND
(RESHARPER71_VERSION = "" OR RESHARPER71_VERSION = "$(var.SupportedReSharper710Version)")
AND
(RESHARPER82_VERSION = "" OR RESHARPER82_VERSION = "$(var.SupportedReSharper820Version)")
)
]]>
</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="3"><![CDATA[&Feature_ReSharper < 3]]></Publish>
</UI>
<Media Id="1" Cabinet="WixSetup.cab" EmbedCab="yes" />
<Icon Id="WixIcon" SourceFile="..\VSPackage\Resources\StyleCop.ico" />
<Property Id="ALLUSERS" Value='1' Admin="yes" Secure="yes" />
<Property Id="ARPHELPLINK" Value='$(var.Manufacturer)' />
<Property Id="ARPPRODUCTICON" Value="WixIcon" />
<Property Id="ARPURLINFOABOUT" Value='$(var.Manufacturer)'/>
<Property Id="ARPURLUPDATEINFO" Value='$(var.Manufacturer)' />
<!-- This property is used to detect versions of StyleCop < 4.5 that had per user installs -->
<Property Id="STYLECOP_PREVIOUS_INSTALL_PER_USER" Admin="yes" Secure="yes">
<RegistrySearch Id="RegSearchForStyleCopPreviousInstallPerUser" Root="HKCU" Key="Software\Microsoft\Installer\Products\C35557135D88B35439BC04218A7235A3" Name="ProductName" Type="raw" />
</Property>
<CustomAction Id='IsPrivileged' Error='You need to be an administrator to install [ProductName].' />
<CustomAction Id="ToggleALLUSERSToPerUser" Property="ALLUSERS" Value=""/>
<CustomAction Id="RevertALLUSERSToPerMachine" Property="ALLUSERS" Value="1"/>
<CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
<Binary Id="WixCustomAction.dll" SourceFile="$(var.WixCustomAction.TargetDir)$(var.WixCustomAction.TargetName).CA.dll" />
<CustomAction Id="CA_RestoreVisualStudioTemplateFiles" BinaryKey="WixCustomAction.dll" DllEntry="RestoreVisualStudioTemplateFiles" Execute="deferred" Impersonate="no" Return="check" />
<CustomAction Id="CA_BackupVisualStudioTemplateFiles" BinaryKey="WixCustomAction.dll" DllEntry="BackupVisualStudioTemplateFiles" Execute="deferred" Impersonate="no" Return="check" />
</Product>
</Wix>