Bundle.wxs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. <Variable Name="AddDesktopShortcut" Value="1" />
  79. <!-- Is Media Feature Pack present? (This should be enough for detecting if we are running on Windows N or not) -->
  80. <util:FileSearch Variable="FoundMfPlatDll" Path="[SystemFolder]mfplat.dll" Result="exists" />
  81. <!-- 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"-->
  82. <!-- Add the <RemotePayload> element from the xml file to the package file and change SourceFile to Name with just the filename. -->
  83. <!-- 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) -->
  84. <!-- 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.-->
  85. <Chain>
  86. <!-- Media Feature Packs for Windows 7.0 -->
  87. <MsuPackage KB="KB968211"
  88. DisplayName="Downloading Media Feature Pack for Windows 7 x86"
  89. Id="MediaPackWin7x86"
  90. Name="Windows6.1-KB968211-x86-RefreshPkg.msu"
  91. DownloadUrl="https://download.microsoft.com/download/B/9/B/B9BED058-8669-490E-BA61-D502E4E8BEB1/Windows6.1-KB968211-x86-RefreshPkg.msu"
  92. InstallCondition='VersionNT=v6.1 AND NOT VersionNT64 AND WinRegInstallationType~="Client"'
  93. DetectCondition="FoundMfPlatDll"
  94. Cache="no"
  95. Compressed="no"
  96. Permanent="yes"
  97. Vital="yes">
  98. <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"/>
  99. </MsuPackage>
  100. <MsuPackage KB="KB968211"
  101. DisplayName="Downloading Media Feature Pack for Windows 7 x64"
  102. Id="MediaPackWin7x64"
  103. Name="Windows6.1-KB968211-x64-RefreshPkg.msu"
  104. DownloadUrl="https://download.microsoft.com/download/B/9/B/B9BED058-8669-490E-BA61-D502E4E8BEB1/Windows6.1-KB968211-x64-RefreshPkg.msu"
  105. InstallCondition='VersionNT=v6.1 AND VersionNT64 AND WinRegInstallationType~="Client"'
  106. DetectCondition="FoundMfPlatDll"
  107. Cache="no"
  108. Compressed="no"
  109. Permanent="yes"
  110. Vital="yes">
  111. <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"/>
  112. </MsuPackage>
  113. <!-- Media Feature Packs for Windows 8.0 -->
  114. <MsuPackage KB="KB2703761"
  115. DisplayName="Downloading Media Feature Pack for Windows 8.0 x86"
  116. Id="MediaPackWin8x86"
  117. Name="Windows6.2-KB2703761-x86.msu"
  118. DownloadUrl="https://download.microsoft.com/download/7/A/D/7AD12930-3AA6-4040-81CF-350BF1E99076/Windows6.2-KB2703761-x86.msu"
  119. InstallCondition='VersionNT=v6.2 AND NOT VersionNT64 AND WinRegInstallationType~="Client"'
  120. DetectCondition="FoundMfPlatDll AND WinRegMediaPlayer"
  121. Cache="no"
  122. Compressed="no"
  123. Permanent="yes"
  124. Vital="yes">
  125. <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"/>
  126. </MsuPackage>
  127. <MsuPackage KB="KB2703761"
  128. DisplayName="Downloading Media Feature Pack for Windows 8.0 x64"
  129. Id="MediaPackWin8x64"
  130. Name="Windows6.2-KB2703761-x64.msu"
  131. DownloadUrl="https://download.microsoft.com/download/7/A/D/7AD12930-3AA6-4040-81CF-350BF1E99076/Windows6.2-KB2703761-x64.msu"
  132. InstallCondition='VersionNT=v6.2 AND VersionNT64 AND WinRegInstallationType~="Client"'
  133. DetectCondition="FoundMfPlatDll AND WinRegMediaPlayer"
  134. Cache="no"
  135. Compressed="no"
  136. Permanent="yes"
  137. Vital="yes">
  138. <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"/>
  139. </MsuPackage>
  140. <!-- Media Feature Packs for Windows 8.1 -->
  141. <MsuPackage KB="KB2929699"
  142. DisplayName="Downloading Media Feature Pack for Windows 8.1 x86"
  143. Id="MediaPackWin81x86"
  144. Name="Windows8.1-KB2929699-x86.msu"
  145. DownloadUrl="https://download.microsoft.com/download/8/9/7/89775613-432E-4ECF-93A9-5BAFCB5B7807/Windows8.1-KB2929699-x86.msu"
  146. InstallCondition='VersionNT=v6.3 AND NOT VersionNT64 AND WinRegInstallationType~="Client"'
  147. DetectCondition="FoundMfPlatDll"
  148. Cache="no"
  149. Compressed="no"
  150. Permanent="yes"
  151. Vital="yes">
  152. <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"/>
  153. </MsuPackage>
  154. <MsuPackage KB="KB2929699"
  155. DisplayName="Downloading Media Feature Pack for Windows 8.1 x64"
  156. Id="MediaPackWin81x64"
  157. Name="Windows8.1-KB2929699-x64.msu"
  158. DownloadUrl="https://download.microsoft.com/download/8/9/7/89775613-432E-4ECF-93A9-5BAFCB5B7807/Windows8.1-KB2929699-x64.msu"
  159. InstallCondition='VersionNT=v6.3 AND VersionNT64 AND WinRegInstallationType~="Client"'
  160. DetectCondition="FoundMfPlatDll"
  161. Cache="no"
  162. Compressed="no"
  163. Permanent="yes"
  164. Vital="yes">
  165. <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"/>
  166. </MsuPackage>
  167. <!-- Media Feature Packs for Windows 10 RTM -->
  168. <MsuPackage KB="KB3010081"
  169. DisplayName="Downloading Media Feature Pack for Windows 10 x86"
  170. Id="MediaPackWin10x86"
  171. Name="Microsoft-Windows-MediaFeaturePack-OOB-Package.msu"
  172. DownloadUrl="https://download.microsoft.com/download/7/F/2/7F2E00A7-F071-41CA-A35B-00DC536D4227/Microsoft-Windows-MediaFeaturePack-OOB-Package.msu"
  173. InstallCondition='VersionNT>=v10.0 AND NOT VersionNT64 AND WinRegCurrentBuildNumber=10240 AND WinRegInstallationType~="Client"'
  174. DetectCondition="FoundMfPlatDll"
  175. Cache="no"
  176. Compressed="no"
  177. Permanent="yes"
  178. Vital="yes">
  179. <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"/>
  180. </MsuPackage>
  181. <MsuPackage KB="KB3010081"
  182. DisplayName="Downloading Media Feature Pack for Windows 10 x64"
  183. Id="MediaPackWin10x64"
  184. Name="Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu"
  185. DownloadUrl="https://download.microsoft.com/download/7/F/2/7F2E00A7-F071-41CA-A35B-00DC536D4227/Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu"
  186. InstallCondition='VersionNT>=v10.0 AND VersionNT64 AND WinRegCurrentBuildNumber=10240 AND WinRegInstallationType~="Client"'
  187. DetectCondition="FoundMfPlatDll"
  188. Cache="no"
  189. Compressed="no"
  190. Permanent="yes"
  191. Vital="yes">
  192. <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"/>
  193. </MsuPackage>
  194. <!-- Media Feature Packs for Windows 10 1511 -->
  195. <MsuPackage KB="KB3099229"
  196. DisplayName="Downloading Media Pack for Windows 10 x86 1511"
  197. Id="MediaPackWin10x861511"
  198. Name="KB3099229_x86.msu"
  199. DownloadUrl="https://download.microsoft.com/download/B/E/3/BE302763-5BFD-4209-9C98-02DF5B2DB452/KB3099229_x86.msu"
  200. InstallCondition='VersionNT>=v10.0 AND NOT VersionNT64 AND WinRegReleaseID=1511 AND WinRegInstallationType~="Client"'
  201. DetectCondition="FoundMfPlatDll"
  202. Cache="no"
  203. Compressed="no"
  204. Permanent="yes"
  205. Vital="yes">
  206. <RemotePayload CertificatePublicKey="4C72A5297C20ADD16A1964578EFFC7CB4EF1D38D" CertificateThumbprint="49DA9A5E21EDC4682AD0211C85D552C86C422F13" Description="KB3099229_x86.msu" Hash="4C1CBED520159DA8F5DB69BF1E04C2D0DD7EDB23" ProductName="KB3099229_x86.msu" Size="76836258" Version="1.1.1.1"/>
  207. </MsuPackage>
  208. <MsuPackage KB="KB3099229"
  209. DisplayName="Downloading Media Pack for Windows 10 x64 1511"
  210. Id="MediaPackWin10x641511"
  211. Name="KB3099229_x64.msu"
  212. DownloadUrl="https://download.microsoft.com/download/B/E/3/BE302763-5BFD-4209-9C98-02DF5B2DB452/KB3099229_x64.msu"
  213. InstallCondition='VersionNT>=v10.0 AND VersionNT64 AND WinRegReleaseID=1511 AND WinRegInstallationType~="Client"'
  214. DetectCondition="FoundMfPlatDll"
  215. Cache="no"
  216. Compressed="no"
  217. Permanent="yes"
  218. Vital="yes">
  219. <RemotePayload CertificatePublicKey="4C72A5297C20ADD16A1964578EFFC7CB4EF1D38D" CertificateThumbprint="49DA9A5E21EDC4682AD0211C85D552C86C422F13" Description="KB3099229_x64.msu" Hash="DB92011AB439392E426A82A1F60EF6CC87A63864" ProductName="KB3099229_x64.msu" Size="115805700" Version="1.1.1.1"/>
  220. </MsuPackage>
  221. <!-- PMP's msi-->
  222. <MsiPackage Id="pmp"
  223. Name="PMP.msi"
  224. Compressed="yes"
  225. SourceFile="$(var.OutputPath)/PMP.msi"
  226. Vital="yes">
  227. <MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
  228. <MsiProperty Name="AUTOLAUNCH" Value="[autolaunch]" />
  229. <MsiProperty Name="WINDOWSTYPE" Value="[WinRegInstallationType]" />
  230. <MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcut]" />
  231. </MsiPackage>
  232. <ExePackage Id="vcredist_repair"
  233. SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\v142\vcredist_x64.exe"
  234. Name="vcredist_x64.exe"
  235. InstallCommand="/repair /quiet /norestart"
  236. InstallCondition="Bad_VCRedist"
  237. Compressed="yes"
  238. Vital="yes"
  239. Permanent="yes">
  240. <ExitCode Value="1638" Behavior="success"/>
  241. </ExePackage>
  242. <ExePackage Id="vcredist"
  243. SourceFile="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\v142\vcredist_x64.exe"
  244. Name="vcredist_x64.exe"
  245. InstallCommand="/install /quiet /norestart"
  246. InstallCondition="NOT Bad_VCRedist"
  247. Compressed="yes"
  248. Vital="yes"
  249. Permanent="yes">
  250. <ExitCode Value="1638" Behavior="success"/>
  251. </ExePackage>
  252. </Chain>
  253. </Bundle>
  254. </Wix>