forked from Amebis/eduVPN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LetsConnectOpenVPN.wxs
239 lines (224 loc) · 10.7 KB
/
LetsConnectOpenVPN.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
<?xml version="1.0" encoding="utf-8"?>
<!--
Let's Connect! - The open source VPN
Copyright: 2017-2020 The Commons Conservancy eduVPN Programme
SPDX-License-Identifier: GPL-3.0+
-->
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product
Id="$(var.OpenVPN.ProductGUID)"
UpgradeCode="$(var.OpenVPN.UpgradeGUID)"
Version="$(var.OpenVPN.Version)"
Language="!(loc.ProductLanguage)"
Name="!(loc.$(var.ClientTarget).OpenVPNName) $(var.OpenVPN.VersionInformational)"
Manufacturer="!(loc.ManufacturerName)">
<Package
InstallScope="perMachine"
InstallerVersion="500"
Compressed="yes"
SummaryCodepage="!(loc.SummaryCodepage)"
ReadOnly="yes"/>
<Media
Id="1"
Cabinet="OpenVPN.cab"
EmbedCab="yes"/>
<Property Id="ARPURLINFOABOUT" Value="$(var.ClientAboutUrl)"/>
<!--
Upgrading functionality
-->
<MajorUpgrade
DowngradeErrorMessage="!(loc.NewerVersionInstalled)"
Schedule="afterInstallExecute"
AllowSameVersionUpgrades="yes"/>
<Property Id="BINDIRPREV">
<ComponentSearch Id="libeay32.dll" Guid="{0B2BF74E-5C4A-448A-8B2C-1FC076B5B824}"/>
<ComponentSearch Id="ssleay32.dll" Guid="{6EA3DD9A-2C47-4AB3-B413-CD9A6A6B3477}"/>
<ComponentSearch Id="libcrypto_1_1.dll" Guid="{3BB68B8B-913D-47BF-B092-CCC7CBB9A7CC}"/>
<ComponentSearch Id="libssl_1_1.dll" Guid="{D58368FD-3678-4762-9E5E-2F19A8E7613E}"/>
<ComponentSearch Id="liblzo2_2.dll" Guid="{D073932D-4ECF-480C-B54A-4FEBCE3FB015}"/>
<ComponentSearch Id="libpkcs11_helper_1.dll" Guid="{8EFE985A-9800-440D-8517-DAEFB50ECA74}"/>
<ComponentSearch Id="openvpn.exe" Guid="{46C7AD2F-6AA7-408A-BD02-9E8C59DD8C76}"/>
<ComponentSearch Id="openvpnserv.exe" Guid="{D54DD0B1-8C81-42F8-BD3F-BB988B786782}"/>
</Property>
<SetProperty
After="AppSearch"
Action="SetBinDirPrev"
Id="BINDIR"
Value="[BINDIRPREV]"
Sequence="first"><![CDATA[BINDIRPREV AND NOT Installed]]></SetProperty>
<SetProperty
After="SetBinDirPrev"
Action="SetBinDirParam"
Id="BINDIR"
Value="[INSTALLDIR]"
Sequence="first"><![CDATA[INSTALLDIR AND NOT Installed]]></SetProperty>
<!--
TAP-Windows driver check
Note: Exact driver version check would be extremely difficult to invent and probably error prone.
Therefore, we're happy if "tap0901" service is registered and has ImagePath value set.
-->
<Property Id="TAPWINDOWSDRIVER">
<RegistrySearch
Id="TAPWindowsDriver"
Root="HKLM"
Key="SYSTEM\CurrentControlSet\services\tap0901"
Name="ImagePath"
Type="raw"/>
</Property>
<Condition Message="!(loc.TAPWindowsMissing)"><![CDATA[Installed OR TAPWINDOWSDRIVER]]></Condition>
<!--
Folders
-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ProgramFilesFolder)">
<Directory Id="PRODUCTDIR" Name="$(var.ClientTitle)">
<Directory Id="BINDIR" Name="OpenVPN" FileSource="$(var.TargetDir)">
<Directory Id="CONFIGDIR" Name="config"/>
</Directory>
</Directory>
</Directory>
</Directory>
<!--
Compontents
-->
<DirectoryRef Id="BINDIR">
<Component Id="libcrypto_1_1.dll" Guid="{3BB68B8B-913D-47BF-B092-CCC7CBB9A7CC}">
<File Source="libcrypto-1_1$(var.OpenSSL.Platform).dll"/>
</Component>
<Component Id="libssl_1_1.dll" Guid="{D58368FD-3678-4762-9E5E-2F19A8E7613E}">
<File Source="libssl-1_1$(var.OpenSSL.Platform).dll"/>
</Component>
<Component Id="liblzo2_2.dll" Guid="{D073932D-4ECF-480C-B54A-4FEBCE3FB015}">
<File Source="liblzo2-2.dll"/>
</Component>
<Component Id="libpkcs11_helper_1.dll" Guid="{8EFE985A-9800-440D-8517-DAEFB50ECA74}">
<File Source="libpkcs11-helper-1.dll"/>
</Component>
<Component Id="openvpn.exe" Guid="{46C7AD2F-6AA7-408A-BD02-9E8C59DD8C76}">
<File Source="openvpn.exe"/>
</Component>
<Component Id="openvpnserv.exe" Guid="{D54DD0B1-8C81-42F8-BD3F-BB988B786782}">
<File Source="openvpnserv.exe"/>
<CreateFolder Directory="CONFIGDIR">
<!--
SYSTEM (SY): full
Administrators (BA): full
Users (BU): create files
CREATOR OWNER (CO): full
-->
<PermissionEx Id="CONFIGDIR" Sddl="D:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;;0x100003;;;BU)(A;OIIO;FA;;;CO)"/>
</CreateFolder>
<ServiceControl
Id="OpenVPNServiceInteractive.$(var.ClientTarget)"
Name="OpenVPNServiceInteractive$$$(var.ClientTarget)"
Start="install"
Stop="both"
Remove="uninstall"/>
<ServiceInstall
Id="OpenVPNServiceInteractive.$(var.ClientTarget)"
Name="OpenVPNServiceInteractive$$$(var.ClientTarget)"
DisplayName="@[BINDIR]OpenVPN.Resources.dll,-103"
Description="@[BINDIR]OpenVPN.Resources.dll,-104"
Arguments="-instance interactive $$$(var.ClientTarget)"
Type="ownProcess"
Start="auto"
ErrorControl="normal">
<ServiceDependency Id="Dhcp"/>
</ServiceInstall>
</Component>
<Component Id="openvpnserv.exe.reg0" Guid="{CD0E5551-72D5-487C-ADB6-3FF86EA83CC1}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Type="string"
Value="[BINDIR]"/>
</Component>
<Component Id="openvpnserv.exe.reg1" Guid="{7EF617D1-1B9E-4B96-A4C7-9A4597370AA2}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Name="exe_path"
Type="string"
Value="[BINDIR]openvpn.exe"/>
</Component>
<Component Id="openvpnserv.exe.reg2" Guid="{5E0F8717-1CCF-40B3-A3FE-AFE367973C73}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Name="config_dir"
Type="string"
Value="[CONFIGDIR]"/>
</Component>
<Component Id="openvpnserv.exe.reg3" Guid="{CF896642-99B2-4BD1-9FD2-89E73F3C38B2}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Name="config_ext"
Type="string"
Value="conf"/>
</Component>
<Component Id="openvpnserv.exe.reg4" Guid="{F9F27191-D01C-4DF2-8112-288B9D086628}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Name="log_dir"
Type="string"
Value="[BINDIR]"/>
</Component>
<Component Id="openvpnserv.exe.reg5" Guid="{2D450249-CCD0-4C4C-AD9A-793C864FE1B7}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Name="log_append"
Type="string"
Value="0"/>
</Component>
<Component Id="openvpnserv.exe.reg6" Guid="{EB68C746-5E50-4F66-9A21-2E6BB07EEA38}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Name="priority"
Type="string"
Value="NORMAL_PRIORITY_CLASS"/>
</Component>
<Component Id="openvpnserv.exe.reg7" Guid="{A40AFCF3-E0DE-4844-91CE-64D55C3FA8B5}">
<RegistryValue
Root="HKLM"
Key="Software\OpenVPN$$$(var.ClientTarget)"
Name="ovpn_admin_group"
Type="string"
Value="Users"/>
</Component>
<!-- Add/Remove Programs Localization -->
<Component Id="ARP.DisplayName" Guid="{D5F701F1-640F-434A-94F4-6150E63E340B}">
<RegistryValue Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" Name="DisplayName_Localized" Type="string" Value="@[BINDIR]OpenVPN.Resources.dll,-101"/>
</Component>
<Component Id="ARP.Publisher" Guid="{6FF63400-4447-43F6-A905-30B1855B9453}">
<RegistryValue Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]" Name="Publisher_Localized" Type="string" Value="@[BINDIR]OpenVPN.Resources.dll,-102"/>
</Component>
</DirectoryRef>
<!--
Features
-->
<Feature Id="$(var.ClientTarget).OpenVPN" Title="!(loc.$(var.ClientTarget).OpenVPNName)" Level="1">
<ComponentRef Id="libcrypto_1_1.dll"/>
<ComponentRef Id="libssl_1_1.dll"/>
<ComponentRef Id="liblzo2_2.dll"/>
<ComponentRef Id="libpkcs11_helper_1.dll"/>
<ComponentRef Id="openvpn.exe"/>
<ComponentRef Id="openvpnserv.exe"/>
<ComponentRef Id="openvpnserv.exe.reg0"/>
<ComponentRef Id="openvpnserv.exe.reg1"/>
<ComponentRef Id="openvpnserv.exe.reg2"/>
<ComponentRef Id="openvpnserv.exe.reg3"/>
<ComponentRef Id="openvpnserv.exe.reg4"/>
<ComponentRef Id="openvpnserv.exe.reg5"/>
<ComponentRef Id="openvpnserv.exe.reg6"/>
<ComponentRef Id="openvpnserv.exe.reg7"/>
<ComponentRef Id="ARP.DisplayName"/>
<ComponentRef Id="ARP.Publisher"/>
<ComponentGroupRef Id="OpenVPN.Resources.dll"/>
</Feature>
</Product>
</Wix>