forked from SublimeText/NSIS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnsis_build.cmd
35 lines (28 loc) · 922 Bytes
/
nsis_build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
set nsis_compiler=
if defined NSIS_HOME (
if exist "%NSIS_HOME%\makensis.exe" (
set "nsis_compiler=%NSIS_HOME%"
)
)
if %PROCESSOR_ARCHITECTURE%==x86 (
set RegQry=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NSIS
) else (
set RegQry=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NSIS
)
if not defined nsis_compiler (
for /F "tokens=2*" %%a in ('reg query "%RegQry%" /v InstallLocation ^|findstr InstallLocation') do set nsis_compiler=%%b
)
if not defined nsis_compiler (
for %%X in (makensis.exe) do (set nsis_compiler=%%~dp$PATH:X)
)
set args=
:loop
set args=%args% %1
shift
if not "%~1"=="" goto loop
if defined nsis_compiler (
"%nsis_compiler%\makensis.exe" %args%
) else (
echo "Error, build system cannot find NSIS! Please reinstall it, add makensis.exe to your PATH, or defined the NSIS_HOME environment variable."
)