Bundle.wxs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
  3. xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  4. <?include Version.wxi ?>
  5. <?include Global.wxi ?>
  6. <Bundle Name="$(var.ProductName)"
  7. Version="$(var.Version)"
  8. Manufacturer="Jellyfin"
  9. UpgradeCode="$(var.ProductUUID)"
  10. HelpUrl="https://jellyfin.org/"
  11. Copyright="Jellyfin"
  12. AboutUrl="https://jellyfin.org/"
  13. Tag="$(var.FullVersion)"
  14. IconSourceFile="jellyfin.ico"
  15. >
  16. <!-- VersionNT and VersionNT64 will always report 10.0.0.0 on windows 10 no matter what version/build it is -->
  17. <!-- ServicePackLevel means nothing on any windows after windows 7 -->
  18. <!-- WindowsBuild variable does not exist for burn -->
  19. <!-- These variables from the registry gives us more accurate version info and they are useful even just to log -->
  20. <util:RegistrySearch Id="WinRegProductName" Root='HKLM' Key='SOFTWARE\Microsoft\Windows NT\CurrentVersion' Value='ProductName' Variable='WinRegProductName' />
  21. <util:RegistrySearch Id="WinRegReleaseID" Root='HKLM' Key='SOFTWARE\Microsoft\Windows NT\CurrentVersion' Value='ReleaseID' Variable='WinRegReleaseID' />
  22. <util:RegistrySearch Id="WinRegEditionIDSearch" Root='HKLM' Key='SOFTWARE\Microsoft\Windows NT\CurrentVersion' Value='EditionID' Variable='WinRegEditionID' />
  23. <util:RegistrySearch Id="WinRegInstallationType" Root='HKLM' Key='SOFTWARE\Microsoft\Windows NT\CurrentVersion' Value='InstallationType' Variable='WinRegInstallationType' />
  24. <util:RegistrySearch Id="WinRegCurrentBuildSearch" Root='HKLM' Key='SOFTWARE\Microsoft\Windows NT\CurrentVersion' Value='CurrentBuild' Variable='WinRegCurrentBuild' />
  25. <util:RegistrySearch Id="WinRegCurrentBuildNumberSearch" Root='HKLM' Key='SOFTWARE\Microsoft\Windows NT\CurrentVersion' Value='CurrentBuildNumber' Variable='WinRegCurrentBuildNumber' />
  26. <util:RegistrySearch Id="WinRegMediaPlayerSearch" Root='HKLM' Key='SOFTWARE\Microsoft\MediaPlayer' Value='Installation Directory' Variable='WinRegMediaPlayer' />
  27. <util:RegistrySearch Variable="KB2919355_amd64"
  28. Root="HKLM"
  29. Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14"
  30. Value="CurrentState"
  31. Win64="yes"
  32. />
  33. <util:RegistrySearch Variable="KB2919355_x86"
  34. Root="HKLM"
  35. Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~x86~~6.3.1.14"
  36. Value="CurrentState"
  37. />
  38. <bal:Condition Message="Jellyfin Media Player can only be installed on Windows 7 or newer.">
  39. <![CDATA[VersionNT >= v6.1]]>
  40. </bal:Condition>
  41. <!-- Checking for prerequisites for windows versions where they are required -->
  42. <!-- We need to check for when ServicePackLevel is not defined as well, with (NOT ServicePackLevel) -->
  43. <bal:Condition Message="Jellyfin Media Player on Windows 7 or Windows Server 2008 R2 requires Service Pack 1.">
  44. <![CDATA[NOT ((VersionNT = v6.1) AND ((NOT ServicePackLevel) OR (ServicePackLevel < 1)))]]>
  45. </bal:Condition>
  46. <!-- Windows 8 and 2012 have no prerequisites -->
  47. <bal:Condition Message="Jellyfin Media Player on Windows 8.1 or Windows Server 2012 R2 requires KB2919355 installed.">
  48. <![CDATA[NOT ((VersionNT = v6.3) AND (KB2919355_x86 <> 112 AND KB2919355_amd64 <> 112))]]>
  49. </bal:Condition>
  50. <!-- msvcp140.dll will exist and ucrtbase.dll will not exist with a bad vcredist install-->
  51. <util:FileSearch Variable="Found_ucrtbase_dll"
  52. Path="[SystemFolder]ucrtbase.dll"
  53. Result="exists"
  54. />
  55. <util:FileSearch Variable="Bad_VCRedist"
  56. Path="[SystemFolder]msvcp140.dll"
  57. Result="exists"
  58. Condition="NOT Found_ucrtbase_dll"
  59. />
  60. <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
  61. <bal:WixStandardBootstrapperApplication
  62. LicenseUrl=""
  63. ThemeFile="pmstheme.xml"
  64. LocalizationFile="HyperlinkTheme.wxl"
  65. />
  66. <Payload SourceFile="jellyfin-chevron-85.png" />
  67. <Payload SourceFile="progress-bar.png" />
  68. </BootstrapperApplicationRef>
  69. <Variable Name="autolaunch" bal:Overridable="yes" Type="numeric" Value="0" />
  70. <Variable Name="InstallFolder" Type="string" Value="[ProgramFiles64Folder]Jellyfin\Jellyfin Media Player" />
  71. <!-- Search for InstallFolder in registry and set it to the PreviousInstallFolder -->
  72. <util:RegistrySearch
  73. Id="PreviousInstallFolderSearch" Root='HKCU' Key='Software\Jellyfin\Jellyfin Media Player' Value='InstallFolder' Variable='PreviousInstallFolder' />
  74. <!-- Checks if PreviousInstallFolder exists event if it is defined in the Registry, sets it to InstallFolder if so -->
  75. <util:DirectorySearch
  76. Path='[PreviousInstallFolder]' Variable='InstallFolder' After='PreviousInstallFolderSearch' Condition='PreviousInstallFolder' />
  77. <Variable Name="LaunchTarget" Value="[InstallFolder]\JellyfinMediaPlayer.exe"/>
  78. <!-- Is Media Feature Pack present? (This should be enough for detecting if we are running on Windows N or not) -->
  79. <util:FileSearch Variable="FoundMfPlatDll" Path="[SystemFolder]mfplat.dll" Result="exists" />
  80. <!-- In order to avoid using a SourceFile, use heat to harvest the RemotePayload data out of the msu files: "heat payload xxx.msu -out out.xml"-->
  81. <!-- Add the <RemotePayload> element from the xml file to the package file and change SourceFile to Name with just the filename. -->
  82. <!-- For msu files <RemotePayload> needs a dummy Version, ProductName and Description attributes (These aren't available from the file itself and build fails if you omit them) -->
  83. <!-- When installing burn will automatically use a package (.msu, .msi, .exe) if its uncompressed and is next to the install bundle, instead of downloading it.-->
  84. <Chain>
  85. <!-- Media Feature Packs for Windows 7.0 -->
  86. <MsuPackage KB="KB968211"
  87. DisplayName="Downloading Media Feature Pack for Windows 7 x86"
  88. Id="MediaPackWin7x86"
  89. Name="Windows6.1-KB968211-x86-RefreshPkg.msu"
  90. DownloadUrl="https://download.microsoft.com/download/B/9/B/B9BED058-8669-490E-BA61-D502E4E8BEB1/Windows6.1-KB968211-x86-RefreshPkg.msu"
  91. InstallCondition='VersionNT=v6.1 AND NOT VersionNT64 AND WinRegInstallationType~="Client"'
  92. DetectCondition="FoundMfPlatDll"
  93. Cache="no"
  94. Compressed="no"
  95. Permanent="yes"
  96. Vital="yes">
  97. <RemotePayload CertificatePublicKey="61E7707927AF8DEDA014EC17C6959A989EB68C57" CertificateThumbprint="9BF69D5E8D01A92F413B60A4BE003E323CB52F7F" Description="Windows6.1-KB968211-x86-RefreshPkg.msu" Hash="88C37CB34D871C1B52A9D1125477D812999CB28E" ProductName="Windows6.1-KB968211-x86-RefreshPkg.msu" Size="291852366" Version="1.1.1.1"/>
  98. </MsuPackage>
  99. <MsuPackage KB="KB968211"
  100. DisplayName="Downloading Media Feature Pack for Windows 7 x64"
  101. Id="MediaPackWin7x64"
  102. Name="Windows6.1-KB968211-x64-RefreshPkg.msu"
  103. DownloadUrl="https://download.microsoft.com/download/B/9/B/B9BED058-8669-490E-BA61-D502E4E8BEB1/Windows6.1-KB968211-x64-RefreshPkg.msu"
  104. InstallCondition='VersionNT=v6.1 AND VersionNT64 AND WinRegInstallationType~="Client"'
  105. DetectCondition="FoundMfPlatDll"
  106. Cache="no"
  107. Compressed="no"
  108. Permanent="yes"
  109. Vital="yes">
  110. <RemotePayload CertificatePublicKey="61E7707927AF8DEDA014EC17C6959A989EB68C57" CertificateThumbprint="9BF69D5E8D01A92F413B60A4BE003E323CB52F7F" Description="Windows6.1-KB968211-x64-RefreshPkg.msu" Hash="79FC3C186F7AF88E3273A40E52F01A5E48103BF9" ProductName="Windows6.1-KB968211-x64-RefreshPkg.msu" Size="318337992" Version="1.1.1.1"/>
  111. </MsuPackage>
  112. <!-- Media Feature Packs for Windows 8.0 -->
  113. <MsuPackage KB="KB2703761"
  114. DisplayName="Downloading Media Feature Pack for Windows 8.0 x86"
  115. Id="MediaPackWin8x86"
  116. Name="Windows6.2-KB2703761-x86.msu"
  117. DownloadUrl="https://download.microsoft.com/download/7/A/D/7AD12930-3AA6-4040-81CF-350BF1E99076/Windows6.2-KB2703761-x86.msu"
  118. InstallCondition='VersionNT=v6.2 AND NOT VersionNT64 AND WinRegInstallationType~="Client"'
  119. DetectCondition="FoundMfPlatDll AND WinRegMediaPlayer"
  120. Cache="no"
  121. Compressed="no"
  122. Permanent="yes"
  123. Vital="yes">
  124. <RemotePayload CertificatePublicKey="D37F6D0F2894D56049061A44596FFA88CBFD1B5B" CertificateThumbprint="19F8F76F4655074509769C20349FFAECCECD217D" Description="Windows6.2-KB2703761-x86.msu" Hash="E94B6B38870333F33091630915D06C1C3CB3BD59" ProductName="Windows6.2-KB2703761-x86.msu" Size="60746899" Version="1.1.1.1"/>
  125. </MsuPackage>
  126. <MsuPackage KB="KB2703761"
  127. DisplayName="Downloading Media Feature Pack for Windows 8.0 x64"
  128. Id="MediaPackWin8x64"
  129. Name="Windows6.2-KB2703761-x64.msu"
  130. DownloadUrl="https://download.microsoft.com/download/7/A/D/7AD12930-3AA6-4040-81CF-350BF1E99076/Windows6.2-KB2703761-x64.msu"
  131. InstallCondition='VersionNT=v6.2 AND VersionNT64 AND WinRegInstallationType~="Client"'
  132. DetectCondition="FoundMfPlatDll AND WinRegMediaPlayer"
  133. Cache="no"
  134. Compressed="no"
  135. Permanent="yes"
  136. Vital="yes">
  137. <RemotePayload CertificatePublicKey="D37F6D0F2894D56049061A44596FFA88CBFD1B5B" CertificateThumbprint="19F8F76F4655074509769C20349FFAECCECD217D" Description="Windows6.2-KB2703761-x64.msu" Hash="B2A81F0BE816628096A22B37F2D17D9E8063DC6F" ProductName="Windows6.2-KB2703761-x64.msu" Size="82674179" Version="1.1.1.1"/>
  138. </MsuPackage>
  139. <!-- Media Feature Packs for Windows 8.1 -->
  140. <MsuPackage KB="KB2929699"
  141. DisplayName="Downloading Media Feature Pack for Windows 8.1 x86"
  142. Id="MediaPackWin81x86"
  143. Name="Windows8.1-KB2929699-x86.msu"
  144. DownloadUrl="https://download.microsoft.com/download/8/9/7/89775613-432E-4ECF-93A9-5BAFCB5B7807/Windows8.1-KB2929699-x86.msu"
  145. InstallCondition='VersionNT=v6.3 AND NOT VersionNT64 AND WinRegInstallationType~="Client"'
  146. DetectCondition="FoundMfPlatDll"
  147. Cache="no"
  148. Compressed="no"
  149. Permanent="yes"
  150. Vital="yes">
  151. <RemotePayload CertificatePublicKey="A260A870BE1145ED71E2BB5AA19463A4FE9DCC41" CertificateThumbprint="108E2BA23632620C427C570B6D9DB51AC31387FE" Description="Windows8.1-KB2929699-x86.msu" Hash="386524559BAF25F86BF374F88EB5BAD6F07A0F9F" ProductName="Windows8.1-KB2929699-x86.msu" Size="63605391" Version="1.1.1.1"/>
  152. </MsuPackage>
  153. <MsuPackage KB="KB2929699"
  154. DisplayName="Downloading Media Feature Pack for Windows 8.1 x64"
  155. Id="MediaPackWin81x64"
  156. Name="Windows8.1-KB2929699-x64.msu"
  157. DownloadUrl="https://download.microsoft.com/download/8/9/7/89775613-432E-4ECF-93A9-5BAFCB5B7807/Windows8.1-KB2929699-x64.msu"
  158. InstallCondition='VersionNT=v6.3 AND VersionNT64 AND WinRegInstallationType~="Client"'
  159. DetectCondition="FoundMfPlatDll"
  160. Cache="no"
  161. Compressed="no"
  162. Permanent="yes"
  163. Vital="yes">
  164. <RemotePayload CertificatePublicKey="A260A870BE1145ED71E2BB5AA19463A4FE9DCC41" CertificateThumbprint="108E2BA23632620C427C570B6D9DB51AC31387FE" Description="Windows8.1-KB2929699-x64.msu" Hash="0734AED9D4354F90A77811758F4BC554D731F6B0" ProductName="Windows8.1-KB2929699-x64.msu" Size="89383884" Version="1.1.1.1"/>
  165. </MsuPackage>
  166. <!-- Media Feature Packs for Windows 10 RTM -->
  167. <MsuPackage KB="KB3010081"
  168. DisplayName="Downloading Media Feature Pack for Windows 10 x86"
  169. Id="MediaPackWin10x86"
  170. Name="Microsoft-Windows-MediaFeaturePack-OOB-Package.msu"
  171. DownloadUrl="https://download.microsoft.com/download/7/F/2/7F2E00A7-F071-41CA-A35B-00DC536D4227/Microsoft-Windows-MediaFeaturePack-OOB-Package.msu"
  172. InstallCondition='VersionNT>=v10.0 AND NOT VersionNT64 AND WinRegCurrentBuildNumber=10240 AND WinRegInstallationType~="Client"'
  173. DetectCondition="FoundMfPlatDll"
  174. Cache="no"
  175. Compressed="no"
  176. Permanent="yes"
  177. Vital="yes">
  178. <RemotePayload CertificatePublicKey="4C72A5297C20ADD16A1964578EFFC7CB4EF1D38D" CertificateThumbprint="49DA9A5E21EDC4682AD0211C85D552C86C422F13" Description="Microsoft-Windows-MediaFeaturePack-OOB-Package.msu" Hash="87ABA28404F07E7D1CEA496FDB4AD20B8C978E50" ProductName="Microsoft-Windows-MediaFeaturePack-OOB-Package.msu" Size="75898094" Version="1.1.1.1"/>
  179. </MsuPackage>
  180. <MsuPackage KB="KB3010081"
  181. DisplayName="Downloading Media Feature Pack for Windows 10 x64"
  182. Id="MediaPackWin10x64"
  183. Name="Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu"
  184. DownloadUrl="https://download.microsoft.com/download/7/F/2/7F2E00A7-F071-41CA-A35B-00DC536D4227/Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu"
  185. InstallCondition='VersionNT>=v10.0 AND VersionNT64 AND WinRegCurrentBuildNumber=10240 AND WinRegInstallationType~="Client"'
  186. DetectCondition="FoundMfPlatDll"
  187. Cache="no"
  188. Compressed="no"
  189. Permanent="yes"
  190. Vital="yes">
  191. <RemotePayload CertificatePublicKey="4C72A5297C20ADD16A1964578EFFC7CB4EF1D38D" CertificateThumbprint="49DA9A5E21EDC4682AD0211C85D552C86C422F13" Description="Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu" Hash="2D1FAE125F6A5FBEB3F56479DBA7A2BE8BC3EE77" ProductName="Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu" Size="114150296" Version="1.1.1.1"/>
  192. </MsuPackage>
  193. <!-- Media Feature Packs for Windows 10 1511 -->
  194. <MsuPackage KB="KB3099229"
  195. DisplayName="Downloading Media Pack for Windows 10 x86 1511"
  196. Id="MediaPackWin10x861511"
  197. Name="KB3099229_x86.msu"
  198. DownloadUrl="https://download.microsoft.com/download/B/E/3/BE302763-5BFD-4209-9C98-02DF5B2DB452/KB3099229_x86.msu"
  199. InstallCondition='VersionNT>=v10.0 AND NOT VersionNT64 AND WinRegReleaseID=1511 AND WinRegInstallationType~="Client"'
  200. DetectCondition="FoundMfPlatDll"
  201. Cache="no"
  202. Compressed="no"
  203. Permanent="yes"
  204. Vital="yes">
  205. <RemotePayload CertificatePublicKey="4C72A5297C20ADD16A1964578EFFC7CB4EF1D38D" CertificateThumbprint="49DA9A5E21EDC4682AD0211C85D552C86C422F13" Description="KB3099229_x86.msu" Hash="4C1CBED520159DA8F5DB69BF1E04C2D0DD7EDB23" ProductName="KB3099229_x86.msu" Size="76836258" Version="1.1.1.1"/>
  206. </MsuPackage>
  207. <MsuPackage KB="KB3099229"
  208. DisplayName="Downloading Media Pack for Windows 10 x64 1511"
  209. Id="MediaPackWin10x641511"
  210. Name="KB3099229_x64.msu"
  211. DownloadUrl="https://download.microsoft.com/download/B/E/3/BE302763-5BFD-4209-9C98-02DF5B2DB452/KB3099229_x64.msu"
  212. InstallCondition='VersionNT>=v10.0 AND VersionNT64 AND WinRegReleaseID=1511 AND WinRegInstallationType~="Client"'
  213. DetectCondition="FoundMfPlatDll"
  214. Cache="no"
  215. Compressed="no"
  216. Permanent="yes"
  217. Vital="yes">
  218. <RemotePayload CertificatePublicKey="4C72A5297C20ADD16A1964578EFFC7CB4EF1D38D" CertificateThumbprint="49DA9A5E21EDC4682AD0211C85D552C86C422F13" Description="KB3099229_x64.msu" Hash="DB92011AB439392E426A82A1F60EF6CC87A63864" ProductName="KB3099229_x64.msu" Size="115805700" Version="1.1.1.1"/>
  219. </MsuPackage>
  220. <!-- PMP's msi-->
  221. <MsiPackage Id="pmp"
  222. Name="PMP.msi"
  223. Compressed="yes"
  224. SourceFile="$(var.OutputPath)/PMP.msi"
  225. Vital="yes">
  226. <MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
  227. <MsiProperty Name="AUTOLAUNCH" Value="[autolaunch]" />
  228. <MsiProperty Name="WINDOWSTYPE" Value="[WinRegInstallationType]" />
  229. </MsiPackage>
  230. <ExePackage Id="vcredist_repair"
  231. SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\vcredist_x64.exe"
  232. Name="vcredist_x64.exe"
  233. InstallCommand="/repair /quiet /norestart"
  234. InstallCondition="Bad_VCRedist"
  235. Compressed="yes"
  236. Vital="yes"
  237. Permanent="yes">
  238. <ExitCode Value="1638" Behavior="success"/>
  239. </ExePackage>
  240. <ExePackage Id="vcredist"
  241. SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\vcredist_x64.exe"
  242. Name="vcredist_x64.exe"
  243. InstallCommand="/install /quiet /norestart"
  244. InstallCondition="NOT Bad_VCRedist"
  245. Compressed="yes"
  246. Vital="yes"
  247. Permanent="yes">
  248. <ExitCode Value="1638" Behavior="success"/>
  249. </ExePackage>
  250. </Chain>
  251. </Bundle>
  252. </Wix>