diff --git a/scripts/generate-bundle.bat b/scripts/generate-bundle.bat index 1d1c7408..5a9da826 100644 --- a/scripts/generate-bundle.bat +++ b/scripts/generate-bundle.bat @@ -5,6 +5,10 @@ rem Run from Qt command prompt with working directory set to root of repo set BUILD_CONFIG=%1 +if "%INCLUDE_ARM64%" EQU "" ( + set INCLUDE_ARM64=0 +) + rem Convert to lower case for windeployqt if /I "%BUILD_CONFIG%"=="debug" ( set BUILD_CONFIG=debug @@ -19,6 +23,9 @@ if /I "%BUILD_CONFIG%"=="debug" ( set SIGN=1 set MUST_DEPLOY_SYMBOLS=1 + rem Release installers must have ARM64 + set INCLUDE_ARM64=1 + rem Fail if there are unstaged changes git diff-index --quiet HEAD -- if !ERRORLEVEL! NEQ 0 ( @@ -51,6 +58,13 @@ if not exist "%BUILD_ROOT%\build-x64-%BUILD_CONFIG%\Moonlight.msi" ( echo You must run 'build-arch.bat %BUILD_CONFIG% x64' first exit /b 1 ) +if %INCLUDE_ARM64% NEQ 0 ( + if not exist "%BUILD_ROOT%\build-arm64-%BUILD_CONFIG%\Moonlight.msi" ( + echo Unable to build bundle - missing binaries for %BUILD_CONFIG% arm64 + echo You must run 'build-arch.bat %BUILD_CONFIG% arm64' first + exit /b 1 + ) +) echo Cleaning output directories rmdir /s /q %BUILD_FOLDER% @@ -67,7 +81,7 @@ if !ERRORLEVEL! NEQ 0 goto Error echo Building bundle rem Bundles are always x86 binaries -msbuild %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86 +msbuild %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86 /p:DefineConstants="INCLUDE_ARM64=%INCLUDE_ARM64%" if !ERRORLEVEL! NEQ 0 goto Error if "%SIGN%"=="1" ( diff --git a/wix/MoonlightSetup/Bundle.wxs b/wix/MoonlightSetup/Bundle.wxs index 82737baa..8ed99762 100644 --- a/wix/MoonlightSetup/Bundle.wxs +++ b/wix/MoonlightSetup/Bundle.wxs @@ -51,6 +51,11 @@ Value="DesktopShortcutInstallState" Condition="HasDesktopShortcutInstallStateRegKey" /> + + + + + + + + + + + + + + @@ -125,12 +158,23 @@ + + + + + + + +