Add support for bundling ARM64 binaries into the installer

It is disabled by default because Qt doesn't have official ARM64 builds yet
This commit is contained in:
Cameron Gutman 2020-12-24 17:21:35 -06:00
commit c7ddb54e67
2 changed files with 63 additions and 5 deletions

View file

@ -51,6 +51,11 @@
Value="DesktopShortcutInstallState"
Condition="HasDesktopShortcutInstallStateRegKey" />
<util:RegistrySearch Variable="NT_BUILD_STRING"
Root="HKLM"
Key="Software\Microsoft\Windows NT\CurrentVersion"
Value="BuildLabEx" />
<util:ProductSearch Id="VCREDIST_142_x86"
UpgradeCode="$(var.VCREDIST_X86_UPGRADE_CODE)"
Result="version"
@ -61,6 +66,11 @@
Result="version"
Variable="VCREDIST_142_x64" />
<util:ProductSearch Id="VCREDIST_142_ARM64"
UpgradeCode="$(var.VCREDIST_ARM64_UPGRADE_CODE)"
Result="version"
Variable="VCREDIST_142_ARM64" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
ShowVersion="yes"
@ -80,7 +90,7 @@
Vital="yes"
InstallCommand="/install /quiet /norestart"
DownloadUrl="https://moonlight-stream.org/downloads/vcredist/$(var.VCREDIST_VER)/vcredist_x86.exe"
InstallCondition="NOT VersionNT64"
InstallCondition="NT_BUILD_STRING &gt;&lt; &quot;x86&quot;"
DetectCondition="VCREDIST_142_x86 &gt;= v$(var.VCREDIST_VER)">
<RemotePayload Description="Microsoft Visual C++ 2015-2019 Redistributable - x86"
@ -101,7 +111,7 @@
Vital="yes"
InstallCommand="/install /quiet /norestart"
DownloadUrl="https://moonlight-stream.org/downloads/vcredist/$(var.VCREDIST_VER)/vcredist_x64.exe"
InstallCondition="VersionNT64"
InstallCondition="NT_BUILD_STRING &gt;&lt; &quot;amd64&quot;"
DetectCondition="VCREDIST_142_x64 &gt;= v$(var.VCREDIST_VER)">
<RemotePayload Description="Microsoft Visual C++ 2015-2019 Redistributable - x64"
@ -114,9 +124,32 @@
<ExitCode Value="1638" Behavior="success" />
</ExePackage>
<?if $(var.INCLUDE_ARM64) != 0 ?>
<ExePackage Name="Microsoft Visual C++ 2015-2019 Redistributable - ARM64"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
InstallCommand="/install /quiet /norestart"
DownloadUrl="https://moonlight-stream.org/downloads/vcredist/$(var.VCREDIST_VER)/vcredist_arm64.exe"
InstallCondition="NT_BUILD_STRING &gt;&lt; &quot;arm64&quot;"
DetectCondition="VCREDIST_142_ARM64 &gt;= v$(var.VCREDIST_VER)">
<RemotePayload Description="Microsoft Visual C++ 2015-2019 Redistributable - ARM64"
ProductName="Microsoft Visual C++ 2015-2019 Redistributable - ARM64"
Size="$(var.VCREDIST_ARM64_SIZE)"
Version="$(var.VCREDIST_VER).0"
Hash="$(var.VCREDIST_ARM64_SHA1)"/>
<!-- Newer version installed is fine -->
<ExitCode Value="1638" Behavior="success" />
</ExePackage>
<?endif?>
<MsiPackage Id="Moonlight_x86"
SourceFile="$(env.BUILD_ROOT)\build-x86-$(env.BUILD_CONFIG)\Moonlight.msi"
InstallCondition="NOT VersionNT64"
InstallCondition="NT_BUILD_STRING &gt;&lt; &quot;x86&quot;"
Vital="yes">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
<MsiProperty Name="REINSTALLMODE" Value="[REINSTALLMODE]" />
@ -125,12 +158,23 @@
<MsiPackage Id="Moonlight_x64"
SourceFile="$(env.BUILD_ROOT)\build-x64-$(env.BUILD_CONFIG)\Moonlight.msi"
InstallCondition="VersionNT64"
InstallCondition="NT_BUILD_STRING &gt;&lt; &quot;amd64&quot;"
Vital="yes">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
<MsiProperty Name="REINSTALLMODE" Value="[REINSTALLMODE]" />
<MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" />
</MsiPackage>
<?if $(var.INCLUDE_ARM64) != 0 ?>
<MsiPackage Id="Moonlight_arm64"
SourceFile="$(env.BUILD_ROOT)\build-arm64-$(env.BUILD_CONFIG)\Moonlight.msi"
InstallCondition="NT_BUILD_STRING &gt;&lt; &quot;arm64&quot;"
Vital="yes">
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
<MsiProperty Name="REINSTALLMODE" Value="[REINSTALLMODE]" />
<MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" />
</MsiPackage>
<?endif?>
</Chain>
</Bundle>