2005-05-28 00:45:31 +02:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
|
2005-06-27 15:54:02 +02:00
|
|
|
::Set up the compiler environment
|
2006-09-12 07:55:56 +02:00
|
|
|
if DEFINED VS80COMNTOOLS (
|
|
|
|
@devenv /? >nul 2>nul
|
2006-11-09 10:25:33 +01:00
|
|
|
@if errorlevel 9009 (call "%VS80COMNTOOLS%vsvars32.bat") else ( echo The file: & echo "%VS80COMNTOOLS%vsvars32.bat" & echo has already been executed.)
|
2006-09-12 07:55:56 +02:00
|
|
|
) else (
|
2005-06-27 15:54:02 +02:00
|
|
|
if DEFINED VS71COMNTOOLS (
|
|
|
|
@devenv /? >nul 2>nul
|
2006-11-09 10:25:33 +01:00
|
|
|
@if errorlevel 9009 (call "%VS71COMNTOOLS%vsvars32.bat") else ( echo The file: & echo "%VS71COMNTOOLS%vsvars32.bat" & echo has already been executed.)
|
2005-06-27 15:54:02 +02:00
|
|
|
) else (
|
|
|
|
@msdev /? >nul 2>nul
|
|
|
|
@if errorlevel 9009 (call "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat") else (echo MSVC6 vcvars.bat has already been executed.)
|
|
|
|
)
|
2006-09-12 07:55:56 +02:00
|
|
|
)
|
2005-06-27 15:54:02 +02:00
|
|
|
@echo.
|
|
|
|
|
|
|
|
:: Set env vars
|
|
|
|
@call setenvvar.bat
|
|
|
|
|
|
|
|
::===========
|
|
|
|
:: Read input values
|
|
|
|
@set DBG=
|
|
|
|
@set DBG_DIR=release
|
|
|
|
@set CLEAN=/build
|
|
|
|
@if "%1"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
|
|
|
|
@if "%2"=="DEBUG" ((set DBG=TRUE) && (set DBG_DIR=debug))
|
|
|
|
@if "%1"=="CLEAN" (set CLEAN=/rebuild)
|
|
|
|
@if "%2"=="CLEAN" (set CLEAN=/rebuild)
|
|
|
|
|
|
|
|
::==========
|
|
|
|
:: MAIN
|
|
|
|
|
|
|
|
@if "%DBG%"=="" (
|
|
|
|
call :RELEASE
|
|
|
|
) else (
|
|
|
|
call :DEBUG
|
|
|
|
)
|
2006-10-30 16:14:45 +01:00
|
|
|
@goto :EOF
|
2005-06-27 15:54:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
::===========
|
|
|
|
:RELEASE
|
|
|
|
@echo Building release...
|
2005-05-28 00:45:31 +02:00
|
|
|
if "%VS_VER%"=="msvc6" (
|
2005-06-23 00:47:54 +02:00
|
|
|
@msdev %ROOT_PATH%\extern\icu\source\allinone\allinone.dsw /MAKE "all - Win32 Release" %CLEAN% /OUT make_icu.log
|
2005-05-28 00:45:31 +02:00
|
|
|
) else (
|
2006-09-12 07:55:56 +02:00
|
|
|
if "%VS_VER%"=="msvc7" (
|
2005-06-23 00:47:54 +02:00
|
|
|
@devenv %ROOT_PATH%\extern\icu\source\allinone\allinone.sln %CLEAN% release /OUT make_icu.log
|
2006-09-12 07:55:56 +02:00
|
|
|
) else (
|
2006-10-31 11:12:02 +01:00
|
|
|
@devenv %ROOT_PATH%\extern\icu\source\allinone\allinone_8.sln %CLEAN% "release|%PLATFORM%" /OUT make_icu.log
|
2006-09-12 07:55:56 +02:00
|
|
|
)
|
2005-05-28 00:45:31 +02:00
|
|
|
)
|
2005-06-27 15:54:02 +02:00
|
|
|
if errorlevel 1 call :ERROR Release build failed
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
|
|
|
|
::===========
|
|
|
|
:DEBUG
|
|
|
|
@echo Building debug...
|
|
|
|
if "%VS_VER%"=="msvc6" (
|
|
|
|
@msdev %ROOT_PATH%\extern\icu\source\allinone\allinone.dsw /MAKE "all - Win32 Debug" %CLEAN% /OUT make_icu.log
|
|
|
|
) else (
|
2006-09-12 07:55:56 +02:00
|
|
|
if "%VS_VER%"=="msvc7" (
|
2006-05-16 21:17:54 +02:00
|
|
|
@devenv %ROOT_PATH%\extern\icu\source\allinone\allinone.sln %CLEAN% debug /OUT make_icu.log
|
2006-09-12 07:55:56 +02:00
|
|
|
) else (
|
2006-10-31 11:12:02 +01:00
|
|
|
@devenv %ROOT_PATH%\extern\icu\source\allinone\allinone_8.sln %CLEAN% "debug|%PLATFORM%" /OUT make_icu.log
|
2006-09-12 07:55:56 +02:00
|
|
|
)
|
2005-06-27 15:54:02 +02:00
|
|
|
)
|
|
|
|
if errorlevel 1 call :ERROR Debug build failed
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:ERROR
|
|
|
|
::====
|
|
|
|
@echo.
|
|
|
|
@echo An error occurred while running make_icu.bat -
|
|
|
|
@echo %*
|
|
|
|
@echo.
|
|
|
|
set ERRLEV=1
|
|
|
|
cancel_script > nul 2>&1
|
|
|
|
::End of ERROR
|
|
|
|
::------------
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|