From 560ee2415799d6982565efaedf9c4a8942f1f678 Mon Sep 17 00:00:00 2001 From: Stefan Stojanovic Date: Sat, 24 Dec 2022 21:20:39 +0100 Subject: [PATCH] build: fix arm64 cross-compile from powershell Starting vcbuild.bat for cross-compiling from powershell was failing the licensertf step because it couldn't find x64_node_exe after downloading. PR-URL: https://github.com/nodejs/node/pull/45890 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- vcbuild.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index 31691448850a62..6fae47fb4115da 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -420,13 +420,13 @@ if not defined licensertf goto stage_package set "use_x64_node_exe=false" if "%target_arch%"=="arm64" if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set "use_x64_node_exe=true" +set "x64_node_exe=temp-vcbuild\node-x64-cross-compiling.exe" if "%use_x64_node_exe%"=="true" ( echo Cross-compilation to ARM64 detected. We'll use the x64 Node executable for license2rtf. - if not defined "%x64_node_exe%" set "x64_node_exe=temp-vcbuild\node-x64-cross-compiling.exe" if not exist "%x64_node_exe%" ( echo Downloading x64 node.exe... if not exist "temp-vcbuild" mkdir temp-vcbuild - powershell -c "Invoke-WebRequest -Uri 'https://nodejs.org/dist/latest/win-x64/node.exe' -OutFile 'temp-vcbuild\node-x64-cross-compiling.exe'" + powershell -c "Invoke-WebRequest -Uri 'https://nodejs.org/dist/latest/win-x64/node.exe' -OutFile '%x64_node_exe%'" ) if not exist "%x64_node_exe%" ( echo Could not find the Node executable at the given x64_node_exe path. Aborting.