mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 07:37:56 +01:00
322abb4e05
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>
25 lines
449 B
Batchfile
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
|