-
-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathpackage-Windows.sh
More file actions
241 lines (235 loc) · 14.8 KB
/
package-Windows.sh
File metadata and controls
241 lines (235 loc) · 14.8 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
VERSION=0.9.4
X64BitMode=""
if [[ $1 == "plugdata-Win64.msi" ]]; then
X64BitMode="x64"
fi
rm -f ./plugdata.wxs
cat > ./plugdata.wxs <<-EOL
<?xml version="1.0"?>
<?define ProductVersion = "$VERSION" ?>
<?define ProductUpgradeCode = "54a05500-6d7a-479d-b884-ba844ccaf4ce" ?>
<?if "$X64BitMode" = "x64" ?>
<?define Win64 = "yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define PlatformCommonFilesFolder = "CommonFiles64Folder" ?>
<?define WixPlatform = "x64" ?>
<?define VstArch = "x86_64-win" ?>
<?else ?>
<?define Win64 = "no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define PlatformCommonFilesFolder = "CommonFilesFolder" ?>
<?define VstArch = "x86-win" ?>
<?endif ?>
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="\$(var.ProductUpgradeCode)"
Name="plugdata" Version="\$(var.ProductVersion)" Manufacturer="Timothy Schoen" Language="1033">
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package"/>
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" CompressionLevel="high"/>
<Icon Id="ProductIcon" SourceFile="Resources\Icons\icon.ico"/>
<Property Id="ARPPRODUCTICON" Value="ProductIcon"/>
<WixVariable Id="WixUILicenseRtf" Value="Resources\Installer\LICENSE.rtf" />
<Property Id="ARPHELPLINK" Value="http://www.github.com/plugdata-team/plugdata"/>
<Property Id="ARPURLINFOABOUT" Value="http://www.github.com/plugdata-team/plugdata"/>
<Property Id="ARPNOREPAIR" Value="1"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- Copy Standalone to Program Files -->
<Directory Id="\$(var.PlatformProgramFilesFolder)">
<Directory Id="INSTALLDIR" Name="plugdata">
<Component Id="STANDALONE_FILES" Guid="0a2563f0-5f49-4ae8-acda-143a019f73a2" Win64="\$(var.Win64)">
<RemoveFile Id="STANDALONE_EXE" Name="plugdata.exe" On="both"/>
<RemoveFile Id="PD_DLL" Name="Pd.dll" On="both"/>
<File Id="STANDALONE_EXE" Source="Plugins\Standalone\plugdata.exe"/>
<File Id="PD_DLL" Source="Plugins\Standalone\Pd.dll"/>
<ReserveCost Id="STANDALONE_COST" RunFromSource="43200000" RunLocal="43200000"></ReserveCost>
</Component>
<Component Id="BINARYDATA_PRIMARY" Guid="a1b2c3d4-e5f6-7890-abcd-ef1234567890" Win64="\$(var.Win64)">
<RemoveFile Id="BINARYDATA_BIN_REMOVE" Name="plugdata-resources.bin" On="both"/>
<File Id="BINARYDATA_BIN" Source="Plugins\Standalone\plugdata-resources.bin" Name="plugdata-resources.bin"/>
<CopyFile Id="BINARYDATA_TO_VST3" FileId="BINARYDATA_BIN" DestinationDirectory="VST3_ARCH" DestinationName="plugdata-resources.bin"/>
<CopyFile Id="BINARYDATA_TO_VST3_FX" FileId="BINARYDATA_BIN" DestinationDirectory="VST3_FX_ARCH" DestinationName="plugdata-resources.bin"/>
<CopyFile Id="BINARYDATA_TO_LV2" FileId="BINARYDATA_BIN" DestinationDirectory="LV2_PLUGIN_DIR" DestinationName="plugdata-resources.bin"/>
<CopyFile Id="BINARYDATA_TO_LV2_FX" FileId="BINARYDATA_BIN" DestinationDirectory="LV2_FX_PLUGIN_DIR" DestinationName="plugdata-resources.bin"/>
<CopyFile Id="BINARYDATA_TO_CLAP" FileId="BINARYDATA_BIN" DestinationDirectory="CLAP_INSTALL_DIR" DestinationName="plugdata-resources.bin"/>
<?if \$(var.Win64) = "yes" ?>
<CopyFile Id="BINARYDATA_TO_AAX" FileId="BINARYDATA_BIN" DestinationDirectory="AAX_ARCH" DestinationName="plugdata-resources.bin"/>
<CopyFile Id="BINARYDATA_TO_AAX_FX" FileId="BINARYDATA_BIN" DestinationDirectory="AAX_FX_ARCH" DestinationName="plugdata-resources.bin"/>
<?endif ?>
</Component>
</Directory>
</Directory>
<!-- Create start menu shortcut for standalone -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuSubfolder" Name="plugdata">
<Component Id="STANDALONE_SHORTCUTS" Guid="8f2ac8c2-b3bc-4d3c-8097-b62b5eed28ae">
<Shortcut Id="ApplicationShortcut1" Name="plugdata" Description="plugdata"
Target="[INSTALLDIR]plugdata.exe" WorkingDirectory="INSTALLDIR"/>
<RegistryValue Root="HKCU" Key="Software\plugdata\plugdata"
Name="installed" Type="integer" Value="1" KeyPath="yes"/>
<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall"/>
</Component>
</Directory>
</Directory>
<Directory Id="\$(var.PlatformCommonFilesFolder)">
<!-- Copy VST3 to Common Files\VST3 -->
<Directory Id="VST3_INSTALL_DIR" Name="VST3">
<Directory Id="VST3_PLUGIN_DIR" Name="plugdata.vst3">
<Directory Id="VST3_CONTENTS" Name="Contents">
<Directory Id="VST3_ARCH" Name="\$(var.VstArch)">
<Component Id="VST3_BIN" Guid="d227e6fe-9fca-4908-a60c-f25d260f642e" Win64="\$(var.Win64)">
<RemoveFile Id="VST3_PLUGIN" Name="plugdata.vst3" On="both"/>
<File Id="VST3_PLUGIN" Source="Plugins\VST3\plugdata.vst3\Contents\\\$(var.VstArch)\plugdata.vst3"/>
</Component>
</Directory>
</Directory>
<Component Id="VST3_EXTRA" Guid="7962383a-5b95-4f04-b644-f13f7896e4df" Win64="\$(var.Win64)">
<RemoveFile Id="VST3_DESKTOP" Name="desktop.ini" On="both"/>
<RemoveFile Id="VST3_ICON" Name="Plugin.ico" On="both"/>
<File Id="VST3_DESKTOP" Source="Plugins\VST3\plugdata.vst3\desktop.ini"/>
<File Id="VST3_ICON" Source="Plugins\VST3\plugdata.vst3\Plugin.ico"/>
<File Id="VST3_MODULEINFO" Source="Plugins\VST3\plugdata.vst3\Contents\Resources\moduleinfo.json"/>
<ReserveCost Id="VST3_COST" RunFromSource="89900000" RunLocal="89900000"></ReserveCost>
</Component>
</Directory>
<Directory Id="VST3_FX_PLUGIN_DIR" Name="plugdata-fx.vst3">
<Directory Id="VST3_FX_CONTENTS" Name="Contents">
<Directory Id="VST3_FX_ARCH" Name="\$(var.VstArch)">
<Component Id="VST3_FX_BIN" Guid="9ce8241b-af1f-48b1-b61e-db74c4564d64" Win64="\$(var.Win64)">
<RemoveFile Id="VST3_FX_PLUGIN" Name="plugdata-fx.vst3" On="both"/>
<File Id="VST3_FX_PLUGIN" Source="Plugins\VST3\plugdata-fx.vst3\Contents\\\$(var.VstArch)\plugdata-fx.vst3"/>
</Component>
</Directory>
</Directory>
<Component Id="VST3_FX_EXTRA" Guid="e195aac1-1211-4b6d-a86e-9a57448955a2" Win64="\$(var.Win64)">
<RemoveFile Id="VST3_FX_DESKTOP" Name="desktop.ini" On="both"/>
<RemoveFile Id="VST3_FX_ICON" Name="Plugin.ico" On="both"/>
<File Id="VST3_FX_DESKTOP" Source="Plugins\VST3\plugdata-fx.vst3\desktop.ini"/>
<File Id="VST3_FX_ICON" Source="Plugins\VST3\plugdata-fx.vst3\Plugin.ico"/>
<File Id="VST3_FX_MODULEINFO" Source="Plugins\VST3\plugdata-fx.vst3\Contents\Resources\moduleinfo.json"/>
</Component>
</Directory>
</Directory>
<!-- Copy LV2 to Common Files\LV2 -->
<Directory Id="LV2_INSTALL_DIR" Name="LV2">
<Directory Id="LV2_PLUGIN_DIR" Name="plugdata.lv2">
<Component Id="LV2_FILES" Guid="07a69bc3-61f7-4907-8086-561f4e4150eb" Win64="\$(var.Win64)">
<RemoveFile Id="LV2_PLUGIN" Name="plugdata.dll" On="both"/>
<RemoveFile Id="LV2_MANIFEST" Name="manifest.ttl" On="both"/>
<RemoveFile Id="LV2_DSP" Name="dsp.ttl" On="both"/>
<RemoveFile Id="LV2_UI" Name="ui.ttl" On="both"/>
<File Id="LV2_PLUGIN" Source="Plugins\LV2\plugdata.lv2\plugdata.dll"/>
<File Id="LV2_MANIFEST" Source="Plugins\LV2\plugdata.lv2\manifest.ttl"/>
<File Id="LV2_DSP" Source="Plugins\LV2\plugdata.lv2\dsp.ttl"/>
<File Id="LV2_UI" Source="Plugins\LV2\plugdata.lv2\ui.ttl"/>
<ReserveCost Id="LV2_COST" RunFromSource="82700000" RunLocal="82700000"></ReserveCost>
</Component>
</Directory>
<Directory Id="LV2_FX_PLUGIN_DIR" Name="plugdata-fx.lv2">
<Component Id="LV2_FX_FILES" Guid="b676dc16-52f8-46ef-82c2-fbc7268b12d0" Win64="\$(var.Win64)">
<RemoveFile Id="LV2_FX_PLUGIN" Name="plugdata-fx.dll" On="both"/>
<RemoveFile Id="LV2_FX_MANIFEST" Name="manifest.ttl" On="both"/>
<RemoveFile Id="LV2_FX_DSP" Name="dsp.ttl" On="both"/>
<RemoveFile Id="LV2_FX_UI" Name="ui.ttl" On="both"/>
<File Id="LV2_FX_PLUGIN" Source="Plugins\LV2\plugdata-fx.lv2\plugdata-fx.dll"/>
<File Id="LV2_FX_MANIFEST" Source="Plugins\LV2\plugdata-fx.lv2\manifest.ttl"/>
<File Id="LV2_FX_DSP" Source="Plugins\LV2\plugdata-fx.lv2\dsp.ttl"/>
<File Id="LV2_FX_UI" Source="Plugins\LV2\plugdata-fx.lv2\ui.ttl"/>
</Component>
</Directory>
</Directory>
<Directory Id="CLAP_INSTALL_DIR" Name="CLAP">
<Component Id="CLAP_FILES" Guid="deb58e55-8e6d-435d-8cdc-790970132f53" Win64="\$(var.Win64)">
<RemoveFile Id="CLAP_PLUGIN" Name="plugdata.clap" On="both"/>
<File Id="CLAP_PLUGIN" Source="Plugins\CLAP\plugdata.clap"/>
</Component>
<Component Id="CLAP_FX_FILES" Guid="90ff8eae-2cfe-4070-9c73-b62e4d219a36" Win64="\$(var.Win64)">
<RemoveFile Id="CLAP_FX_PLUGIN" Name="plugdata-fx.clap" On="both"/>
<File Id="CLAP_FX_PLUGIN" Source="Plugins\CLAP\plugdata-fx.clap"/>
</Component>
</Directory>
<?if \$(var.Win64) = "yes" ?>
<Directory Id="AVID_DIR" Name="Avid">
<Directory Id="AVID_AUDIO_DIR" Name="Audio">
<Directory Id="AAX_INSTALL_DIR" Name="Plug-Ins">
<Directory Id="AAX_PLUGIN_DIR" Name="plugdata.aaxplugin">
<Directory Id="AAX_CONTENTS" Name="Contents">
<Directory Id="AAX_ARCH" Name="x64">
<Component Id="AAX_FILES" Guid="3b8d4f21-7c92-4e15-9a8b-1d2e5f6a7b8c" Win64="\$(var.Win64)">
<RemoveFile Id="AAX_PLUGIN_REMOVE" Name="plugdata.aaxplugin" On="both"/>
<File Id="AAX_PLUGIN" Source="Plugins\AAX\plugdata.aaxplugin\Contents\x64\plugdata.aaxplugin"/>
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="AAX_FX_PLUGIN_DIR" Name="plugdata-fx.aaxplugin">
<Directory Id="AAX_FX_CONTENTS" Name="Contents">
<Directory Id="AAX_FX_ARCH" Name="x64">
<Component Id="AAX_FX_FILES" Guid="6e9a2b13-4d57-4f88-b3c1-8a9d0e1f2c3d" Win64="\$(var.Win64)">
<RemoveFile Id="AAX_FX_PLUGIN_REMOVE" Name="plugdata-fx.aaxplugin" On="both"/>
<File Id="AAX_FX_PLUGIN" Source="Plugins\AAX\plugdata-fx.aaxplugin\Contents\x64\plugdata-fx.aaxplugin"/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
<?endif ?>
</Directory>
</Directory>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UI>
<UIRef Id="WixUI_FeatureTree" />
</UI>
<Feature Id="DefaultFeature" Level="1" Title="Standalone App">
<ComponentRef Id="STANDALONE_FILES"/>
<ComponentRef Id="STANDALONE_SHORTCUTS"/>
<ComponentRef Id="BINARYDATA_PRIMARY"/>
</Feature>
<Feature Id="VST3" Level="1" Title="VST3 Plugin">
<ComponentRef Id="VST3_BIN"/>
<ComponentRef Id="VST3_EXTRA"/>
<ComponentRef Id="VST3_FX_BIN"/>
<ComponentRef Id="VST3_FX_EXTRA"/>
</Feature>
<Feature Id="LV2" Level="1" Title="LV2 Plugin">
<ComponentRef Id="LV2_FILES"/>
<ComponentRef Id="LV2_FX_FILES"/>
</Feature>
<Feature Id="CLAP" Level="1" Title="CLAP Plugin">
<ComponentRef Id="CLAP_FILES"/>
<ComponentRef Id="CLAP_FX_FILES"/>
</Feature>
<?if \$(var.Win64) = "yes" ?>
<Feature Id="AAX" Level="2" Title="AAX Plugin">
<ComponentRef Id="AAX_FILES"/>
<ComponentRef Id="AAX_FX_FILES"/>
</Feature>
<?endif ?>
<!-- define powershell script as base64 that will remove registry entries for old plugdata versions -->
<Property Id="reg_clean">powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -e JABkAGkAcwBwAGwAYQB5AE4AYQBtAGUAIAA9ACAAIgBwAGwAdQBnAGQAYQB0AGEAIgAKACQAcAB1AGIAbABpAHMAaABlAHIAIAA9ACAAIgBUAGkAbQBvAHQ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HIAZQBtAG8AdgBlAGQAOgAgACQAKAAkAHMAdQBiAEsAZQB5AC4AUABTAFAAYQB0AGgAKQAiAAoAIAAgACAAIAB9AAoAfQA=
</Property>
<CustomAction Id="CleanRegistry" Execute="deferred" Directory="TARGETDIR" ExeCommand='[reg_clean]' Return="ignore" Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="CleanRegistry" After="InstallInitialize"></Custom>
<RemoveExistingProducts After="InstallValidate"/>
</InstallExecuteSequence>
</Product>
</Wix>
EOL
if [[ $X64BitMode == "x64" ]]; then
"C:/Program Files (x86)/WiX Toolset v3.14/bin/candle" -arch x64 plugdata.wxs
"C:/Program Files (x86)/WiX Toolset v3.14/bin/light" plugdata.wixobj -out plugdata-Installer.msi -ext WixUIExtension
cp ".\plugdata-Installer.msi" ".\plugdata-Win64.msi"
else
"C:/Program Files (x86)/WiX Toolset v3.14/bin/candle" plugdata.wxs
"C:/Program Files (x86)/WiX Toolset v3.14/bin/light" plugdata.wixobj -out plugdata-Installer.msi -ext WixUIExtension
cp ".\plugdata-Installer.msi" ".\plugdata-Win32.msi"
fi
.github/scripts/generate-upload-info.sh $1
# - Codesign Installer for Windows 8+
# -"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /f "XXXXX.p12" /p XXXXX /d "plugdata Installer" ".\installer\plugdata Installer.exe"
# -if %1 == 1 (
# -copy ".\installer\plugdata Installer.exe" ".\installer\plugdata Demo Installer.exe"
# -del ".\installer\plugdata Installer.exe"
# -)