tor.wxs.in 17 KB

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