Fix memory leaks in test_dir_format
[tor/rransom.git] / contrib / tor.wxs.in
blob5e20406f06420107b7e863661530b7f6f97de336
1 <?xml version="1.0" encoding="Windows-1252" ?>
2 <!--
3 WiX is a Microsoft Installer tool that parses an installation
4 specification XML document and produces an MSI package for use on
5 updated Windows 2000 and newer systems.
7 The MSI package format provides some advantages over the existing NSIS
8 packages when used in an automated fashion. A modified version of
9 the Mondo UI installer is included without EULA and other unnecessary
10 dialogs. You must update the UIRef element below to change UI.
12 Compile MSI installer via WiX:
13 candle.exe contrib/*.wxs
14 light.exe *.wixobj -out tor.msi -ext C:\Path\to\Wix\bin\WixUIExtension.dll
16 A silent installation can be performed with a /quiet option passed.
17 msiexec /i tor.msi INSTALLDIR=C:\path\to\install\to /qn
19 A repair operation can be performed with /f and remove via /x
21 More msiexec command line details at:
22 http://technet.microsoft.com/en-us/library/cc759262.aspx
23 -->
24 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
25 <!-- Definitions for critical elements of this MSI package.
26 Note that the product version is compressed into a X.X.X format. If the four
27 element version is used, the last octet is ignored when comparing versions
28 for upgrade, thus forcing the use of the three element version format.
29 UpgradeCode must remain the same for all packages of this type regardless of
30 Product or Package ID's. This is how existing versions are located.
31 -->
32 <?define ThisProductVersion="2.1.8" ?>
33 <?define ThisProductVersionDisp="@VERSION@" ?>
34 <?define UpgradeCode="64323a0c-9712-4a7a-8db8-d3c5c0b963df" ?>
35 <?define TPI="The Tor Project, Inc." ?>
37 <!-- The remaining GUIDs are assigned to components or other variable
38 identifiers. Whenever a new package is built these values MUST be
39 modified for upgrades to work correctly! Note that future MSI packages should
40 re-use components that haven't changed to speed installation.
41 -->
42 <?define CurrTorProductGUID="654cd293-e721-44eb-a31c-fc39a36a9975" ?>
43 <?define CurrTorExecutableGUID="1f50bd0d-f731-49b6-b905-5682a419881a" ?>
44 <?define CurrTorSvcLinksGUID="d4104c4a-f940-4f36-acc7-a5d1c8e72828" ?>
45 <?define CurrOpenSSLLibraryGUID="126bd857-348e-48d2-8b79-cd4648e5f471" ?>
46 <?define CurrTorDocumentsGUID="8b36bf4e-1f9d-4f9e-a91a-bab7da486c98" ?>
47 <?define CurrTorConfigFileGUID="a380ee19-470d-4b35-a0fa-aa19f342c4c5" ?>
48 <?define CurrTorGeoIPFileGUID="03afdbae-2e48-45c5-a059-3d3bac63d07f" ?>
49 <?define CurrAddTorToStartMenuGUID="7f0cbd78-9608-4780-a848-771d724727b2" ?>
50 <?define CurrAddTorToDesktopGUID="30b9f30f-b930-4751-856e-e1280f2227bf" ?>
52 <Product
53 Name="Tor"
54 Id="$(var.CurrTorProductGUID)"
55 UpgradeCode="$(var.UpgradeCode)"
56 Version="$(var.ThisProductVersion)"
57 Manufacturer="$(var.TPI)"
58 Language="1033" Codepage="1252">
60 <!-- Common package definitions. Most of these elements are self
61 explanatory or do not need modification.
62 Note that there is no support for signature verification nor
63 patched upgrades at this time.
64 -->
65 <Package
66 Id="*"
67 Keywords="Tor,Installer"
68 Description="Tor $(var.ThisProductVersionDisp) Installer"
69 Manufacturer="$(var.TPI)"
70 Compressed="yes"
71 InstallerVersion="100"
72 Languages="1033"
73 SummaryCodepage="1252"
75 <Media Id="1"
76 Cabinet="Tor.cab"
77 CompressionLevel="high"
78 EmbedCab="yes"
79 DiskPrompt="na"
82 <!-- Associate this package with the upgrade code for this series
83 to ensure that upgrade installations by Thandy or other means work
84 as expected.
85 The OnlyDetect option must be false to ensure that existing files
86 from an older version are removed and replaced with current files.
87 -->
88 <Upgrade Id="$(var.UpgradeCode)">
89 <UpgradeVersion
90 Property="UPGRADEFOUND"
91 OnlyDetect="no"
92 Minimum="0.0.1"
93 IncludeMinimum="yes"
94 Maximum="$(var.ThisProductVersion)"
95 IncludeMaximum="no"
97 </Upgrade>
99 <!-- Properties used to control installation or repair features
100 and other invocation options.
101 When ALLUSERS==1 the install is per machine, when 2 it is per user.
103 <Property Id="ALLUSERS">2</Property>
104 <Property Id="ReinstallModeText">omus</Property>
105 <Property Id="DiskPrompt">Tor Installation</Property>
107 <!-- Support for service type Tor installations (soon). -->
108 <Property Id="SVCINSTALL">0</Property>
109 <Property Id="SERVICENAME">Tor</Property>
110 <Property Id="SERVICEINTERNALNAME">Tor</Property>
111 <Property Id="EXISTING_TOR_SERVICE_PATH">
112 <RegistrySearch
113 Id="ExistingTorService"
114 Root="HKLM"
115 Key="System\CurrentControlSet\Services\[SERVICEINTERNALNAME]"
116 Name="TorSvcPath"
117 Type="raw"
119 </Property>
121 <!-- Most of the installation directives are for populating the
122 "Program Files" directory with the Tor binaries, dynamic link
123 libraries, configuration files, and other documents.
125 <Directory Id="TARGETDIR" Name="SourceDir">
126 <Directory Id="LocalAppDataFolder" Name="AppData">
127 <Directory Id="INSTALLDIR" Name="Tor">
129 <!-- Tor application file -->
130 <Component Id="TorExecutable" Guid="$(var.CurrTorExecutableGUID)">
131 <CreateFolder/>
132 <RemoveFolder Id="RemoveINSTALLDIR" On="uninstall" />
133 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
134 <RegistryValue Name="Version" Value="$(var.ThisProductVersionDisp)" Type="string" KeyPath="yes" />
135 </RegistryKey>
136 <File
137 Id="TorExe"
138 Name="Tor.exe"
139 Source="bin\tor.exe"
140 Vital="yes"
141 DiskId="1"
143 </Component>
145 <!-- Tor OpenSSL shared libraries
146 This optional component is required for shared builds
147 of Tor. For static builds it is ignored.
149 <Component Id="OpenSSLLibrary" Guid="$(var.CurrOpenSSLLibraryGUID)">
150 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
151 <RegistryValue Name="UserSSLLibrary" Value="1" Type="integer" KeyPath="yes" />
152 </RegistryKey>
153 <File
154 Id="cryptoeay32dll"
155 Name="cryptoeay32-0.9.8.dll"
156 Source="bin/cryptoeay32-0.9.8.dll"
157 DiskId="1"
159 <File
160 Id="ssleay32dll"
161 Name="ssleay32-0.9.8.dll"
162 Source="bin/ssleay32-0.9.8.dll"
163 DiskId="1"
165 </Component>
167 <!-- Tor configuration files
168 The sample config is always kept up to date and the torrc
169 is left as is if it exists and copied from the sample
170 config otherwise.
172 <Component Id="TorConfigFile" Guid="$(var.CurrTorConfigFileGUID)">
173 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
174 <RegistryValue Name="UserConfigFile" Value="1" Type="integer" KeyPath="yes" />
175 </RegistryKey>
176 <File
177 Id="TorSampleConfig"
178 Name="torrc.sample"
179 Source="src\config\torrc.sample"
180 Vital="yes"
181 ReadOnly="yes"
182 DiskId="1"
184 <CopyFile
185 Id="TorConfig"
186 DestinationName="torrc"
188 </File>
189 </Component>
191 <!-- GeoIP data file. This is an optional component. -->
192 <Component Id="TorGeoIPFile" Guid="$(var.CurrTorGeoIPFileGUID)">
193 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
194 <RegistryValue Name="UserGeoIPFile" Value="1" Type="integer" KeyPath="yes" />
195 </RegistryKey>
196 <File
197 Id="GeoIPFile"
198 Name="geoip"
199 Source="share/tor/geoip"
200 Vital="no"
201 ReadOnly="yes"
202 DiskId="1"
204 </Component>
206 <!-- Tor docs -->
207 <Directory Id="TorDocsDirectory" Name="docs">
208 <Component Id="TorDocuments" Guid="$(var.CurrTorDocumentsGUID)">
209 <CreateFolder/>
210 <RemoveFolder Id="RemoveTorDocsDirectory" On="uninstall" />
211 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
212 <RegistryValue Name="UserDocs" Value="1" Type="integer" KeyPath="yes" />
213 </RegistryKey>
214 <File
215 Id="TorReadme"
216 Name="README"
217 Source="README"
218 DiskId="1"
220 <File
221 Id="TorAuthors"
222 Name="Authors"
223 Source="Authors"
224 DiskId="1"
226 <File
227 Id="TorChangelog"
228 Name="ChangeLog"
229 Source="ChangeLog"
230 DiskId="1"
232 <File
233 Id="TorLicense"
234 Name="LICENSE"
235 Source="LICENSE"
236 DiskId="1"
238 </Component>
239 </Directory>
240 </Directory>
241 </Directory>
243 <!-- Create shortcuts if requested
244 Remember that shortcuts must always be tied to a "key"
245 registry value for proper repair and removal.
247 <Directory Id="ProgramMenuFolder" Name="Programs">
248 <Directory Id="ShortcutFolder" Name="Tor">
249 <Component Id="AddTorToStartMenu" Guid="$(var.CurrAddTorToStartMenuGUID)">
250 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
251 <RegistryValue Name="StartMenuShortcut" Value="1" Type="integer" KeyPath="yes" />
252 </RegistryKey>
253 <Shortcut Id="TorStartMenuShortcut"
254 Name="Tor" Target="[INSTALLDIR]tor.exe"
255 Directory="ShortcutFolder" WorkingDirectory="INSTALLDIR"
256 Icon="tor.ico" IconIndex="0" />
257 <RemoveFolder Id="RemoveShortcutFolder" On="uninstall" />
258 </Component>
259 </Directory>
260 </Directory>
262 <Directory Id="DesktopFolder" Name="Desktop">
263 <Component Id="AddTorToDesktop" Guid="$(var.CurrAddTorToDesktopGUID)">
264 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
265 <RegistryValue Name="DesktopShortcut" Value="1" Type="integer" KeyPath="yes" />
266 </RegistryKey>
267 <Shortcut Id="TorDesktopShortcut"
268 Name="Tor" Target="[INSTALLDIR]tor.exe"
269 Directory="DesktopFolder" WorkingDirectory="INSTALLDIR"
270 Icon="tor.ico" IconIndex="0" />
271 </Component>
272 </Directory>
273 </Directory>
275 <!-- Define list of application features available for install
276 There are two main sections to this list. The "MainApplication"
277 section which defines a core set of mandatory files and setup
278 and the other optional components like shortcuts which are not
279 required for functional installation.
281 <Feature Id="Complete" Title="Tor"
282 Level="1" Display="expand" ConfigurableDirectory="INSTALLDIR"
283 Description="Tor is an implementation of Onion Routing. You can read more at https://www.torproject.org/">
285 <!-- Core files and setup tasks that must always be included in installation -->
286 <Feature Id="MainApplication" Title="Tor Application"
287 AllowAdvertise="no" Absent="disallow" Level="1"
288 Description="Main Tor application">
289 <ComponentRef Id="TorExecutable" />
290 <ComponentRef Id="TorConfigFile" />
291 <ComponentRef Id="TorGeoIPFile" />
292 <ComponentRef Id="OpenSSLLibrary" />
293 <ComponentRef Id="TorDocuments" />
294 </Feature>
296 <!-- Shortcuts on the Start Menu and Desktop are optional but
297 provided by default. -->
298 <Feature Id="Shortcuts" Title="Shortcuts"
299 AllowAdvertise="no" Absent="allow" Level="1"
300 Description="Add shortcuts to Tor.">
301 <Feature Id="StartMenuShortcuts" Title="Add to Start menu"
302 AllowAdvertise="no" Absent="allow" Level="1"
303 Description="Add Tor to your Start menu">
304 <ComponentRef Id="AddTorToStartMenu" />
305 </Feature>
306 <Feature Id="DesktopShortcuts" Title="Add to Desktop"
307 AllowAdvertise="no" Absent="allow" Level="1"
308 Description="Add Tor to your Desktop">
309 <ComponentRef Id="AddTorToDesktop" />
310 </Feature>
311 </Feature>
312 </Feature>
314 <!-- Upgrade installation sequence. -->
315 <InstallExecuteSequence>
316 <RemoveExistingProducts After="InstallValidate" />
317 </InstallExecuteSequence>
319 <!-- Set the UI options
320 Use a custom UI sequence to avoid EULA and other extraneous
321 parts of Mondo and other GUIs
323 <UIRef Id="WixUI_Tor" />
324 <Icon Id="tor.ico" SourceFile="contrib/tor.ico" />
325 </Product>
326 </Wix>