forked from maojun1998/NTOSBE
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuildlocaltoolsshell.cmd
57 lines (43 loc) · 1.19 KB
/
buildlocaltoolsshell.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
REM ///////////////////////////////////////////////////////////////////////////
REM buildlocaltoolsshell.cmd
REM ///////////////////////////////////////////////////////////////////////////
pushd %~dp0
setlocal
REM //
REM // Verify that the script is not running under the sizzle environment.
REM //
if not [%NTROOT%] equ [] (
echo You cannot run this script under the sizzle environment.
echo Please run this script directly from the NT command line.
goto End
)
REM //
REM // Identify the host processor architecture.
REM //
if not [%1] equ [] (
set HostProcArch=%1
) else if [%PROCESSOR_ARCHITECTURE%] equ [x86] (
set HostProcArch=x86
) else if [%PROCESSOR_ARCHITECTURE%] equ [AMD64] (
set HostProcArch=amd64
) else (
echo Host processor architecture %PROCESSOR_ARCHITECTURE% is not supported by buildlocaltools.cmd.
goto Error
)
REM //
REM // Initialise the sizzle environment.
REM //
echo == Initialising the sizzle environment for building NTOSBE tools ... ==
set _NT_TARGET_VERSION=0x0502
call ntenv.cmd NTOSBE %~dp0src %~dp0src.bin %HostProcArch% chk
REM //
REM // Invoke NT shell.
REM //
cmd
REM //
REM // Restore environment.
REM //
endlocal
popd
exit /b 0