iss: Better err handling in build scripts.

Now checking for errors in every step of the build
phase
This commit is contained in:
Felipe \\\"Zimmerle\\\" Costa
2013-11-06 08:49:25 -06:00
committed by Felipe Zimmerle
parent e25c6b2e85
commit 192599bf63
6 changed files with 39 additions and 2 deletions

View File

@@ -11,9 +11,12 @@ mklink /D "lua" "%LUA_DIR%"
cd "%LUA_DIR%\src"
CL /Ox /arch:SSE2 /GF /GL /Gy /FD /EHsc /MD /Zi /TC /wd4005 /D "_MBCS" /D "LUA_CORE" /D "LUA_BUILD_AS_DLL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_WIN32" /D "_WINDLL" /c *.c
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
DEL lua.obj luac.obj
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
IF EXIST lua5.1.dll.manifest MT -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
cd "%WORK_DIR%"
@@ -27,6 +30,10 @@ copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.lib" "%OUTPUT_DIR%"
@echo File not found: "%SOURCE_DIR%\%LUA%"
@goto failed
:build_failed
@echo Problems during the building phase
@goto failed
:failed
@exit /B 1