tor.wxs.in 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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.
  6. The MSI package format provides some advantages over the existing NSIS
  7. packages when used in an automated fashion. A modified version of
  8. the Mondo UI installer is included without EULA and other unnecessary
  9. dialogs. You must update the UIRef element below to change UI.
  10. Compile MSI installer via WiX:
  11. candle.exe contrib/*.wxs
  12. light.exe *.wixobj -out tor.msi -ext C:\Path\to\Wix\bin\WixUIExtension.dll
  13. A silent installation can be performed with a /quiet option passed.
  14. msiexec /i tor.msi INSTALLDIR=C:\path\to\install\to /qn
  15. A repair operation can be performed with /f and remove via /x
  16. More msiexec command line details at:
  17. http://technet.microsoft.com/en-us/library/cc759262.aspx
  18. -->
  19. <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  20. <!-- Definitions for critical elements of this MSI package.
  21. Note that the product version is compressed into a X.X.X format. If the four
  22. element version is used, the last octet is ignored when comparing versions
  23. for upgrade, thus forcing the use of the three element version format.
  24. UpgradeCode must remain the same for all packages of this type regardless of
  25. Product or Package ID's. This is how existing versions are located.
  26. -->
  27. <?define ThisProductVersion="2.1.7" ?>
  28. <?define ThisProductVersionDisp="@VERSION@" ?>
  29. <?define UpgradeCode="64323a0c-9712-4a7a-8db8-d3c5c0b963df" ?>
  30. <?define TPI="The Tor Project, Inc." ?>
  31. <Product
  32. Name="Tor"
  33. Id="1449ef81-e295-43e5-91ac-81b7da0e2024"
  34. UpgradeCode="64323a0c-9712-4a7a-8db8-d3c5c0b963df"
  35. Version="$(var.ThisProductVersion)"
  36. Manufacturer="$(var.TPI)"
  37. Language="1033" Codepage="1252">
  38. <!-- Common package definitions. Most of these elements are self
  39. explanatory or do not need modification.
  40. Note that there is no support for signature verification nor
  41. patched upgrades at this time.
  42. -->
  43. <Package
  44. Id="*"
  45. Keywords="Tor,Installer"
  46. Description="Tor $(var.ThisProductVersionDisp) Installer"
  47. Manufacturer="$(var.TPI)"
  48. Compressed="yes"
  49. InstallerVersion="100"
  50. Languages="1033"
  51. SummaryCodepage="1252"
  52. />
  53. <Media Id="1"
  54. Cabinet="Tor.cab"
  55. CompressionLevel="high"
  56. EmbedCab="yes"
  57. DiskPrompt="na"
  58. />
  59. <!-- Properties used to control installation or repair features
  60. and other invocation options.
  61. When ALLUSERS==1 the install is per machine, when 2 it is per user.
  62. -->
  63. <Property Id="ALLUSERS">1</Property>
  64. <Property Id="ReinstallModeText">omus</Property>
  65. <Property Id="DiskPrompt">Tor Installation</Property>
  66. <!-- Support for service type Tor installations (soon). -->
  67. <Property Id="SVCINSTALL">0</Property>
  68. <Property Id="SERVICENAME">Tor</Property>
  69. <Property Id="SERVICEINTERNALNAME">Tor</Property>
  70. <Property Id="EXISTING_TOR_SERVICE_PATH">
  71. <RegistrySearch
  72. Id="ExistingTorService"
  73. Root="HKLM"
  74. Key="System\CurrentControlSet\Services\[SERVICEINTERNALNAME]"
  75. Name="TorSvcPath"
  76. Type="raw"
  77. />
  78. </Property>
  79. <!-- Associate this package with the upgrade code for this series
  80. to ensure that upgrade installations by Thandy or other means work
  81. as expected.
  82. The OnlyDetect option must be false to ensure that existing files
  83. from an older version are removed and replaced with current files.
  84. -->
  85. <Upgrade Id="64323a0c-9712-4a7a-8db8-d3c5c0b963df">
  86. <UpgradeVersion
  87. Property="UPGRADEFOUND"
  88. OnlyDetect="no"
  89. Minimum="0.0.1"
  90. IncludeMinimum="yes"
  91. Maximum="$(var.ThisProductVersion)"
  92. IncludeMaximum="no"
  93. />
  94. </Upgrade>
  95. <!-- Most of the installation directives are for populating the
  96. "Program Files" directory with the Tor binaries, dynamic link
  97. libraries, configuration files, and other documents.
  98. -->
  99. <Directory Id="TARGETDIR" Name="SourceDir">
  100. <Directory Id="ProgramFilesFolder" Name="ProgramFilesDir">
  101. <Directory Id="INSTALLDIR" Name="Tor">
  102. <!-- Tor application file -->
  103. <Component Id="TorExecutable" Guid="219e0538-7f7f-4445-8406-e4f06ba22417">
  104. <File
  105. Id="TorExe"
  106. Name="Tor.exe"
  107. Source="bin\tor.exe"
  108. Vital="yes"
  109. DiskId="1"
  110. />
  111. </Component>
  112. <!-- If run as service provide registry pointer to Tor path. -->
  113. <Component Id="TorSvcLinks" Guid="b0e44ccf-4e85-4613-a026-9e3d0feef577">
  114. <Condition>SVCINSTALL</Condition>
  115. <RegistryKey Root="HKLM" Key="System\CurrentControlSet\Services\[SERVICEINTERNALNAME]"
  116. Action="createAndRemoveOnUninstall">
  117. <RegistryValue Name="TorSvcPath" Value="#1" Type="string" KeyPath="yes" />
  118. </RegistryKey>
  119. </Component>
  120. <!-- Tor OpenSSL shared libraries
  121. This optional component is required for shared builds
  122. of Tor. For static builds it is ignored.
  123. -->
  124. <Component Id="OpenSSLLibrary" Guid="4d99fd44-dc24-46c6-8825-25b9e5916b85">
  125. <File
  126. Id="cryptoeay32dll"
  127. Name="cryptoeay32-0.9.8.dll"
  128. Source="bin/cryptoeay32-0.9.8.dll"
  129. DiskId="1"
  130. />
  131. <File
  132. Id="ssleay32dll"
  133. Name="ssleay32-0.9.8.dll"
  134. Source="bin/ssleay32-0.9.8.dll"
  135. DiskId="1"
  136. />
  137. </Component>
  138. <!-- Tor docs -->
  139. <Component Id="TorDocuments" Guid="3def35f6-70a0-44af-813a-f96bc8462748">
  140. <File
  141. Id="TorReadme"
  142. Name="README"
  143. Source="README"
  144. DiskId="1"
  145. />
  146. <File
  147. Id="TorAuthors"
  148. Name="Authors"
  149. Source="Authors"
  150. DiskId="1"
  151. />
  152. <File
  153. Id="TorChangelog"
  154. Name="ChangeLog"
  155. Source="ChangeLog"
  156. DiskId="1"
  157. />
  158. <File
  159. Id="TorLicense"
  160. Name="LICENSE"
  161. Source="LICENSE"
  162. DiskId="1"
  163. />
  164. </Component>
  165. </Directory>
  166. </Directory>
  167. <Directory Id="LocalAppDataFolder" Name="AppData">
  168. <Directory Id="AppRootDirectory" Name="Tor">
  169. <!-- Tor configuration files
  170. The sample config is always kept up to date and the torrc
  171. is left as is if it exists and copied from the sample
  172. config otherwise.
  173. -->
  174. <Component Id="TorConfigFile" Guid="1dae9705-0bef-4588-be36-d8a5df5e47cc">
  175. <CreateFolder/>
  176. <RemoveFolder Id="RemoveAppRootDirectory" On="uninstall" />
  177. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  178. <RegistryValue Name="UserConfigFile" Value="1" Type="integer" KeyPath="yes" />
  179. </RegistryKey>
  180. <File
  181. Id="TorSampleConfig"
  182. Name="torrc.sample"
  183. Source="src\config\torrc.sample"
  184. Vital="yes"
  185. ReadOnly="yes"
  186. DiskId="1"
  187. >
  188. <CopyFile
  189. Id="TorConfig"
  190. DestinationName="torrc"
  191. />
  192. </File>
  193. </Component>
  194. <!-- GeoIP data file. This is an optional component. -->
  195. <Component Id="TorGeoIPFile" Guid="54dcb7e9-ea49-4be5-8c1a-32bf45306f9b">
  196. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  197. <RegistryValue Name="UserGeoIPFile" Value="1" Type="integer" KeyPath="yes" />
  198. </RegistryKey>
  199. <File
  200. Id="GeoIPFile"
  201. Name="geoip"
  202. Source="share/tor/geoip"
  203. Vital="no"
  204. ReadOnly="yes"
  205. DiskId="1"
  206. />
  207. </Component>
  208. </Directory>
  209. </Directory>
  210. <!-- Create shortcuts if requested
  211. Remember that shortcuts must always be tied to a "key"
  212. registry value for proper repair and removal.
  213. -->
  214. <Directory Id="ProgramMenuFolder" Name="Programs">
  215. <Directory Id="ShortcutFolder" Name="Tor">
  216. <Component Id="AddTorToStartMenu" Guid="a318c037-e1ed-481c-983d-4a0ad3810ba0">
  217. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  218. <RegistryValue Name="StartMenuShortcut" Value="1" Type="integer" KeyPath="yes" />
  219. </RegistryKey>
  220. <Shortcut Id="TorStartMenuShortcut"
  221. Name="Tor" Target="[INSTALLDIR]tor.exe"
  222. Directory="ShortcutFolder" WorkingDirectory="INSTALLDIR"
  223. Icon="tor.ico" IconIndex="0" />
  224. <RemoveFolder Id="RemoveShortcutFolder" On="uninstall" />
  225. </Component>
  226. </Directory>
  227. </Directory>
  228. <Directory Id="DesktopFolder" Name="Desktop">
  229. <Component Id="AddTorToDesktop" Guid="9a00d5c1-1d5d-4a62-864e-f53f79b3c77a">
  230. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  231. <RegistryValue Name="DesktopShortcut" Value="1" Type="integer" KeyPath="yes" />
  232. </RegistryKey>
  233. <Shortcut Id="TorDesktopShortcut"
  234. Name="Tor" Target="[INSTALLDIR]tor.exe"
  235. Directory="DesktopFolder" WorkingDirectory="INSTALLDIR"
  236. Icon="tor.ico" IconIndex="0" />
  237. </Component>
  238. </Directory>
  239. <!-- Current version registry info
  240. This value can be used by third party applications to query
  241. for the current version installed on the system.
  242. -->
  243. <Component Id="TorRegistry" Guid="575de318-a649-49fe-95e5-ee091f6cb8c6">
  244. <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Tor"
  245. Action="createAndRemoveOnUninstall">
  246. <RegistryValue Name="Version" Value="$(var.ThisProductVersionDisp)" Type="string" KeyPath="yes" />
  247. </RegistryKey>
  248. </Component>
  249. </Directory>
  250. <!-- Define list of application features available for install
  251. There are two main sections to this list. The "MainApplication"
  252. section which defines a core set of mandatory files and setup
  253. and the other optional components like shortcuts which are not
  254. required for functional installation.
  255. -->
  256. <Feature Id="Complete" Title="Tor"
  257. Level="1" Display="expand" ConfigurableDirectory="INSTALLDIR"
  258. Description="Tor is an implementation of Onion Routing. You can read more at https://www.torproject.org/">
  259. <!-- Core files and setup tasks that must always be included in installation -->
  260. <Feature Id="MainApplication" Title="Tor Application"
  261. AllowAdvertise="no" Absent="disallow" Level="1"
  262. Description="Main Tor application">
  263. <ComponentRef Id="TorExecutable" />
  264. <ComponentRef Id="TorConfigFile" />
  265. <ComponentRef Id="TorGeoIPFile" />
  266. <ComponentRef Id="OpenSSLLibrary" />
  267. <ComponentRef Id="TorDocuments" />
  268. <ComponentRef Id="TorRegistry" />
  269. <ComponentRef Id="TorSvcLinks" />
  270. </Feature>
  271. <!-- Shortcuts on the Start Menu and Desktop are optional but
  272. provided by default. -->
  273. <Feature Id="Shortcuts" Title="Shortcuts"
  274. AllowAdvertise="no" Absent="allow" Level="1"
  275. Description="Add shortcuts to Tor.">
  276. <Feature Id="StartMenuShortcuts" Title="Add to Start menu"
  277. AllowAdvertise="no" Absent="allow" Level="1"
  278. Description="Add Tor to your Start menu">
  279. <ComponentRef Id="AddTorToStartMenu" />
  280. </Feature>
  281. <Feature Id="DesktopShortcuts" Title="Add to Desktop"
  282. AllowAdvertise="no" Absent="allow" Level="1"
  283. Description="Add Tor to your Desktop">
  284. <ComponentRef Id="AddTorToDesktop" />
  285. </Feature>
  286. </Feature>
  287. </Feature>
  288. <!-- Upgrade installation sequence. -->
  289. <InstallExecuteSequence>
  290. <RemoveExistingProducts After="InstallFinalize" />
  291. </InstallExecuteSequence>
  292. <!-- Set the UI options
  293. Use a custom UI sequence to avoid EULA and other extraneous
  294. parts of Mondo and other GUIs
  295. -->
  296. <UIRef Id="WixUI_Tor" />
  297. <Icon Id="tor.ico" SourceFile="contrib/tor.ico" />
  298. </Product>
  299. </Wix>