@@ -220,23 +220,27 @@ if %ERRORLEVEL% neq 0 (
220220 echo Ensure that this script is run in a shell with the necessary write privileges
221221 goto Terminate
222222)
223-
224223REM Download the latest nasm binary for windows
224+ if exist " %SCRIPTDIR% \nasm_%NASMVERSION% .zip" (
225+ echo Using existing NASM binary...
226+ goto InstallNASM
227+ )
225228set NASMDOWNLOAD = %NASMDL% /%NASMVERSION% /win%SYSARCH% /nasm-%NASMVERSION% -win%SYSARCH% .zip
226229echo Downloading required NASM release binary...
227- powershell.exe -Command (New-Object Net.WebClient).DownloadFile('%NASMDOWNLOAD% ', '%SCRIPTDIR% \nasm .zip') > nul 2 >& 1
228- if not exist " %SCRIPTDIR% \nasm .zip" (
230+ powershell.exe -Command (New-Object Net.WebClient).DownloadFile('%NASMDOWNLOAD% ', '%SCRIPTDIR% \nasm_ %NASMVERSION% .zip') > nul 2 >& 1
231+ if not exist " %SCRIPTDIR% \nasm_ %NASMVERSION% .zip" (
229232 echo Error: Failed to download required NASM binary!
230233 echo The following link could not be resolved " %NASMDOWNLOAD% "
231234 goto Terminate
232235)
233- powershell.exe -Command Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('" %SCRIPTDIR% \nasm.zip" ', '" %SCRIPTDIR% \TempNASMUnpack" ') > nul 2 >& 1
236+
237+ :InstallNASM
238+ powershell.exe -Command Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('" %SCRIPTDIR% \nasm_%NASMVERSION% .zip" ', '" %SCRIPTDIR% \TempNASMUnpack" ') > nul 2 >& 1
234239if not exist " %SCRIPTDIR% \TempNASMUnpack" (
235240 echo Error: Failed to unpack NASM download!
236- del /F /Q " %SCRIPTDIR% \nasm .zip" > nul 2 >& 1
241+ del /F /Q " %SCRIPTDIR% \nasm_ .zip" > nul 2 >& 1
237242 goto Terminate
238243)
239- del /F /Q " %SCRIPTDIR% \nasm.zip" > nul 2 >& 1
240244
241245REM copy nasm executable to VC installation folder
242246echo Installing required NASM release binary...
0 commit comments