forked from nogginware/mstscdump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
37 lines (28 loc) · 1.26 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
36
37
@SETLOCAL
@if "%VCINSTALLDIR%" == "" set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
@set USE_DETOURS=0
@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%\vcvarsall.bat" x86
@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
@copy test.exe 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%\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
@copy test.exe bin\x64 || goto ERROR_EXIT
@if "%USE_DETOURS%" == "1" copy detours21\x64\detoured.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%