0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-22 07:37:56 +01:00
nodejs/tools/msvs/find_nasm.cmd
Richard Lau 322abb4e05 build, tools: look for local installation of NASM
Search the default installation path for NASM installed by a user
without administrator privileges when not found on the Path or in
the default system-wide installation path.

PR-URL: https://github.com/nodejs/node/pull/36014
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2020-11-10 12:26:46 +00:00

25 lines
449 B
Batchfile

@IF NOT DEFINED DEBUG_HELPER @ECHO OFF
ECHO Looking for NASM
FOR /F "delims=" %%a IN ('where nasm 2^> NUL') DO (
EXIT /B 0
)
IF EXIST "%ProgramFiles%\NASM\nasm.exe" (
SET "Path=%Path%;%ProgramFiles%\NASM"
EXIT /B 0
)
IF EXIST "%ProgramFiles(x86)%\NASM\nasm.exe" (
SET "Path=%Path%;%ProgramFiles(x86)%\NASM"
EXIT /B 0
)
if EXIST "%LOCALAPPDATA%\bin\NASM\nasm.exe" (
SET "Path=%Path%;%LOCALAPPDATA%\bin\NASM"
EXIT /B 0
)
EXIT /B 1