Bundle.wxs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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="Plex"
  9. UpgradeCode="$(var.ProductUUID)"
  10. HelpUrl="https://www.plex.tv/"
  11. Copyright="Plex"
  12. AboutUrl="https://www.plex.tv/"
  13. Tag="$(var.FullVersion)"
  14. IconSourceFile="Plex.ico"
  15. >
  16. <util:RegistrySearch Variable="KB2919355_amd64"
  17. Root="HKLM"
  18. Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14"
  19. Value="CurrentState"
  20. Win64="yes"
  21. />
  22. <util:RegistrySearch Variable="KB2919355_x86"
  23. Root="HKLM"
  24. Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~x86~~6.3.1.14"
  25. Value="CurrentState"
  26. />
  27. <bal:Condition Message="Plex Media Player can only be installed on Windows 7 or newer.">
  28. <![CDATA[VersionNT >= v6.1]]>
  29. </bal:Condition>
  30. <!-- Checking for prerequisites for windows versions where they are required -->
  31. <!-- We need to check for when ServicePackLevel is not defined as well, with (NOT ServicePackLevel) -->
  32. <bal:Condition Message="Plex Media Player on Windows 7 or Windows Server 2008 R2 requires Service Pack 1.">
  33. <![CDATA[NOT ((VersionNT = v6.1) AND ((NOT ServicePackLevel) OR (ServicePackLevel < 1)))]]>
  34. </bal:Condition>
  35. <!-- Windows 8 and 2012 have no prerequisites -->
  36. <bal:Condition Message="Plex Media Player on Windows 8.1 or Windows Server 2012 R2 requires KB2919355 installed.">
  37. <![CDATA[NOT ((VersionNT = v6.3) AND (KB2919355_x86 <> 112 AND KB2919355_amd64 <> 112))]]>
  38. </bal:Condition>
  39. <!-- msvcp140.dll will exist and ucrtbase.dll will not exist with a bad vcredist install-->
  40. <util:FileSearch Variable="Found_ucrtbase_dll"
  41. Path="[SystemFolder]ucrtbase.dll"
  42. Result="exists"
  43. />
  44. <util:FileSearch Variable="Bad_VCRedist"
  45. Path="[SystemFolder]msvcp140.dll"
  46. Result="exists"
  47. Condition="NOT Found_ucrtbase_dll"
  48. />
  49. <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
  50. <bal:WixStandardBootstrapperApplication
  51. LicenseUrl=""
  52. ThemeFile="pmstheme.xml"
  53. LocalizationFile="HyperlinkTheme.wxl"
  54. />
  55. <Payload SourceFile="plex-chevron-85.png" />
  56. <Payload SourceFile="progress-bar.png" />
  57. </BootstrapperApplicationRef>
  58. <Variable Name="autolaunch" bal:Overridable="yes" Type="numeric" Value="0" />
  59. <Variable Name="InstallFolder" Type="string" Value="[ProgramFiles64Folder]Plex\Plex Media Player" />
  60. <!-- Search for InstallFolder in registry and set it to the PreviousInstallFolder -->
  61. <util:RegistrySearch
  62. Id="PreviousInstallFolderSearch" Root='HKCU' Key='Software\Plex, Inc.\Plex Media Player' Value='InstallFolder' Variable='PreviousInstallFolder' />
  63. <!-- Checks if PreviousInstallFolder exists event if it is defined in the Registry, sets it to InstallFolder if so -->
  64. <util:DirectorySearch
  65. Path='[PreviousInstallFolder]' Variable='InstallFolder' After='PreviousInstallFolderSearch' Condition='PreviousInstallFolder' />
  66. <Variable Name="LaunchTarget" Value="[InstallFolder]\PlexMediaPlayer.exe"/>
  67. <Chain>
  68. <MsiPackage Id="pmp"
  69. Name="PMP.msi"
  70. Compressed="yes"
  71. SourceFile="$(var.OutputPath)/PMP.msi"
  72. Vital="yes">
  73. <MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
  74. <MsiProperty Name="AUTOLAUNCH" Value="[autolaunch]" />
  75. </MsiPackage>
  76. <ExePackage Id="vcredist_repair"
  77. SourceFile="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\1033\vcredist_x64.exe"
  78. Name="vcredist_x64.exe"
  79. InstallCommand="/repair /quiet /norestart"
  80. InstallCondition="Bad_VCRedist"
  81. Compressed="yes"
  82. Vital="yes"
  83. Permanent="yes">
  84. <ExitCode Value="1638" Behavior="success"/>
  85. </ExePackage>
  86. <ExePackage Id="vcredist"
  87. SourceFile="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\1033\vcredist_x64.exe"
  88. Name="vcredist_x64.exe"
  89. InstallCommand="/install /quiet /norestart"
  90. InstallCondition="NOT Bad_VCRedist"
  91. Compressed="yes"
  92. Vital="yes"
  93. Permanent="yes">
  94. <ExitCode Value="1638" Behavior="success"/>
  95. </ExePackage>
  96. </Chain>
  97. </Bundle>
  98. </Wix>