-
Notifications
You must be signed in to change notification settings - Fork 29.6k
/
product.wxs
executable file
Β·331 lines (290 loc) Β· 14.3 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
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?define ProductName = "io.js" ?>
<?define ProductDescription = "io.js" ?>
<?define ProductAuthor = "io.js contributors" ?>
<?define RegistryKeyPath = "SOFTWARE\io.js" ?>
<?define RepoDir="$(var.ProjectDir)..\..\..\" ?>
<?define SourceDir="$(var.RepoDir)\$(var.Configuration)\" ?>
<Product Id="*"
Name="$(var.ProductName)"
Language="1033"
Version="$(var.ProductVersion)"
Manufacturer="$(var.ProductAuthor)"
UpgradeCode="47c07a3a-42ef-4213-a85d-8f5a59077c28">
<Package InstallerVersion="200" Compressed="yes"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
<MajorUpgrade AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of io.js is already installed. Setup will now exit."/>
<Icon Id="NodeIcon" SourceFile="$(var.RepoDir)\src\res\iojs.ico"/>
<Property Id="ARPPRODUCTICON" Value="NodeIcon"/>
<Property Id="ApplicationFolderName" Value="iojs"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
<Property Id="INSTALLDIR">
<RegistrySearch Id="InstallPathRegistry"
Type="raw"
Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"/>
</Property>
<Feature Id="NodeRuntime"
Level="1"
Title="io.js runtime"
Description="Install the core io.js runtime (iojs.exe)."
Absent="disallow">
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeVarsScript"/>
<ComponentRef Id="NodeStartMenuAndRegistryEntries"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="Product.Generated"/>
<Feature Id="NodeAlias"
Level="1"
Title="Alias node to iojs"
Description="Create node.exe as an alias for iojs.exe.">
<ComponentRef Id="NodeAlias"/>
</Feature>
<Feature Id="NodePerfCtrSupport"
Level="1"
Title="Performance counters"
Description="Installs support for io.js-specific performance counters.">
<ComponentRef Id="NodePerfCtrSupport"/>
</Feature>
<Feature Id="NodeEtwSupport"
Level="1"
Title="Event tracing (ETW)"
Description="Installs support for event tracing (ETW) events generated by io.js.">
<ComponentRef Id="NodeEtwSupport"/>
</Feature>
</Feature>
<Feature Id="npm"
Level="1"
Title="npm package manager"
Description="Install npm, the recommended package manager for io.js.">
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="NpmSourceFiles"/>
</Feature>
<Feature Level="1"
Id="DocumentationShortcuts"
Title="Online documentation shortcuts"
Description="Add start menu entries that link the the online documentation for io.js $(var.ProductVersion) and the io.js website.">
<ComponentRef Id="DocumentationShortcuts"/>
</Feature>
<Feature Id="EnvironmentPath"
Level="1"
Title="Add to PATH"
Description="Add io.js, npm, and modules that were globally installed by npm to the PATH environment variable.">
<Feature Id="EnvironmentPathNode"
Level="1"
Title="io.js and npm"
Description="Add io.js and npm (if installed) to the PATH environment variable.">
<ComponentRef Id="EnvironmentPathNode"/>
</Feature>
<Feature Id="EnvironmentPathNpmModules"
Level="1"
Title="npm modules"
Description="Add modules that are installed globally by npm to the PATH environment variable. This option works for the current user only; other users need to update their PATH manually.">
<ComponentRef Id="EnvironmentPathNpmModules"/>
</Feature>
</Feature>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="io.js"/>
</Directory>
<Directory Id="$(var.ProgramFilesFolderId)">
<Directory Id="INSTALLDIR" Name="iojs">
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="NodeExecutable">
<File Id="iojs.exe" KeyPath="yes" Source="$(var.SourceDir)\iojs.exe"/>
</Component>
<Component Id="NodeAlias" Guid="fde09cce-a503-4409-a3c4-61ae2a5a5906">
<!-- Always remove node.exe. The hard link will be recreated by the
`LinkNodeExeToIojsExe` custom action whenever needed. -->
<RemoveFile Id="node.exe" Name="node.exe" On="both" />
</Component>
<Component Id="NodeVarsScript">
<File Id="nodevars.bat" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodevars.bat"/>
</Component>
<?if $(var.NoPerfCtr) != 1 ?>
<Component Id="NodePerfCtrSupport">
<File Id="node_perfctr_provider_man" Name="node_perfctr_provider.man" Source="$(var.RepoDir)\src\res\node_perfctr_provider.man">
<util:PerfCounterManifest ResourceFileDirectory="[INSTALLDIR]"/>
</File>
</Component>
<?endif?>
<?if $(var.NoETW) != 1 ?>
<Component Id="NodeEtwSupport">
<File Id="node_etw_provider.man" Source="$(var.RepoDir)\src\res\node_etw_provider.man">
<util:EventManifest MessageFile="[INSTALLDIR]iojs.exe" ResourceFile="[INSTALLDIR]iojs.exe"/>
</File>
</Component>
<?endif?>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="NodeStartMenuAndRegistryEntries">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="InstallPath"
Type="string"
Value="[INSTALLDIR]"
KeyPath="yes"/>
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)"
Name="Version"
Type="string"
Value="$(var.ProductVersion)"/>
<Shortcut Id="NodeVarsScriptShortcut"
Name="io.js command prompt"
Target="[%ComSpec]"
Arguments='/k "[INSTALLDIR]nodevars.bat"'
Show="normal"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="NodeExecutableShortcut"
Name="io.js"
Target="[INSTALLDIR]iojs.exe"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="UninstallProduct"
Name="Uninstall io.js"
Target="[SystemFolder]msiexec.exe"
Arguments="/x [ProductCode]"/>
<RemoveFolder Id="RemoveApplicationProgramsFolder"
On="uninstall"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="NpmCmdScript">
<File Id="npm.cmd" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm.cmd"/>
</Component>
<Component Id="NpmBashScript">
<File Id="npm.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm"/>
</Component>
<Directory Id="NodeModulesFolder" Name="node_modules">
<Directory Id="NpmFolder" Name="npm">
<Component Id="NpmConfigurationFile">
<File Id="npm.rc" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\npm\npmrc"/>
</Component>
</Directory>
</Directory>
<Directory Id="AppDataFolder">
<Directory Id="AppDataDir" Name="npm">
<Component Id="AppData" Guid="D3B35D0E-D0F9-4D11-A773-D4608E90E1D1">
<CreateFolder />
<RemoveFolder Id="AppDataDir" On="uninstall" />
<RegistryValue Root="HKCU" Key="$(var.RegistryKeyPath)\Components" Type="string" Value="" />
</Component>
</Directory>
</Directory>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="DocumentationShortcuts">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)\Components"
Name="DocumentationShortcuts"
Type="integer"
Value="1"
KeyPath="yes"/>
<util:InternetShortcut Id="WebsiteShortcut"
Name="io.js website"
Target="http://iojs.org"
Type="url"/>
<util:InternetShortcut Id="DocsShortcut"
Name="io.js documentation"
Target="https://iojs.org/dist/v$(var.ProductVersion)/doc/api/"
Type="url"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="EnvironmentPathNode">
<RegistryValue Root="HKLM"
Key="$(var.RegistryKeyPath)\Components"
Name="EnvironmentPathNode"
Type="integer"
Value="1"
KeyPath="yes"/>
<Environment Id="EnvironmentPathNode"
Action="set"
Name="PATH"
Part="last"
System="yes"
Value="[INSTALLDIR]"/>
</Component>
<Component Id="EnvironmentPathNpmModules">
<RegistryValue Root="HKCU"
Key="$(var.RegistryKeyPath)\Components"
Name="EnvironmentPathNpmModules"
Type="integer"
Value="1"
KeyPath="yes"/>
<Environment Id="EnvironmentPathNpmModules"
Action="set"
Name="PATH"
Part="last"
System="no"
Value="[AppDataFolder]npm"/>
</Component>
</DirectoryRef>
<CustomAction Id="LinkNodeExeToIojsExe"
FileKey="iojs.exe"
ExeCommand="-e " require('fs').linkSync(process.execPath, require('path').resolve(process.execPath, '../node.exe')); ""
Impersonate="no"
Execute="deferred"
Return="check" />
<InstallExecuteSequence>
<Custom Action="LinkNodeExeToIojsExe" After="InstallFiles">
$NodeAlias = 3
</Custom>
</InstallExecuteSequence>
<UI Id="NodeInstallUI">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8"/>
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12"/>
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes"/>
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal"/>
<Property Id="WixUI_Mode" Value="FeatureTree"/>
<DialogRef Id="ErrorDlg"/>
<DialogRef Id="FatalError"/>
<DialogRef Id="FilesInUse"/>
<DialogRef Id="MsiRMFilesInUse"/>
<DialogRef Id="PrepareDlg"/>
<DialogRef Id="ProgressDlg"/>
<DialogRef Id="ResumeDlg"/>
<DialogRef Id="UserExit"/>
<DialogRef Id="WelcomeDlg"/>
<DialogRef Id="LicenseAgreementDlg"/>
<DialogRef Id="InstallDirDlg"/>
<DialogRef Id="BrowseDlg"/>
<DialogRef Id="InvalidDirDlg"/>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg" Order="20">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20">1</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">NOT Installed OR WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">Installed AND PATCH</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="2">NOT Installed</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="io.js has been successfully installed."/>
</UI>
<UIRef Id="WixUI_Common"/>
<WixVariable Id="WixUIBannerBmp" Value="..\..\..\doc\thin-white-stripe.jpg"/>
<WixVariable Id="WixUIDialogBmp" Value="..\..\..\doc\full-white-stripe.jpg"/>
<WixVariable Id="WixUILicenseRtf" Value="$(var.SourceDir)\LICENSE.rtf"/>
</Product>
</Wix>