Skip to content

Commit d0df38e

Browse files
committed
install_script: Fix copying of downloaded yasm exectuable.
Fixes #5
1 parent 833100c commit d0df38e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

install_script.bat

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,18 +288,18 @@ if %ERRORLEVEL% neq 0 (
288288
REM Check if a yasm binary was bundled
289289
if exist "%SCRIPTDIR%\yasm\" (
290290
REM Use the bundled binaries
291-
copy /B /Y /V "%SCRIPTDIR%\yasm\yasm-%SYSARCH%.exe" "%SCRIPTDIR%\yasm.exe" >nul 2>&1
291+
copy /B /Y /V "%SCRIPTDIR%\yasm\yasm-%SYSARCH%.exe" "%SCRIPTDIR%\yasm-%SYSARCH%.exe" >nul 2>&1
292292
goto InstallYASM
293-
) else if exist "%SCRIPTDIR%\yasm_%YASMVERSION%.zip" (
294-
echo Using existing NASM binary...
293+
) else if exist "%SCRIPTDIR%\yasm_%YASMVERSION%_win%SYSARCH%.exe" (
294+
echo Using existing YASM binary...
295295
goto InstallNASM
296296
)
297297

298298
REM Download the latest yasm binary for windows goto Terminate
299299
echo Downloading required YASM release binary...
300300
set YASMDOWNLOAD=%YASMDL%/yasm-%YASMVERSION%-win%SYSARCH%.exe
301-
powershell.exe -Command (New-Object Net.WebClient).DownloadFile('%YASMDOWNLOAD%', '%SCRIPTDIR%\yasm_%YASMVERSION%.exe') >nul 2>&1
302-
if not exist "%SCRIPTDIR%\yasm_%YASMVERSION%.exe" (
301+
powershell.exe -Command (New-Object Net.WebClient).DownloadFile('%YASMDOWNLOAD%', '%SCRIPTDIR%\yasm_%YASMVERSION%_win%SYSARCH%.exe') >nul 2>&1
302+
if not exist "%SCRIPTDIR%\yasm_%YASMVERSION%_win%SYSARCH%.exe" (
303303
echo Error: Failed to download required YASM binary!
304304
echo The following link could not be resolved "%YASMDOWNLOAD%"
305305
goto Terminate
@@ -309,14 +309,14 @@ if not exist "%SCRIPTDIR%\yasm_%YASMVERSION%.exe" (
309309
REM copy yasm executable to VC installation folder
310310
echo Installing required YASM release binary...
311311
del /F /Q "%VCINSTALLDIR%\yasm.exe" >nul 2>&1
312-
copy /B /Y /V "%SCRIPTDIR%\yasm.exe" "%VCINSTALLDIR%\" >nul 2>&1
312+
copy /B /Y /V "%SCRIPTDIR%\yasm*.exe" "%VCINSTALLDIR%\" >nul 2>&1
313313
if %ERRORLEVEL% neq 0 (
314314
echo Error: Failed to install YASM binary!
315315
echo Ensure that this script is run in a shell with the necessary write privileges
316-
del /F /Q "%SCRIPTDIR%\yasm.exe" >nul 2>&1
316+
del /F /Q "%SCRIPTDIR%\yasm*.exe" >nul 2>&1
317317
goto Terminate
318318
)
319-
del /F /Q "%SCRIPTDIR%\yasm.exe" >nul 2>&1
319+
del /F /Q "%SCRIPTDIR%\yasm*.exe" >nul 2>&1
320320
echo Finished Successfully
321321
goto Exit
322322

0 commit comments

Comments
 (0)