-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.wxs
113 lines (105 loc) · 6.56 KB
/
Package.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
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<!--
Package Settings. Grab version number from (64bit) vst3 file.
The UpgradeCode needs to be a unique GUID. These can be generated
in the Visual Studio menu.
-->
<Package Name="apVerb" Manufacturer="apulSoft" Version="!(bind.fileVersion.VST3PLUG)" UpgradeCode="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" Compressed="yes">
<!-- Allow downgrades -->
<MajorUpgrade AllowDowngrades="yes" />
<!-- Everything should be inside one compressed .msi file -->
<Media Id="1" Cabinet="cab1.cab" EmbedCab="yes" CompressionLevel="high"/>
<!-- Custom .rtf License -->
<WixVariable Id="WixUILicenseRtf" Value="EULA.rtf" />
<!--
Custom Banner Images.
I used double this resolution to support HiDPI screens. Unfortunately, the scaling used is very poor.
Luckily my images are just flat vector graphics, so it turns out okay.
This way it looks at least perfect on 200% scale screens.
-->
<WixVariable Id="WixUIBannerBmp" Value="..\..\..\Tools\WiX\Banner493x58.bmp"/>
<WixVariable Id="WixUIDialogBmp" Value="..\..\..\Tools\WiX\Banner493x312.bmp"/>
<!--
The WiX UI Dialog Flow to use.
This determines the dialogs used and their order.
It's possible to customize by grabbing the .wxs file
from the WiX installation and altering it,
but it is tricky business!
-->
<ui:WixUI Id="WixUI_FeatureTree"/>
<!--
Read some folder paths from the registry.
These might have been written by previous runs/other installers.
Their default values are defined here.
-->
<Property Id="PRODDATAFOLDER">
<RegistrySearch Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="DataPath" Type="raw" />
</Property>
<Property Id="VST2FOLDER_32">
<RegistrySearch Root="HKCU" Key="Software\[Manufacturer]\Installer" Name="VST2Path32" Type="raw" />
</Property>
<Property Id="VST2FOLDER">
<RegistrySearch Root="HKCU" Key="Software\[Manufacturer]\Installer" Name="VST2Path64" Type="raw" />
</Property>
<!-- The list of features that can be selected. -->
<Feature Id="VST3_32" Title="32-bit VST3 Plugin" Description="Install the 32-bit VST3 version of !(bind.Property.ProductName) to Program Files (x86)\Common\VST3">
<ComponentGroupRef Id="VST3_32" />
</Feature>
<Feature Id="VST3_64" Title="64-bit VST3 Plugin" Description="Install the 64-bit VST3 version of !(bind.Property.ProductName) to Program Files\Common\VST3">
<ComponentGroupRef Id="VST3_64" />
</Feature>
<Feature Id="AAX_32" Title="32-bit AAX Plugin" Description="Install the 32-bit AAX version of !(bind.Property.ProductName) to Program Files (x86)\Common\Avid\Audio\Plug-Ins">
<ComponentGroupRef Id="AAX_32" />
</Feature>
<Feature Id="AAX_64" Title="64-bit AAX Plugin" Description="Install the 64-bit AAX version of !(bind.Property.ProductName) to Program Files\Common\Avid\Audio\Plug-Ins">
<ComponentGroupRef Id="AAX_64" />
</Feature>
<Feature Id="VST2_32" Title="32-bit VST2 Plugin" Description="Install the 32-bit VST2 version of !(bind.Property.ProductName) to Program Files (x86)\Steinberg\VSTPlugins" ConfigurableDirectory="VST2FOLDER_32">
<ComponentGroupRef Id="VST2_32" />
</Feature>
<Feature Id="VST2_64" Title="64-bit VST2 Plugin" Description="Install the 64-bit VST2 version of !(bind.Property.ProductName) to Program Files\Steinberg\VSTPlugins" ConfigurableDirectory="VST2FOLDER">
<ComponentGroupRef Id="VST2_64" />
</Feature>
<Feature Id="PRESETSMANUAL" Title="Factory Presets, Manual & Color Schemes" Description="Install the !(bind.Property.ProductName) factory presets, the .pdf manual and color schemes to your data folder." ConfigurableDirectory="PRODDATAFOLDER">
<ComponentGroupRef Id="PRESETS" />
<ComponentGroupRef Id="MANUAL" />
<ComponentGroupRef Id="COLORSCHEMES" />
</Feature>
<!-- The base gets installed always. -->
<Feature Id="BASE" Title="Base" Display="hidden">
<ComponentGroupRef Id="BASE" />
</Feature>
<!-- Prevent rollback scripts from being created https://learn.microsoft.com/en-us/windows/desktop/msi/-disablerollback -->
<Property Id='DISABLEROLLBACK' Value='1' />
<!-- Disable system restore points and file costing calculations https://learn.microsoft.com/de-de/windows/desktop/Msi/msifastinstall -->
<Property Id='MSIFASTINSTALL' Value='7' />
<!-- Make the installer 'dumb': https://learn.microsoft.com/en-us/windows/win32/msi/reinstallmode
'a' overwrite all files
'm' overwrite machine registry keys
'u' overwrite user registry keys
's' overwrite shortcuts and icons. -->
<Property Id='REINSTALLMODE' Value='amus'/>
<!--
The next section is about cpu feature detection.
apVerb requires a CPU with AVX support. If it's unavailable, the
installer should refuse to run.
To do this, a special .dll had to be created called AVXDetectBinary.
Its source code is in a subfolder.
-->
<Binary Id="AVXDetectBinary" SourceFile="AvxDetectActionWiX.dll" />
<!-- This property is set by the .dll and is shared between installer UI and actual installer (=Secure) -->
<Property Id="AVXSUPPORTED" Secure="yes" />
<!-- Run the one method in the .dll immediately. It writes to the AVXDetectBinary property. -->
<CustomAction Id="AVXCheck" BinaryRef="AVXDetectBinary" DllEntry="AVXDetect" Execute="immediate" Return="check"/>
<!-- execute sequence is required if the (un)install happens without gui -->
<InstallExecuteSequence>
<Custom Action="AVXCheck" Before="LaunchConditions" />
</InstallExecuteSequence>
<!-- This was the key.. UISequence is needed (UI flow), not ExecuteSequence (install flow). -->
<InstallUISequence>
<Custom Action="AVXCheck" Before="LaunchConditions" />
</InstallUISequence>
<!-- Only launch install if AVX is supported, otherwise display a dialog and abort. -->
<Launch Condition="AVXSUPPORTED = "1"" Message="This machine does not support AVX instructions, which are required for [Manufacturer] [ProductName]." />
</Package>
</Wix>