OSDN Git Service

Updated build scripts to use CEcho program.
[lamexp/LameXP.git] / etc / Deployment / _build.bat
index 52bc197..f9f587d 100644 (file)
@@ -1,19 +1,45 @@
 @echo off
-set "LAMEXP_ERROR=1"
+
+echo.
 echo ----------------------------------------------------------------
 echo Solution File: %1
-echo Configuration: %~n2
+echo Configuration: %~2
 echo ----------------------------------------------------------------
-call _paths.bat
-call "%PATH_MSVC90%\VC\bin\vcvars32.bat"
-call "%PATH_QTMSVC%\bin\qtvars.bat"
-REM -----------------------------------------------------------------
-msbuild.exe /property:Configuration=%~n2 /target:Clean /verbosity:d %1
-if exist "%~d1%~p1bin\%~n2\*.exe" GOTO:EOF
-if exist "%~d1%~p1obj\%~n2\*.obj" GOTO:EOF
-echo ----------------------------------------------------------------
-msbuild.exe /property:Configuration=%~n2 /target:Rebuild /verbosity:d %1
-echo ----------------------------------------------------------------
-if not exist "%~d1%~p1bin\%~n2\%~n1.exe" GOTO:EOF
-REM -----------------------------------------------------------------
-set "LAMEXP_ERROR=0"
+echo.
+
+:: ---------------------------------------------------------------------------
+:: SETUP PATHS
+:: ---------------------------------------------------------------------------
+
+call "%~dp0\_paths.bat"
+call "%PATH_MSCDIR%\VC\bin\vcvars32.bat" x86
+
+if exist "%PATH_QTMSVC%\bin\qtenv2.bat" (
+       call "%PATH_QTMSVC%\bin\qtenv2.bat"
+)
+
+if exist "%PATH_QTMSVC%\bin\qtvars.bat" (
+       call "%PATH_QTMSVC%\bin\qtvars.bat"
+)
+
+:: ---------------------------------------------------------------------------
+:: BUILD THE PROJECT
+:: ---------------------------------------------------------------------------
+
+msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Clean   /verbosity:normal "%~1"
+if not "%ERRORLEVEL%"=="0" (
+       "%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n"
+       pause && exit
+)
+
+msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Rebuild /verbosity:normal "%~1"
+if not "%ERRORLEVEL%"=="0" (
+       "%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n"
+       pause && exit
+)
+
+msbuild.exe /property:Configuration=%3 /property:Platform=%2 /target:Build   /verbosity:normal "%~1"
+if not "%ERRORLEVEL%"=="0" (
+       "%~dp0\..\Utilities\CEcho.exe" red "\nBuild process has failed!\n"
+       pause && exit
+)