Pick the Arm64 rustup and Qt builds on Arm64 Windows

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-18 15:42:35 +08:00
1 parent 0356cf91f4
commit 361ecd977a
3 files changed
+29 -8

No files matched your search

+11 -2
View File
@@ -7,8 +7,17 @@ rem The default msvc toolchain needs the MSVC Build Tools (see 20-Install-MSVC-A
set "INSTALLER=%TEMP%\rustup-init.exe"
echo Downloading rustup-init...
curl.exe -L --fail -o "%INSTALLER%" https://win.rustup.rs/x86_64
rem PROCESSOR_ARCHITEW6432 holds the real architecture when this runs under emulation.
set "ARCH=%PROCESSOR_ARCHITECTURE%"
if defined PROCESSOR_ARCHITEW6432 set "ARCH=%PROCESSOR_ARCHITEW6432%"
if /i "%ARCH%"=="ARM64" (
set "RUSTUP_ARCH=aarch64"
) else (
set "RUSTUP_ARCH=x86_64"
)
echo Downloading rustup-init (%RUSTUP_ARCH%)...
curl.exe -L --fail -o "%INSTALLER%" https://win.rustup.rs/%RUSTUP_ARCH%
if errorlevel 1 (
echo Download failed.
pause
+16 -4
View File
@@ -3,13 +3,25 @@ setlocal
title Install Qt 6
rem Qt is not available from winget, so this uses the standalone aqtinstall (aqt) to fetch it.
rem The msvc2022_64 build needs the MSVC Build Tools (see 20-Install-MSVC-Admin.bat).
rem The msvc2022 builds need the MSVC Build Tools (see 20-Install-MSVC-Admin.bat).
set "QT_VERSION=6.10.3"
set "QT_ARCH=win64_msvc2022_64"
set "QT_ROOT=C:\Qt"
set "AQT=%TEMP%\aqt.exe"
rem PROCESSOR_ARCHITEW6432 holds the real architecture when this runs under emulation.
set "ARCH=%PROCESSOR_ARCHITECTURE%"
if defined PROCESSOR_ARCHITEW6432 set "ARCH=%PROCESSOR_ARCHITEW6432%"
if /i "%ARCH%"=="ARM64" (
set "QT_HOST=windows_arm64"
set "QT_DIR=msvc2022_arm64"
) else (
set "QT_HOST=windows"
set "QT_DIR=msvc2022_64"
)
set "QT_ARCH=win64_%QT_DIR%"
rem aqt has no Arm64 build; the x64 one runs under emulation on Arm64 Windows.
echo Downloading aqtinstall...
curl.exe -L --fail -o "%AQT%" https://github.com/miurahr/aqtinstall/releases/download/v3.3.0/aqt_x64.exe
if errorlevel 1 (
@@ -19,13 +31,13 @@ if errorlevel 1 (
)
echo Installing Qt %QT_VERSION% (%QT_ARCH%) to %QT_ROOT% ...
"%AQT%" install-qt windows desktop %QT_VERSION% %QT_ARCH% --outputdir "%QT_ROOT%"
"%AQT%" install-qt %QT_HOST% desktop %QT_VERSION% %QT_ARCH% --outputdir "%QT_ROOT%"
set "RC=%ERRORLEVEL%"
del "%AQT%" >nul 2>&1
if "%RC%"=="0" (
echo Done. Use -DCMAKE_PREFIX_PATH=%QT_ROOT%\%QT_VERSION%\msvc2022_64 with CMake.
echo Done. Use -DCMAKE_PREFIX_PATH=%QT_ROOT%\%QT_VERSION%\%QT_DIR% with CMake.
) else (
echo aqt exited with code %RC%.
)