-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.bat
35 lines (26 loc) · 1.14 KB
/
build.bat
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
@SETLOCAL
@if "%VCINSTALLDIR%" == "" set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC
@set USE_DETOURS=1
@if not exist bin mkdir bin
@if not exist bin\x86 mkdir bin\x86
@if not exist bin\x64 mkdir bin\x64
@del /q bin\x86\*.*
@del /q bin\x64\*.*
@echo !== Building MSTSCDUMP.EXE and MSTSCHOOK.DLL (32-bit)...
@call "%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" x86
@set
@nmake /nologo clean all -f Makefile CFG="Release32" USE_DETOURS=%USE_DETOURS% || goto ERROR_EXIT
@copy mstscdump.exe bin\x86 || goto ERROR_EXIT
@copy mstschook.dll bin\x86 || goto ERROR_EXIT
@nmake /nologo clean -f Makefile CFG="Release32" USE_DETOURS=%USE_DETOURS% || goto ERROR_EXIT
@SETLOCAL
@echo !== Building MSTSCDUMP.EXE and MSTSCHOOK.DLL (64-bit)...
@call "%VCINSTALLDIR%\Auxiliary\Build\vcvarsall.bat" x64
@nmake /nologo clean all -f Makefile CFG="Release64" USE_DETOURS=%USE_DETOURS% || goto ERROR_EXIT
@copy mstscdump.exe bin\x64 || goto ERROR_EXIT
@copy mstschook.dll bin\x64 || goto ERROR_EXIT
@nmake /nologo clean -f Makefile CFG="Release64" USE_DETOURS=%USE_DETOURS% || goto ERROR_EXIT
@ENDLOCAL
:ERROR_EXIT
@ENDLOCAL
exit /b %ERRORLEVEL%