-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFramework.wxs
More file actions
271 lines (241 loc) · 13 KB
/
Framework.wxs
File metadata and controls
271 lines (241 loc) · 13 KB
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<?xml version="1.0"?>
<?if $(var.BuildArch) = x64?>
<?define PFDir = ProgramFiles64Folder?>
<?define CFDir = CommonFiles64Folder?>
<?else?>
<?define PFDir = ProgramFilesFolder?>
<?define CFDir = CommonFilesFolder?>
<?endif?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Name='$(var.ApplicationName) $(var.MajorVersion) Packages'
Id='$(var.ProductCode)'
UpgradeCode='$(var.UpgradeCode)'
Language='1033'
Codepage='1252'
Version='$(var.VersionNumber)'
Manufacturer='$(var.Manufacturer)'>
<Package Id='*'
Keywords='Installer'
Description="$(var.ApplicationName) $(var.MajorVersion).$(var.MinorVersion) Installer"
Comments='comments'
Manufacturer='$(var.Manufacturer)'
InstallerVersion='300'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252'
InstallPrivileges='elevated'
InstallScope='perMachine'/>
<Upgrade Id='$(var.UpgradeCode)'>
<UpgradeVersion OnlyDetect='yes' Property='SELFFOUND'
Minimum='$(var.VersionNumber)' IncludeMinimum='yes'
Maximum='$(var.VersionNumber)' IncludeMaximum='yes'/>
<UpgradeVersion OnlyDetect='yes' Property='NEWERFOUND'
Minimum='$(var.VersionNumber)' IncludeMinimum='no' />
<UpgradeVersion OnlyDetect='no' Property='PREVIOUSFOUND'
Minimum='0.0.0' IncludeMinimum='yes'
Maximum='$(var.VersionNumber)' IncludeMaximum='no' />
</Upgrade>
<Icon Id="Installer_Icon.ico" SourceFile="..\resources\Installer.ico" />
<Icon Id="Application_Icon.ico" SourceFile="..\resources\App.ico" />
<Property Id="BUNDLE_ID_GUID" Value='DefaultValue'/>
<Property Id="FULL_VERSION_NUMBER" Value='$(var.VersionNumber)'/>
<Property Id="ARPPRODUCTICON" Value="Installer_Icon.ico" />
<Property Id='ARPNOREMOVE'>1</Property>
<Property Id="DISPLAYNAME" Value="$(var.ApplicationName) $(var.MajorVersion)" />
<?include ../Common/Overrides.wxi?>
<Binary Id="MyCustomActionsDll"
SourceFile="../CustomActions/CustomActions/bin/Release/CustomActions.CA.dll" />
<CustomAction Id="CheckApplicationPath"
Return="check"
Execute="immediate"
BinaryKey="MyCustomActionsDll"
DllEntry="CheckAppPath" />
<CustomAction Id="DeleteRegistryVersionNumber"
Return="check"
Execute="immediate"
BinaryKey="MyCustomActionsDll"
DllEntry="DeleteVersionNumberFromRegistry" />
<Property Id='REGISTRYVERSIONKEY' Value='$(var.SafeApplicationName)\\Version' />
<CustomAction Id="CloseApplications"
Return="check"
Execute="immediate"
Impersonate="yes"
BinaryKey="MyCustomActionsDll"
DllEntry="ClosePrompt" />
<!-- The following two properties can be comma separted lists, but they must have the same number of items. -->
<Property Id='PromptToCloseProcesses' Value='$(var.SafeApplicationName)' />
<Property Id='PromptToCloseDisplayNames' Value='$(var.ApplicationName)' />
<!--<CustomAction Id="SetFontValues"
Return="check"
Execute="immediate"
BinaryKey="MyCustomActionsDll"
DllEntry="LookForInstalledFonts" />
<Property Id="DOULOS_INSTALLED" Value='False'/>
<Property Id="SBLHEB_INSTALLED" Value='False'/>
<Property Id="CHARIS_INSTALLED" Value='False'/>
<Property Id="APPARATUS_INSTALLED" Value='False'/>
<Property Id="GALATIA_INSTALLED" Value='False'/>
<Property Id="EZRA_INSTALLED" Value='False'/>-->
<Property Id="DATAFOLDER" Secure='yes'>
<RegistrySearch Id='RegSearchDataFolder' Root='HKLM' Key='SOFTWARE\[REGISTRYKEY]' Name='[DATAFOLDERREGSZNAME]' Type='raw'/>
</Property>
<CustomAction Id='SetDefDataFolder' Property='DEFDATAFOLDER' Value='[WindowsVolume]My$(var.SafeApplicationName)DataFolder' />
<Property Id="DATAFOLDERFOUND" Value="unset" />
<CustomAction Id="VerifyDataPath"
Return="check"
Execute="immediate"
BinaryKey="MyCustomActionsDll"
DllEntry="VerifyDataDirPath" />
<SetProperty Id='REGISTRYKEY' Value='$(var.SafeApplicationName)\\$(var.MajorVersion)' Before="AppSearch">not REGISTRYKEY</SetProperty>
<SetProperty Id='APPFOLDERREGSZNAME' Value='Program_Files_Directory_$(var.SafeApplicationName)' Before="AppSearch">not APPFOLDERREGSZNAME</SetProperty>
<SetProperty Id='DATAFOLDERREGSZNAME' Value='Settings_Directory' Before="AppSearch">not DATAFOLDERREGSZNAME</SetProperty>
<SetProperty Id='HARVESTDATAFOLDERREGSZNAME' Value='Data_Directory' Before="AppSearch">not HARVESTDATAFOLDERREGSZNAME</SetProperty>
<SetProperty Id='REGISTRYDATAKEY' Value='[REGISTRYKEY]' Before="AppSearch">not REGISTRYDATAKEY</SetProperty>
<SetProperty Id='REGISTRYDATAVALUENAME' Value='[DATAFOLDERREGSZNAME]' Before="AppSearch">not REGISTRYDATAVALUENAME</SetProperty>
<CustomAction Id='UseDefDataFolder' Property='DATAFOLDER' Value='[DEFDATAFOLDER]' />
<CustomAction Id='UseOvrDataFolder' Property='DATAFOLDER' Value='[OVRDATAFOLDER]' /> <!-- from Overrides.wxi -->
<CustomAction Id='UseRegDataFolder' Property='DATAFOLDER' Value='[REGDATAFOLDER]' />
<!-- TODO (HASSO) 2018.02: if there is no OVRHARVESTDATAFOLDER, make HARVESTDATAFOLDER whatever the user picked for DATAFOLDER -->
<CustomAction Id='UseDefHarvestDataFolder' Property='HARVESTDATAFOLDER' Value='[DATAFOLDER]' />
<CustomAction Id='UseOvrHarvestDataFolder' Property='HARVESTDATAFOLDER' Value='[OVRHARVESTDATAFOLDER]' /> <!-- from Overrides.wxi -->
<CustomAction Id='AlreadyUpdated' Error='Version [ProductVersion] of $(var.ApplicationName) is already installed.' />
<CustomAction Id='NoDowngrade' Error='A later version of $(var.ApplicationName) is already installed.' />
<CustomAction Id='CheckUpgradeValue' Property='ISUPGRADE' Value='True' />
<CustomAction Id='CheckPatchValue' Property='ISPATCH' Value='True' />
<InstallExecuteSequence>
<!--<Custom Action="SetFontValues" After="AppSearch"></Custom>-->
<Custom Action="DeleteRegistryVersionNumber" Before="RemoveRegistryValues">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<RemoveExistingProducts Before="InstallInitialize" />
<Custom Action='AlreadyUpdated' After='FindRelatedProducts'>SELFFOUND</Custom>
<Custom Action='NoDowngrade' After='FindRelatedProducts'>NEWERFOUND</Custom>
<Custom Action="CheckPatchValue" Before="CheckUpgradeValue">PATCHNEWSUMMARYSUBJECT="Small Update Patch"</Custom>
<Custom Action="CheckUpgradeValue" After="InstallFinalize">PREVIOUSFOUND</Custom>
<?include ../Common/CustomActionSteps.wxi?>
</InstallExecuteSequence>
<InstallUISequence>
<Custom Action="CloseApplications" Before="AppSearch">UILevel >= 3</Custom>
<Custom Action="SetDefDataFolder" After="FindRelatedProducts"></Custom>
<Custom Action="VerifyDataPath" After="AppSearch"></Custom>
<Custom Action="UseDefAppFolder" After="AppSearch">(NOT REGAPPFOLDER) and (NOT OVRAPPFOLDER)</Custom>
<Custom Action="UseOvrAppFolder" After="AppSearch">(NOT REGAPPFOLDER) and (OVRAPPFOLDER)</Custom>
<Custom Action="UseRegAppFolder" After="AppSearch">REGAPPFOLDER</Custom>
<Custom Action="UseDefDataFolder" After="AppSearch">(NOT REGDATAFOLDER) and (NOT OVRDATAFOLDER)</Custom>
<Custom Action="UseOvrDataFolder" After="AppSearch">(NOT REGDATAFOLDER) and (OVRDATAFOLDER)</Custom>
<Custom Action="UseRegDataFolder" After="AppSearch">REGDATAFOLDER</Custom>
<Custom Action="UseDefHarvestDataFolder" After="AppSearch">NOT OVRHARVESTDATAFOLDER</Custom>
<Custom Action="UseOvrHarvestDataFolder" After="AppSearch">OVRHARVESTDATAFOLDER</Custom>
</InstallUISequence>
<Media Id='1' Cabinet='AppTemplate.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="$(var.ApplicationName) $(var.MajorVersion).$(var.MinorVersion) Installation [1]" />
<WixVariable Id="WixUIBannerBmp" Value="..\resources\bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="..\resources\MsiBackground.bmp" />
<SetProperty Id="DEFAPPFOLDER" Value="[$(var.PFDir)]$(var.SafeApplicationName)$(var.MajorVersion)\" Before="AppSearch">not DEFAPPFOLDER</SetProperty>
<CustomAction Id='UseDefAppFolder' Property='APPFOLDER' Value='[DEFAPPFOLDER]' />
<CustomAction Id='UseOvrAppFolder' Property='APPFOLDER' Value='[OVRAPPFOLDER]' /> <!-- from Overrides.wxi -->
<CustomAction Id='UseRegAppFolder' Property='APPFOLDER' Value='[REGAPPFOLDER]' />
<Property Id="REGAPPFOLDER">
<RegistrySearch Id='RegistryAppFolder' Root='HKLM' Key='SOFTWARE\[REGISTRYKEY]' Name='[APPFOLDERREGSZNAME]' Type='directory'/>
</Property>
<Property Id="APPFOLDERFOUND" Value='NotFound'>
<RegistrySearch Id='RegistryAppBool' Root='HKLM' Key='SOFTWARE\[REGISTRYKEY]' Name='[APPFOLDERREGSZNAME]' Type='raw'/>
</Property>
<SetProperty Id="EXPLANATIONTEXT" After="AppSearch" Value="Since this is an upgrade of an existing $(var.ApplicationName) $(var.MajorVersion) installation, you can't change the location of the data folder.">
<![CDATA[DATAFOLDERFOUND = "AlreadyExisting"]]>
</SetProperty>
<Property Id="WIXUI_INSTALLDIR" Value="APPFOLDER" />
<Property Id='WIXUI_PROJECTSDIR' Value='DATAFOLDER'/>
<UIRef Id='WixUI_DialogFlow'/>
<UIRef Id="WixUI_ErrorProgressText" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='DATAFOLDER' Name='[DATAFOLDER]'>
<Component Id='RegKeySettingsDir' Permanent="yes" Guid='*'>
<CreateFolder>
<util:PermissionEx User="AuthenticatedUser" GenericAll="yes" />
</CreateFolder>
<RegistryKey Root='HKLM' Key='SOFTWARE\[REGISTRYKEY]' ForceDeleteOnUninstall='yes'>
<RegistryValue Name="[DATAFOLDERREGSZNAME]" Type='string' Value='[DATAFOLDER]' KeyPath='yes'/>
</RegistryKey>
</Component>
</Directory>
<Directory Id='HARVESTDATAFOLDER' Name='.'>
<Component Id='HarvestDataDir' Guid='*'>
<CreateFolder>
<util:PermissionEx User="AuthenticatedUser" GenericAll="yes" />
</CreateFolder>
<RegistryKey Root='HKLM' Key='SOFTWARE\[REGISTRYKEY]' ForceDeleteOnUninstall='yes'>
<RegistryValue Name="[HARVESTDATAFOLDERREGSZNAME]" Type='string' Value='[OVRHARVESTDATAFOLDER]' KeyPath='yes'/>
</RegistryKey>
</Component>
</Directory>
<Directory Id='FontsFolder'/>
<Directory Id="DesktopFolder" Name="Desktop">
<Component Id="ApplicationShortcutDesktop" Guid="*">
<Shortcut Id="ApplicationDesktopShortcut"
Name="$(var.ApplicationName) $(var.MajorVersion)"
Description="$(var.ApplicationName) $(var.MajorVersion)"
Target="[APPFOLDER]$(var.SafeApplicationName).exe"
WorkingDirectory="APPFOLDER"
Icon="Application_Icon.ico"/>
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
<RegistryValue
Root="HKCU"
Key="Software\$(var.SafeApplicationName)$(var.MajorVersion)"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</Directory>
<Directory Id='$(var.PFDir)' SourceName="Program Files">
<Directory Id='APPFOLDER' Name='$(var.SafeApplicationName)$(var.MajorVersion)'>
<Component Id='RegKeyValues' Guid='*'>
<RegistryKey Root='HKLM' Key='SOFTWARE\[REGISTRYKEY]' ForceDeleteOnUninstall='yes'>
<RegistryValue Name="[APPFOLDERREGSZNAME]" Type='string' Value='[APPFOLDER]'/>
<RegistryValue Name="$(var.SafeApplicationName)Version" Type='string' Value='$(var.VersionNumber)'/>
</RegistryKey>
</Component>
<Component Id='Vapor' Guid='3C4B8E68-6147-482F-B7ED-17C485024AEF' KeyPath='yes'/>
</Directory>
<Directory Id='$(var.CFDir)'>
<Directory Id='CompanyCommonFilesFolder' Name='$(var.SafeManufacturer)'>
<Component Id='ProcRunner' Guid='*' Permanent='yes' UninstallWhenSuperseded='yes' NeverOverwrite='no'>
<File Id='ProcRunnerFile' Name='ProcRunner_5.0.exe'
Source='../ProcRunner/ProcRunner/bin/Release/net48/ProcRunner_5.0.exe' KeyPath='yes'/>
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder"/>
</Directory>
<DirectoryRef Id="ProgramMenuFolder">
<Component Id="ApplicationShortcutMenu" Guid="*">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="$(var.ApplicationName) $(var.MajorVersion)"
Description="$(var.ApplicationName) $(var.MajorVersion)"
Target="[APPFOLDER]$(var.SafeApplicationName).exe"
WorkingDirectory="APPFOLDER"
Icon="Application_Icon.ico"/>
<Shortcut Id="UninstallProduct"
Name="Uninstall $(var.ApplicationName)"
Target="[SystemFolder]msiexec.exe"
Arguments="/x [ProductCode]"
Description="Uninstalls $(var.ApplicationName)" />
<RegistryValue Root="HKCU" Key="Software\Microsoft\$(var.SafeApplicationName)$(var.MajorVersion)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<?include ../Common/CustomComponents.wxi?>
<!-- A "typical" install will install featues of level 3 and below. A "complete" install will install features of level 1000 and below.
A "custom" install will display the tree view with items of value "3" and below selected by default. -->
<Feature Id='Complete' Title='$(var.ApplicationName) $(var.MajorVersion).$(var.MinorVersion)' Description='The complete package.'
Display='expand' Level='1' AllowAdvertise="no" InstallDefault="source" Absent='disallow' >
<ComponentRef Id='Vapor'/>
<ComponentGroupRef Id="HarvestedAppFiles" />
<ComponentRef Id='RegKeyValues'/>
<ComponentRef Id='RegKeySettingsDir'/>
<ComponentRef Id='HarvestDataDir'/>
<ComponentRef Id='ProcRunner'/>
<?include ../Common/CustomFeatures.wxi?>
</Feature>
</Product>
</Wix>