tor.wxs.in 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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.8" ?>
  28. <?define ThisProductVersionDisp="@VERSION@" ?>
  29. <?define UpgradeCode="64323a0c-9712-4a7a-8db8-d3c5c0b963df" ?>
  30. <?define TPI="The Tor Project, Inc." ?>
  31. <!-- The remaining GUIDs are assigned to components or other variable
  32. identifiers. Whenever a new package is built these values MUST be
  33. modified for upgrades to work correctly! Note that future MSI packages should
  34. re-use components that haven't changed to speed installation.
  35. -->
  36. <?define CurrTorProductGUID="654cd293-e721-44eb-a31c-fc39a36a9975" ?>
  37. <?define CurrTorExecutableGUID="1f50bd0d-f731-49b6-b905-5682a419881a" ?>
  38. <?define CurrTorSvcLinksGUID="d4104c4a-f940-4f36-acc7-a5d1c8e72828" ?>
  39. <?define CurrOpenSSLLibraryGUID="126bd857-348e-48d2-8b79-cd4648e5f471" ?>
  40. <?define CurrTorDocumentsGUID="8b36bf4e-1f9d-4f9e-a91a-bab7da486c98" ?>
  41. <?define CurrTorConfigFileGUID="a380ee19-470d-4b35-a0fa-aa19f342c4c5" ?>
  42. <?define CurrTorGeoIPFileGUID="03afdbae-2e48-45c5-a059-3d3bac63d07f" ?>
  43. <?define CurrAddTorToStartMenuGUID="7f0cbd78-9608-4780-a848-771d724727b2" ?>
  44. <?define CurrAddTorToDesktopGUID="30b9f30f-b930-4751-856e-e1280f2227bf" ?>
  45. <Product
  46. Name="Tor"
  47. Id="$(var.CurrTorProductGUID)"
  48. UpgradeCode="$(var.UpgradeCode)"
  49. Version="$(var.ThisProductVersion)"
  50. Manufacturer="$(var.TPI)"
  51. Language="1033" Codepage="1252">
  52. <!-- Common package definitions. Most of these elements are self
  53. explanatory or do not need modification.
  54. Note that there is no support for signature verification nor
  55. patched upgrades at this time.
  56. -->
  57. <Package
  58. Id="*"
  59. Keywords="Tor,Installer"
  60. Description="Tor $(var.ThisProductVersionDisp) Installer"
  61. Manufacturer="$(var.TPI)"
  62. Compressed="yes"
  63. InstallerVersion="100"
  64. Languages="1033"
  65. SummaryCodepage="1252"
  66. />
  67. <Media Id="1"
  68. Cabinet="Tor.cab"
  69. CompressionLevel="high"
  70. EmbedCab="yes"
  71. DiskPrompt="na"
  72. />
  73. <!-- Associate this package with the upgrade code for this series
  74. to ensure that upgrade installations by Thandy or other means work
  75. as expected.
  76. The OnlyDetect option must be false to ensure that existing files
  77. from an older version are removed and replaced with current files.
  78. -->
  79. <Upgrade Id="$(var.UpgradeCode)">
  80. <UpgradeVersion
  81. Property="UPGRADEFOUND"
  82. OnlyDetect="no"
  83. Minimum="0.0.1"
  84. IncludeMinimum="yes"
  85. Maximum="$(var.ThisProductVersion)"
  86. IncludeMaximum="no"
  87. />
  88. </Upgrade>
  89. <!-- Properties used to control installation or repair features
  90. and other invocation options.
  91. When ALLUSERS==1 the install is per machine, when 2 it is per user.
  92. -->
  93. <Property Id="ALLUSERS">2</Property>
  94. <Property Id="ReinstallModeText">omus</Property>
  95. <Property Id="DiskPrompt">Tor Installation</Property>
  96. <!-- Support for service type Tor installations (soon). -->
  97. <Property Id="SVCINSTALL">0</Property>
  98. <Property Id="SERVICENAME">Tor</Property>
  99. <Property Id="SERVICEINTERNALNAME">Tor</Property>
  100. <Property Id="EXISTING_TOR_SERVICE_PATH">
  101. <RegistrySearch
  102. Id="ExistingTorService"
  103. Root="HKLM"
  104. Key="System\CurrentControlSet\Services\[SERVICEINTERNALNAME]"
  105. Name="TorSvcPath"
  106. Type="raw"
  107. />
  108. </Property>
  109. <!-- Most of the installation directives are for populating the
  110. "Program Files" directory with the Tor binaries, dynamic link
  111. libraries, configuration files, and other documents.
  112. -->
  113. <Directory Id="TARGETDIR" Name="SourceDir">
  114. <Directory Id="LocalAppDataFolder" Name="AppData">
  115. <Directory Id="INSTALLDIR" Name="Tor">
  116. <!-- Tor application file -->
  117. <Component Id="TorExecutable" Guid="$(var.CurrTorExecutableGUID)">
  118. <CreateFolder/>
  119. <RemoveFolder Id="RemoveINSTALLDIR" On="uninstall" />
  120. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  121. <RegistryValue Name="Version" Value="$(var.ThisProductVersionDisp)" Type="string" KeyPath="yes" />
  122. </RegistryKey>
  123. <File
  124. Id="TorExe"
  125. Name="Tor.exe"
  126. Source="bin\tor.exe"
  127. Vital="yes"
  128. DiskId="1"
  129. />
  130. </Component>
  131. <!-- Tor OpenSSL shared libraries
  132. This optional component is required for shared builds
  133. of Tor. For static builds it is ignored.
  134. -->
  135. <Component Id="OpenSSLLibrary" Guid="$(var.CurrOpenSSLLibraryGUID)">
  136. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  137. <RegistryValue Name="UserSSLLibrary" Value="1" Type="integer" KeyPath="yes" />
  138. </RegistryKey>
  139. <File
  140. Id="cryptoeay32dll"
  141. Name="cryptoeay32-0.9.8.dll"
  142. Source="bin/cryptoeay32-0.9.8.dll"
  143. DiskId="1"
  144. />
  145. <File
  146. Id="ssleay32dll"
  147. Name="ssleay32-0.9.8.dll"
  148. Source="bin/ssleay32-0.9.8.dll"
  149. DiskId="1"
  150. />
  151. </Component>
  152. <!-- Tor configuration files
  153. The sample config is always kept up to date and the torrc
  154. is left as is if it exists and copied from the sample
  155. config otherwise.
  156. -->
  157. <Component Id="TorConfigFile" Guid="$(var.CurrTorConfigFileGUID)">
  158. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  159. <RegistryValue Name="UserConfigFile" Value="1" Type="integer" KeyPath="yes" />
  160. </RegistryKey>
  161. <File
  162. Id="TorSampleConfig"
  163. Name="torrc.sample"
  164. Source="src\config\torrc.sample"
  165. Vital="yes"
  166. ReadOnly="yes"
  167. DiskId="1"
  168. >
  169. <CopyFile
  170. Id="TorConfig"
  171. DestinationName="torrc"
  172. />
  173. </File>
  174. </Component>
  175. <!-- GeoIP data file. This is an optional component. -->
  176. <Component Id="TorGeoIPFile" Guid="$(var.CurrTorGeoIPFileGUID)">
  177. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  178. <RegistryValue Name="UserGeoIPFile" Value="1" Type="integer" KeyPath="yes" />
  179. </RegistryKey>
  180. <File
  181. Id="GeoIPFile"
  182. Name="geoip"
  183. Source="share/tor/geoip"
  184. Vital="no"
  185. ReadOnly="yes"
  186. DiskId="1"
  187. />
  188. </Component>
  189. <!-- Tor docs -->
  190. <Directory Id="TorDocsDirectory" Name="docs">
  191. <Component Id="TorDocuments" Guid="$(var.CurrTorDocumentsGUID)">
  192. <CreateFolder/>
  193. <RemoveFolder Id="RemoveTorDocsDirectory" On="uninstall" />
  194. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  195. <RegistryValue Name="UserDocs" Value="1" Type="integer" KeyPath="yes" />
  196. </RegistryKey>
  197. <File
  198. Id="TorReadme"
  199. Name="README"
  200. Source="README"
  201. DiskId="1"
  202. />
  203. <File
  204. Id="TorAuthors"
  205. Name="Authors"
  206. Source="Authors"
  207. DiskId="1"
  208. />
  209. <File
  210. Id="TorChangelog"
  211. Name="ChangeLog"
  212. Source="ChangeLog"
  213. DiskId="1"
  214. />
  215. <File
  216. Id="TorLicense"
  217. Name="LICENSE"
  218. Source="LICENSE"
  219. DiskId="1"
  220. />
  221. </Component>
  222. </Directory>
  223. </Directory>
  224. </Directory>
  225. <!-- Create shortcuts if requested
  226. Remember that shortcuts must always be tied to a "key"
  227. registry value for proper repair and removal.
  228. -->
  229. <Directory Id="ProgramMenuFolder" Name="Programs">
  230. <Directory Id="ShortcutFolder" Name="Tor">
  231. <Component Id="AddTorToStartMenu" Guid="$(var.CurrAddTorToStartMenuGUID)">
  232. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  233. <RegistryValue Name="StartMenuShortcut" Value="1" Type="integer" KeyPath="yes" />
  234. </RegistryKey>
  235. <Shortcut Id="TorStartMenuShortcut"
  236. Name="Tor" Target="[INSTALLDIR]tor.exe"
  237. Directory="ShortcutFolder" WorkingDirectory="INSTALLDIR"
  238. Icon="tor.ico" IconIndex="0" />
  239. <RemoveFolder Id="RemoveShortcutFolder" On="uninstall" />
  240. </Component>
  241. </Directory>
  242. </Directory>
  243. <Directory Id="DesktopFolder" Name="Desktop">
  244. <Component Id="AddTorToDesktop" Guid="$(var.CurrAddTorToDesktopGUID)">
  245. <RegistryKey Root="HKCU" Key="Software\Tor" Action="createAndRemoveOnUninstall">
  246. <RegistryValue Name="DesktopShortcut" Value="1" Type="integer" KeyPath="yes" />
  247. </RegistryKey>
  248. <Shortcut Id="TorDesktopShortcut"
  249. Name="Tor" Target="[INSTALLDIR]tor.exe"
  250. Directory="DesktopFolder" WorkingDirectory="INSTALLDIR"
  251. Icon="tor.ico" IconIndex="0" />
  252. </Component>
  253. </Directory>
  254. </Directory>
  255. <!-- Define list of application features available for install
  256. There are two main sections to this list. The "MainApplication"
  257. section which defines a core set of mandatory files and setup
  258. and the other optional components like shortcuts which are not
  259. required for functional installation.
  260. -->
  261. <Feature Id="Complete" Title="Tor"
  262. Level="1" Display="expand" ConfigurableDirectory="INSTALLDIR"
  263. Description="Tor is an implementation of Onion Routing. You can read more at https://www.torproject.org/">
  264. <!-- Core files and setup tasks that must always be included in installation -->
  265. <Feature Id="MainApplication" Title="Tor Application"
  266. AllowAdvertise="no" Absent="disallow" Level="1"
  267. Description="Main Tor application">
  268. <ComponentRef Id="TorExecutable" />
  269. <ComponentRef Id="TorConfigFile" />
  270. <ComponentRef Id="TorGeoIPFile" />
  271. <ComponentRef Id="OpenSSLLibrary" />
  272. <ComponentRef Id="TorDocuments" />
  273. </Feature>
  274. <!-- Shortcuts on the Start Menu and Desktop are optional but
  275. provided by default. -->
  276. <Feature Id="Shortcuts" Title="Shortcuts"
  277. AllowAdvertise="no" Absent="allow" Level="1"
  278. Description="Add shortcuts to Tor.">
  279. <Feature Id="StartMenuShortcuts" Title="Add to Start menu"
  280. AllowAdvertise="no" Absent="allow" Level="1"
  281. Description="Add Tor to your Start menu">
  282. <ComponentRef Id="AddTorToStartMenu" />
  283. </Feature>
  284. <Feature Id="DesktopShortcuts" Title="Add to Desktop"
  285. AllowAdvertise="no" Absent="allow" Level="1"
  286. Description="Add Tor to your Desktop">
  287. <ComponentRef Id="AddTorToDesktop" />
  288. </Feature>
  289. </Feature>
  290. </Feature>
  291. <!-- Upgrade installation sequence. -->
  292. <InstallExecuteSequence>
  293. <RemoveExistingProducts After="InstallValidate" />
  294. </InstallExecuteSequence>
  295. <!-- Set the UI options
  296. Use a custom UI sequence to avoid EULA and other extraneous
  297. parts of Mondo and other GUIs
  298. -->
  299. <UIRef Id="WixUI_Tor" />
  300. <Icon Id="tor.ico" SourceFile="contrib/tor.ico" />
  301. </Product>
  302. </Wix>