Bundle.wxs 5.0 KB

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