Always include ARM64 in the installer bundle

This commit is contained in:
Cameron Gutman 2023-09-10 15:14:24 -05:00
parent 3e3f384218
commit a16647f16c
2 changed files with 31 additions and 52 deletions

View file

@ -5,10 +5,6 @@ rem Run from Qt command prompt with working directory set to root of repo
set BUILD_CONFIG=%1 set BUILD_CONFIG=%1
if "%INCLUDE_ARM64%" EQU "" (
set INCLUDE_ARM64=0
)
rem Convert to lower case for windeployqt rem Convert to lower case for windeployqt
if /I "%BUILD_CONFIG%"=="debug" ( if /I "%BUILD_CONFIG%"=="debug" (
set BUILD_CONFIG=debug set BUILD_CONFIG=debug
@ -23,9 +19,6 @@ if /I "%BUILD_CONFIG%"=="debug" (
set SIGN=1 set SIGN=1
set MUST_DEPLOY_SYMBOLS=1 set MUST_DEPLOY_SYMBOLS=1
rem Release installers must have ARM64
set INCLUDE_ARM64=1
rem Fail if there are unstaged changes rem Fail if there are unstaged changes
git diff-index --quiet HEAD -- git diff-index --quiet HEAD --
if !ERRORLEVEL! NEQ 0 ( if !ERRORLEVEL! NEQ 0 (
@ -58,12 +51,10 @@ if not exist "%BUILD_ROOT%\build-x64-%BUILD_CONFIG%\Moonlight.msi" (
echo You must run 'build-arch.bat %BUILD_CONFIG% x64' first echo You must run 'build-arch.bat %BUILD_CONFIG% x64' first
exit /b 1 exit /b 1
) )
if %INCLUDE_ARM64% NEQ 0 ( if not exist "%BUILD_ROOT%\build-arm64-%BUILD_CONFIG%\Moonlight.msi" (
if not exist "%BUILD_ROOT%\build-arm64-%BUILD_CONFIG%\Moonlight.msi" ( echo Unable to build bundle - missing binaries for %BUILD_CONFIG% arm64
echo Unable to build bundle - missing binaries for %BUILD_CONFIG% arm64 echo You must run 'build-arch.bat %BUILD_CONFIG% arm64' first
echo You must run 'build-arch.bat %BUILD_CONFIG% arm64' first exit /b 1
exit /b 1
)
) )
echo Cleaning output directories echo Cleaning output directories
@ -81,21 +72,13 @@ if !ERRORLEVEL! NEQ 0 goto Error
echo Building bundle echo Building bundle
rem Bundles are always x86 binaries rem Bundles are always x86 binaries
msbuild -Restore %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86 /p:DefineConstants="INCLUDE_ARM64=%INCLUDE_ARM64%" msbuild -Restore %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86
if !ERRORLEVEL! NEQ 0 goto Error if !ERRORLEVEL! NEQ 0 goto Error
rem Rename the installer to match the publishing convention rem Rename the installer to match the publishing convention
ren %INSTALLER_FOLDER%\MoonlightSetup.exe MoonlightSetup-%VERSION%.exe ren %INSTALLER_FOLDER%\MoonlightSetup.exe MoonlightSetup-%VERSION%.exe
echo Build successful for Moonlight v%VERSION% installer! echo Build successful for Moonlight v%VERSION% installer!
echo.
echo x86 included: YES
echo x64 included: YES
if %INCLUDE_ARM64% NEQ 0 (
echo ARM64 included: YES
) else (
echo ARM64 included: NO
)
exit /b 0 exit /b 0
:Error :Error

View file

@ -103,27 +103,25 @@
<ExitCode Value="1638" Behavior="success" /> <ExitCode Value="1638" Behavior="success" />
</ExePackage> </ExePackage>
<?if $(var.INCLUDE_ARM64) != 0 ?> <ExePackage Cache="remove"
<ExePackage Cache="remove" PerMachine="yes"
PerMachine="yes" Permanent="yes"
Permanent="yes" Vital="yes"
Vital="yes" InstallCondition="NativeMachine = 43620"
InstallCondition="NativeMachine = 43620" DetectCondition="VCREDIST_14_ARM64 &gt;= v$(var.VCREDIST_VER)"
DetectCondition="VCREDIST_14_ARM64 &gt;= v$(var.VCREDIST_VER)" InstallArguments="/install /quiet /norestart">
InstallArguments="/install /quiet /norestart">
<ExePackagePayload Description="Microsoft Visual C++ 2015-2022 Redistributable - ARM64"
ProductName="Microsoft Visual C++ 2015-2022 Redistributable - ARM64"
Size="$(var.VCREDIST_ARM64_SIZE)"
Version="$(var.VCREDIST_VER)"
Hash="$(var.VCREDIST_ARM64_SHA512)"
Name="VC_redist.arm64.exe"
DownloadUrl="$(var.VCREDIST_ARM64_URL)" />
<!-- Newer version installed is fine --> <ExePackagePayload Description="Microsoft Visual C++ 2015-2022 Redistributable - ARM64"
<ExitCode Value="1638" Behavior="success" /> ProductName="Microsoft Visual C++ 2015-2022 Redistributable - ARM64"
</ExePackage> Size="$(var.VCREDIST_ARM64_SIZE)"
<?endif?> Version="$(var.VCREDIST_VER)"
Hash="$(var.VCREDIST_ARM64_SHA512)"
Name="VC_redist.arm64.exe"
DownloadUrl="$(var.VCREDIST_ARM64_URL)" />
<!-- Newer version installed is fine -->
<ExitCode Value="1638" Behavior="success" />
</ExePackage>
<MsiPackage Id="Moonlight_x86" <MsiPackage Id="Moonlight_x86"
SourceFile="$(env.BUILD_ROOT)\build-x86-$(env.BUILD_CONFIG)\Moonlight.msi" SourceFile="$(env.BUILD_ROOT)\build-x86-$(env.BUILD_CONFIG)\Moonlight.msi"
@ -143,16 +141,14 @@
<MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" /> <MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" />
</MsiPackage> </MsiPackage>
<?if $(var.INCLUDE_ARM64) != 0 ?> <MsiPackage Id="Moonlight_arm64"
<MsiPackage Id="Moonlight_arm64" SourceFile="$(env.BUILD_ROOT)\build-arm64-$(env.BUILD_CONFIG)\Moonlight.msi"
SourceFile="$(env.BUILD_ROOT)\build-arm64-$(env.BUILD_CONFIG)\Moonlight.msi" Name="Moonlight_arm64.msi"
Name="Moonlight_arm64.msi" InstallCondition="NativeMachine = 43620"
InstallCondition="NativeMachine = 43620" Vital="yes">
Vital="yes"> <MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
<MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" /> <MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" />
<MsiProperty Name="ADDDESKTOPSHORTCUT" Value="[AddDesktopShortcutCheckbox]" /> </MsiPackage>
</MsiPackage>
<?endif?>
</Chain> </Chain>
</Bundle> </Bundle>