Skip to content

Commit 3a52bde

Browse files
committed
scripts: template_setup_win: Use wget from host tools
The GNU Project does not distribute official binaries for wget on Windows, and obtaining trustworthy pre-compiled wget binary on Windows outside package managers can be difficult. This commit updates the Windows setup script to use the wget executable included in the Windows Zephyr SDK host tools to download the SDK components. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 51fd31c commit 3a52bde

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/template_setup_win

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ REM # Check dependencies
5353

5454
call :check_command cmake 90
5555
if [%ERRORLEVEL%] neq [0] goto end
56-
call :check_command wget 91
57-
if [%ERRORLEVEL%] neq [0] goto end
5856
call :check_command 7z 92
5957
if [%ERRORLEVEL%] neq [0] goto end
6058

59+
REM # Set host tools wget binary path
60+
set WGET_CA_CERT=%~dp0hosttools\wget\etc\ssl\cert.pem
61+
set WGET=%~dp0hosttools\wget\bin\wget.exe --ca-certificate %WGET_CA_CERT%
62+
6163
REM # Enter interactive mode if enabled
6264
if [%INTERACTIVE%] neq [] (
6365
goto interactive
@@ -158,7 +160,7 @@ if [%DO_GNU_TOOLCHAIN%] neq [] (
158160
echo Installing '%%t' GNU toolchain ...
159161

160162
REM # Download toolchain archive
161-
wget -q --show-progress -N -O !TOOLCHAIN_FILENAME! !TOOLCHAIN_URI!
163+
%WGET% -q --show-progress -N -O !TOOLCHAIN_FILENAME! !TOOLCHAIN_URI!
162164
if [!ERRORLEVEL!] neq [0] (
163165
del /q !TOOLCHAIN_FILENAME!
164166
echo ERROR: GNU toolchain download failed
@@ -190,7 +192,7 @@ if [%DO_LLVM_TOOLCHAIN%] neq [] (
190192
set TOOLCHAIN_URI=%DL_REL_BASE%/!TOOLCHAIN_FILENAME!
191193

192194
REM # Download toolchain archive
193-
wget -q --show-progress -N -O !TOOLCHAIN_FILENAME! !TOOLCHAIN_URI!
195+
%WGET% -q --show-progress -N -O !TOOLCHAIN_FILENAME! !TOOLCHAIN_URI!
194196
if [!ERRORLEVEL!] neq [0] (
195197
del /q !TOOLCHAIN_FILENAME!
196198
echo ERROR: LLVM toolchain download failed

0 commit comments

Comments
 (0)