move performance.tex over
[tor.git] / contrib / tor.wxs.in
blob3983f39d1e16f95259260b923495772e89e56c8d
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 /log debug.txt /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.12" ?>
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="cfe3de89-4407-4af2-ac2c-4443bd68a61b" ?>
43 <?define CurrTorExecutableGUID="9c3db54b-05d7-4800-a84c-569105f99b93" ?>
44 <?define CurrTorSvcLinksGUID="4ef7f1e7-282f-4540-93a1-dbe66326d8f2" ?>
45 <?define CurrOpenSSLLibraryGUID="bf2b03ec-f86b-4e71-b59d-268a7b21eb4a" ?>
46 <?define CurrTorDocumentsGUID="46abcd7a-3ff2-45c8-9e58-120cb60d8291" ?>
47 <?define CurrTorConfigFileGUID="994cc2a2-63f9-44f9-950d-4012fd79e945" ?>
48 <?define CurrTorGeoIPFileGUID="0934c295-8d97-4588-924a-9572e7334f59" ?>
49 <?define CurrAddTorToStartMenuGUID="0cb459e2-1c31-4dca-a143-badbb2273170" ?>
50 <?define CurrAddTorToDesktopGUID="a5aee150-186c-4db6-90be-faba50bb0d49" ?>
51 <?define CurrAddTorDocsToDesktopGUID="1b5bd78c-bb4d-4271-a2c4-aeb409aa1774" ?>
52 <?define CurrAddTorEditConfToDesktopGUID="5fef2413-86ad-4ee5-a843-c4432051820c" ?>
53 <?define CurrLocalProgramsGUID="25f95ae1-70f9-4ef4-b709-3412a31f5248" ?>
55 <Product
56 Name="Tor $(var.ThisProductVersionDisp)"
57 Id="$(var.CurrTorProductGUID)"
58 UpgradeCode="$(var.UpgradeCode)"
59 Version="$(var.ThisProductVersion)"
60 Manufacturer="$(var.TPI)"
61 Language="1033" Codepage="1252">
63 <!-- Common package definitions. Most of these elements are self
64 explanatory or do not need modification.
65 Note that there is no support for signature verification nor
66 patched upgrades at this time.
67 -->
68 <Package
69 Id="*"
70 Keywords="Tor,Installer"
71 Description="Tor $(var.ThisProductVersionDisp) Installer"
72 Manufacturer="$(var.TPI)"
73 Compressed="yes"
74 InstallerVersion="100"
75 Languages="1033"
76 SummaryCodepage="1252"
77 InstallPrivileges="limited"
79 <Media Id="1"
80 Cabinet="Tor.cab"
81 CompressionLevel="high"
82 EmbedCab="yes"
83 DiskPrompt="na"
86 <!-- Associate this package with the upgrade code for this series
87 to ensure that upgrade installations by Thandy or other means work
88 as expected.
89 The OnlyDetect option must be false to ensure that existing files
90 from an older version are removed and replaced with current files.
91 -->
92 <Upgrade Id="$(var.UpgradeCode)">
93 <UpgradeVersion
94 Property="UPGRADEFOUND"
95 OnlyDetect="no"
96 Minimum="0.0.1"
97 IncludeMinimum="yes"
98 Maximum="$(var.ThisProductVersion)"
99 IncludeMaximum="no"
101 </Upgrade>
103 <!-- for now force per-user installation until run as service is completed. -->
104 <Property Id="ALLUSERS" Secure="yes"/>
106 <!-- To avoid placing shortcuts all over the desktop / start menu during a
107 silent installation the NOSC=1 option can be passed to omit shortcuts.
108 This is useful if bundled with other applications like Vidalia that manage
109 configuration and Tor related processes themselves.
111 <Property Id="NOSC" Secure="yes"/>
113 <!-- Properties used to control installation or repair features
114 and other invocation options.
116 <Property Id="ReinstallModeText">omus</Property>
117 <Property Id="DiskPrompt">Tor Installation</Property>
119 <!-- Support for service type Tor installations (soon). -->
120 <Property Id="SVCINSTALL">0</Property>
121 <Property Id="SERVICENAME">Tor</Property>
122 <Property Id="SERVICEINTERNALNAME">Tor</Property>
123 <Property Id="EXISTING_TOR_SERVICE_PATH">
124 <RegistrySearch
125 Id="ExistingTorService"
126 Root="HKLM"
127 Key="System\CurrentControlSet\Services\[SERVICEINTERNALNAME]"
128 Name="TorSvcPath"
129 Type="raw"
131 </Property>
133 <!-- Most of the installation directives are for populating the
134 "Program Files" directory with the Tor binaries, dynamic link
135 libraries, configuration files, and other documents.
137 <Directory Id="TARGETDIR" Name="SourceDir">
138 <Directory Id="LocalAppDataFolder" Name="LocalAppData">
139 <Directory Id="LocalProgramsFolder" Name="Programs">
141 <!-- Until proper support for per-user installs is available we manage Programs folder.
142 Note that this directory will be left in place if it is in use by any other app.
144 <Component Id="LocalProgramsFolderRef" Guid="$(var.CurrLocalProgramsGUID)">
145 <CreateFolder/>
146 <RemoveFolder Id="RemoveLocalProgramsFolder" On="uninstall" />
147 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
148 <RegistryValue Name="LocalProgramsFolderRef" Value="1" Type="integer" KeyPath="yes" />
149 </RegistryKey>
150 </Component>
152 <Directory Id="LocalProgramsInstDir" Name="Tor">
153 <!-- Tor application file -->
154 <Component Id="TorExecutable" Guid="$(var.CurrTorExecutableGUID)">
155 <CreateFolder/>
156 <RemoveFolder Id="RemoveLocalProgramsInstDir" On="uninstall" />
157 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
158 <RegistryValue Name="Version" Value="$(var.ThisProductVersionDisp)" Type="string" KeyPath="yes" />
159 </RegistryKey>
160 <File
161 Id="TorExe"
162 Name="Tor.exe"
163 Source="bin\tor.exe"
164 Vital="yes"
165 DiskId="1"
167 </Component>
169 <!-- Tor OpenSSL shared libraries
170 This optional component is required for shared builds
171 of Tor. For static builds it is ignored.
173 <Component Id="OpenSSLLibrary" Guid="$(var.CurrOpenSSLLibraryGUID)">
174 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
175 <RegistryValue Name="UserSSLLibrary" Value="1" Type="integer" KeyPath="yes" />
176 </RegistryKey>
177 <File
178 Id="cryptoeay32dll"
179 Name="cryptoeay32-0.9.8.dll"
180 Source="bin/cryptoeay32-0.9.8.dll"
181 DiskId="1"
183 <File
184 Id="ssleay32dll"
185 Name="ssleay32-0.9.8.dll"
186 Source="bin/ssleay32-0.9.8.dll"
187 DiskId="1"
189 </Component>
190 </Directory>
191 </Directory>
193 <Directory Id="INSTALLDIR" Name="Tor">
194 <!-- Tor configuration files
195 The sample config is always kept up to date and the torrc
196 is left as is if it exists and copied from the sample
197 config otherwise.
199 <Component Id="TorConfigFile" Guid="$(var.CurrTorConfigFileGUID)">
200 <CreateFolder/>
201 <RemoveFolder Id="RemoveINSTALLDIR" On="uninstall" />
202 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
203 <RegistryValue Name="UserConfigFile" Value="1" Type="integer" KeyPath="yes" />
204 </RegistryKey>
205 <File
206 Id="TorSampleConfig"
207 Name="torrc-example.txt"
208 Source="src\config\torrc.sample"
209 Vital="yes"
210 ReadOnly="no"
211 DiskId="1"
213 <CopyFile
214 Id="TorConfig"
215 DestinationName="torrc.txt"
217 </File>
218 </Component>
220 <!-- GeoIP data file. This is an optional component. -->
221 <Component Id="TorGeoIPFile" Guid="$(var.CurrTorGeoIPFileGUID)">
222 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
223 <RegistryValue Name="UserGeoIPFile" Value="1" Type="integer" KeyPath="yes" />
224 </RegistryKey>
225 <File
226 Id="GeoIPFile"
227 Name="geoip"
228 Source="share/tor/geoip"
229 Vital="no"
230 ReadOnly="yes"
231 DiskId="1"
233 </Component>
235 <!-- Tor docs. unix2dos.exe on each text file is recommended for win32 packages. -->
236 <Directory Id="TorDocsDirectory" Name="docs">
237 <Component Id="TorDocuments" Guid="$(var.CurrTorDocumentsGUID)">
238 <CreateFolder/>
239 <RemoveFolder Id="RemoveTorDocsDirectory" On="uninstall" />
240 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
241 <RegistryValue Name="UserDocs" Value="1" Type="integer" KeyPath="yes" />
242 </RegistryKey>
243 <File
244 Id="TorReadme"
245 Name="README.txt"
246 Source="README"
247 DiskId="1"
249 <!-- HTML generated via: groff -man doc/tor.1 -T html > Usage.html -->
250 <File
251 Id="TorUsage"
252 Name="Usage.html"
253 Source="Usage.html"
254 DiskId="1"
256 <File
257 Id="TorAuthors"
258 Name="Authors.txt"
259 Source="Authors"
260 DiskId="1"
262 <File
263 Id="TorChangelog"
264 Name="ChangeLog.txt"
265 Source="ChangeLog"
266 DiskId="1"
268 <File
269 Id="TorLicense"
270 Name="LICENSE.txt"
271 Source="LICENSE"
272 DiskId="1"
274 </Component>
275 </Directory>
276 </Directory>
277 </Directory>
279 <!-- Create shortcuts if requested
280 Remember that shortcuts must always be tied to a "key"
281 registry value for proper repair and removal.
283 <Directory Id="ProgramMenuFolder" Name="Programs">
284 <Directory Id="ShortcutFolder" Name="Tor">
285 <Component Id="AddTorToStartMenu" Guid="$(var.CurrAddTorToStartMenuGUID)">
286 <Condition><![CDATA[NOSC <> 1]]> </Condition>
287 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
288 <RegistryValue Name="StartMenuShortcut" Value="1" Type="integer" KeyPath="yes" />
289 </RegistryKey>
290 <Shortcut Id="TorStartMenuShortcut"
291 Name="Tor" Target="[LocalProgramsInstDir]tor.exe"
292 Directory="ShortcutFolder" WorkingDirectory="LocalProgramsInstDir"
293 Icon="tor.ico" IconIndex="0" />
294 <RemoveFolder Id="RemoveShortcutFolder" On="uninstall" />
295 </Component>
296 </Directory>
297 </Directory>
299 <Directory Id="DesktopFolder" Name="Desktop">
300 <Component Id="AddTorToDesktop" Guid="$(var.CurrAddTorToDesktopGUID)">
301 <Condition><![CDATA[NOSC <> 1]]> </Condition>
302 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
303 <RegistryValue Name="DesktopShortcut" Value="1" Type="integer" KeyPath="yes" />
304 </RegistryKey>
305 <Shortcut Id="TorDesktopShortcut"
306 Name="Tor" Target="[LocalProgramsInstDir]tor.exe"
307 Directory="DesktopFolder" WorkingDirectory="LocalProgramsInstDir"
308 Icon="tor.ico" IconIndex="0" />
309 </Component>
310 <Component Id="AddTorDocsToDesktop" Guid="$(var.CurrAddTorDocsToDesktopGUID)">
311 <Condition><![CDATA[NOSC <> 1]]> </Condition>
312 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
313 <RegistryValue Name="DesktopDocsShortcut" Value="1" Type="integer" KeyPath="yes" />
314 </RegistryKey>
315 <Shortcut Id="TorDocsDesktopShortcut"
316 Name="Tor Docs" Target="[TorDocsDirectory]"
317 Directory="DesktopFolder" WorkingDirectory="INSTDIR" />
318 </Component>
319 <Component Id="AddTorEditConfToDesktop" Guid="$(var.CurrAddTorEditConfToDesktopGUID)">
320 <Condition><![CDATA[NOSC <> 1]]> </Condition>
321 <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
322 <RegistryValue Name="DesktopEditConfShortcut" Value="1" Type="integer" KeyPath="yes" />
323 </RegistryKey>
324 <Shortcut Id="TorEditConfDesktopShortcut"
325 Name="Edit Tor Config"
326 Target="[WindowsFolder]notepad.exe"
327 Arguments="[INSTALLDIR]torrc.txt"
328 Directory="DesktopFolder" WorkingDirectory="INSTDIR" />
329 </Component>
330 </Directory>
331 </Directory>
333 <!-- Define list of application features available for install
334 There are two main sections to this list. The "MainApplication"
335 section which defines a core set of mandatory files and setup
336 and the other optional components like shortcuts which are not
337 required for functional installation.
339 <Feature Id="Complete" Title="Tor"
340 Level="1" Display="expand" ConfigurableDirectory="INSTALLDIR"
341 Description="Tor is an implementation of Onion Routing. You can read more at https://www.torproject.org/">
343 <!-- Core files and setup tasks that must always be included in installation -->
344 <Feature Id="MainApplication" Title="Tor Application"
345 AllowAdvertise="no" Absent="disallow" Level="1"
346 Description="Main Tor application">
347 <ComponentRef Id="LocalProgramsFolderRef" />
348 <ComponentRef Id="TorExecutable" />
349 <ComponentRef Id="TorConfigFile" />
350 <ComponentRef Id="TorGeoIPFile" />
351 <ComponentRef Id="OpenSSLLibrary" />
352 <ComponentRef Id="TorDocuments" />
353 </Feature>
355 <!-- Shortcuts on the Start Menu and Desktop are optional but
356 provided by default. -->
357 <Feature Id="Shortcuts" Title="Shortcuts"
358 AllowAdvertise="no" Absent="allow" Level="1"
359 Description="Add shortcuts to Tor.">
361 <Feature Id="StartMenuShortcuts" Title="Add Tor to Start menu"
362 AllowAdvertise="no" Absent="allow" Level="1"
363 Description="Add Tor to your Start menu">
364 <ComponentRef Id="AddTorToStartMenu" />
365 </Feature>
366 <Feature Id="DesktopShortcuts" Title="Add Tor shortcut to Desktop"
367 AllowAdvertise="no" Absent="allow" Level="1"
368 Description="Add shortcut to launch Tor on Desktop">
369 <ComponentRef Id="AddTorToDesktop" />
370 </Feature>
371 <Feature Id="DesktopDocsShortcuts" Title="Add Tor docs folder to Desktop"
372 AllowAdvertise="no" Absent="allow" Level="1"
373 Description="Add Tor documentation folder to Desktop">
374 <ComponentRef Id="AddTorDocsToDesktop" />
375 </Feature>
376 <Feature Id="DesktopEditConfShortcuts" Title="Edit Tor config shortcut on Desktop"
377 AllowAdvertise="no" Absent="allow" Level="1"
378 Description="Edit Tor config file shortcut on Desktop">
379 <ComponentRef Id="AddTorEditConfToDesktop" />
380 </Feature>
381 </Feature>
382 </Feature>
384 <!-- Upgrade installation sequence. -->
385 <InstallExecuteSequence>
386 <RemoveExistingProducts After="InstallValidate" />
387 </InstallExecuteSequence>
389 <!-- Set the UI options
390 Use a custom UI sequence to avoid EULA and other extraneous
391 parts of Mondo and other GUIs
393 <UIRef Id="WixUI_Tor" />
394 <Icon Id="tor.ico" SourceFile="contrib/tor.ico" />
395 </Product>
396 </Wix>