Source code

Revision control

Other Tools

1
<?xml version="1.0" encoding="utf-8"?>
2
4
5
<!-- The version field only supports MSI version numbers, which cannot include
6
letters, and therefore cannot represent our version numbers. Set it to all
7
zeros to show it isn't valid, and add the real version to the Name. -->
8
<Product Name="$(var.BrandFullName) $(var.Version) $(var.Architecture) $(var.AB_CD)"
9
Manufacturer="$(var.Vendor)" Language="0" Codepage="1252"
10
Version="$(var.EmbeddedVersionCode)" Id="1294a4c5-9977-480f-9497-c0ea1e630130"
11
UpgradeCode="3118ab4c-b433-4fbb-b9fa-8f9ca4b5c103" >
12
13
<Package Id="*" InstallerVersion="200" Compressed="yes"
14
Platform="$(var.Architecture)" />
15
16
<!-- We need a CAB to avoid failing an ICE, even though we have no payload. -->
17
<Media Id="1" Cabinet="setup.cab" EmbedCab="yes" />
18
19
<!-- We need a component and feature, or msiexec will refuse to load us. -->
20
<Directory Id="TARGETDIR" Name="SourceDir">
21
<Directory Id="TempFolder">
22
<Component Id="EmptyComponent" Guid="55a76b76-7496-4b47-a7a6-c5fbdd5e51a4">
23
<CreateFolder />
24
</Component>
25
</Directory>
26
</Directory>
27
28
<!-- Setting the feature to level 0 marks it hidden, so it can't be installed.
29
That prevents getting this MSI registered as an installed product,
30
because it has no features of its own to install. -->
31
<Feature Id="EmptyFeature" Level="0">
32
<ComponentRef Id="EmptyComponent" />
33
</Feature>
34
35
<!-- Embed the installer we want to run directly into the MSI database. -->
36
<Binary Id="WrappedExe" SourceFile="$(var.ExeSourcePath)" />
37
38
<!-- User-configurable properties. One of these corresponds to each documented
39
command-line parameter. Properties cannot be present without a value,
40
so use a conspicuous and difficult to mistake string for the parameters
41
that have no real default values. -->
42
<Property Id="INSTALL_DIRECTORY_PATH" Value="__DEFAULT__" />
43
<Property Id="INSTALL_DIRECTORY_NAME" Value="__DEFAULT__" />
44
<Property Id="TASKBAR_SHORTCUT" Value="true" />
45
<Property Id="DESKTOP_SHORTCUT" Value="true" />
46
<Property Id="START_MENU_SHORTCUT" Value="true" />
47
<Property Id="INSTALL_MAINTENANCE_SERVICE" Value="true" />
48
<Property Id="REMOVE_DISTRIBUTION_DIR" Value="true" />
49
<Property Id="PREVENT_REBOOT_REQUIRED" Value="false" />
50
<Property Id="OPTIONAL_EXTENSIONS" Value="true" />
51
<Property Id="REGISTER_DEFAULT_AGENT" Value="true" />
52
<Property Id="EXTRACT_DIR" Value="__DEFAULT__" />
53
54
<!-- Always include all of the boolean options on the command line, so we don't
55
have to conditionally decide when to include each one of them. For the
56
directory settings though, we can't put them on the command line with the
57
default values those properties have, so we need a separate action for
58
each possible configuration of those settings, and conditions to select
59
the right action to use based on which properties are configured.
60
WiX throws warning LGHT1076 complaining that these command strings are
61
too long, but they actually work just fine, the warning is spurious. -->
62
<CustomAction Id="RunInstallNoDir" Return="check" Execute="deferred"
63
HideTarget="no" Impersonate="no" BinaryKey="WrappedExe"
64
ExeCommand="/S /TaskbarShortcut=[TASKBAR_SHORTCUT] /DesktopShortcut=[DESKTOP_SHORTCUT] /StartMenuShortcut=[START_MENU_SHORTCUT] /MaintenanceService=[INSTALL_MAINTENANCE_SERVICE] /RemoveDistributionDir=[REMOVE_DISTRIBUTION_DIR] /PreventRebootRequired=[PREVENT_REBOOT_REQUIRED] /OptionalExtensions=[OPTIONAL_EXTENSIONS] /RegisterDefaultAgent=[REGISTER_DEFAULT_AGENT] /LaunchedFromMSI" />
65
<CustomAction Id="RunInstallDirPath" Return="check" Execute="deferred"
66
HideTarget="no" Impersonate="no" BinaryKey="WrappedExe"
67
ExeCommand="/S /InstallDirectoryPath=[INSTALL_DIRECTORY_PATH] /TaskbarShortcut=[TASKBAR_SHORTCUT] /DesktopShortcut=[DESKTOP_SHORTCUT] /StartMenuShortcut=[START_MENU_SHORTCUT] /MaintenanceService=[INSTALL_MAINTENANCE_SERVICE] /RemoveDistributionDir=[REMOVE_DISTRIBUTION_DIR] /PreventRebootRequired=[PREVENT_REBOOT_REQUIRED] /OptionalExtensions=[OPTIONAL_EXTENSIONS] /RegisterDefaultAgent=[REGISTER_DEFAULT_AGENT] /LaunchedFromMSI" />
68
<CustomAction Id="RunInstallDirName" Return="check" Execute="deferred"
69
HideTarget="no" Impersonate="no" BinaryKey="WrappedExe"
70
ExeCommand="/S /InstallDirectoryName=[INSTALL_DIRECTORY_NAME] /TaskbarShortcut=[TASKBAR_SHORTCUT] /DesktopShortcut=[DESKTOP_SHORTCUT] /StartMenuShortcut=[START_MENU_SHORTCUT] /MaintenanceService=[INSTALL_MAINTENANCE_SERVICE] /RemoveDistributionDir=[REMOVE_DISTRIBUTION_DIR] /PreventRebootRequired=[PREVENT_REBOOT_REQUIRED] /OptionalExtensions=[OPTIONAL_EXTENSIONS] /RegisterDefaultAgent=[REGISTER_DEFAULT_AGENT] /LaunchedFromMSI" />
71
<CustomAction Id="RunExtractOnly" Return="check" Execute="deferred"
72
HideTarget="no" Impersonate="no" BinaryKey="WrappedExe"
73
ExeCommand="/ExtractDir=[EXTRACT_DIR]" />
74
75
<!-- When we run the custom actions is kind of arbitrary; this sequencing gets
76
us the least confusing message showing in the MSI progress dialog while
77
the installer runs. Our actions don't need to be sequenced relative
78
to one another because only one will ever run. -->
79
<InstallExecuteSequence>
80
<Custom Action="RunInstallNoDir" After="ProcessComponents">
81
<![CDATA[
82
(INSTALL_DIRECTORY_PATH = "__DEFAULT__") AND
83
(INSTALL_DIRECTORY_NAME = "__DEFAULT__") AND
84
(EXTRACT_DIR = "__DEFAULT__")
85
]]>
86
</Custom>
87
<Custom Action="RunInstallDirPath" After="ProcessComponents">
88
<![CDATA[
89
(INSTALL_DIRECTORY_PATH <> "__DEFAULT__") AND
90
(INSTALL_DIRECTORY_NAME = "__DEFAULT__") AND
91
(EXTRACT_DIR = "__DEFAULT__")
92
]]>
93
</Custom>
94
<Custom Action="RunInstallDirName" After="ProcessComponents">
95
<![CDATA[
96
(INSTALL_DIRECTORY_NAME <> "__DEFAULT__") AND
97
(EXTRACT_DIR = "__DEFAULT__")
98
]]>
99
</Custom>
100
<Custom Action="RunExtractOnly" After="ProcessComponents">
101
<![CDATA[
102
EXTRACT_DIR <> "__DEFAULT__"
103
]]>
104
</Custom>
105
</InstallExecuteSequence>
106
</Product>
107
108
</Wix>