REM build_all.bat all|hg|hw|lsc|cts... x86|x64 echo off set OEM=%1 set CPU=%2 set BUILD_HG=false set BUILD_HW=false set BUILD_LSC=false set BUILD_CTS=false set BUILD_ZJ=false set BUILD_ZG=false set BUILD_NEU=false set BUILD_DL=false set BUILD_X86=true set BUILD_X64=true if "%OEM%"=="hw" ( set BUILD_HW=true ) else if "%OEM%" == "lsc" ( set BUILD_LSC=true ) else if "%OEM%" == "cts" ( set BUILD_CTS=true ) else if "%OEM%" == "zj" ( set BUILD_ZJ=true )else if "%OEM%" == "zg" ( set BUILD_ZG=true )else if "%OEM%" == "neu" ( set BUILD_NEU=true )else if "%OEM%" == "dl" ( set BUILD_DL=true )else if "%OEM%" == "all" ( set BUILD_HG=true set BUILD_HW=true set BUILD_LSC=true set BUILD_CTS=true set BUILD_ZJ=true set BUILD_ZG=true set BUILD_NEU=true set BUILD_DL=true )else ( set BUILD_HG=true set OEM=hg ) if "%CPU%"=="x86" ( set BUILD_X64=false ) else if "%CPU%"=="x64" ( set BUILD_X86=false ) else ( set CPU=x64 and x86 ) echo build OEM:%OEM%, ARCH:%CPU% rem ----------------------------------------------------------------------------------------------------------------------------------- if "%VSCMD_VER%" neq "" goto compile set dev="" for /f "tokens=1,2,* " %%i in ('reg QUERY "HKEY_CLASSES_ROOT\CLSID\{2E1517DA-87BF-4443-984A-D2BF18F5A908}\LocalServer32" /ve') do set dev=%%k echo dev=%dev% if %dev% NEQ "" ( call %dev%\..\..\..\vc\auxiliary\build\vcvars64.bat ) rem ------------------------------------------------------------------------------------------------------------------------------------------------------ :compile if "%BUILD_HW%"=="true" ( if "%BUILD_X86%"=="true" call :compile_hw hw x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_hw hw x64 if %ERRORLEVEL% neq 0 goto end ) if "%BUILD_LSC%"=="true" ( if "%BUILD_X86%"=="true" call :compile_lsc lsc x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_lsc lsc x64 if %ERRORLEVEL% neq 0 goto end ) if "%BUILD_CTS%"=="true" ( if "%BUILD_X86%"=="true" call :compile_ct cts x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_ct cts x64 if %ERRORLEVEL% neq 0 goto end ) if "%BUILD_ZJ%"=="true" ( if "%BUILD_X86%"=="true" call :compile_zj zj x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_zj zj x64 if %ERRORLEVEL% neq 0 goto end ) if "%BUILD_ZG%"=="true" ( if "%BUILD_X86%"=="true" call :compile_zg zg x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_zg zg x64 if %ERRORLEVEL% neq 0 goto end ) if "%BUILD_HG%"=="true" ( if "%BUILD_X86%"=="true" call :compile_hg hg x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_hg hg x64 ) if "%BUILD_NEU%"=="true" ( if "%BUILD_X86%"=="true" call :compile_neu neu x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_neu neu x64 if %ERRORLEVEL% neq 0 goto end ) if "%BUILD_DL%"=="true" ( if "%BUILD_X86%"=="true" call :compile_dl dl x86 if %ERRORLEVEL% neq 0 goto end if "%BUILD_X64%"=="true" call :compile_dl dl x64 if %ERRORLEVEL% neq 0 goto end ) goto end rem ------------------------------------------------------------------------------------------------------------------------------------------------------ REM parameters for all OEM compiling procedure are: oem cpu :compile_hg call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 100 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 200 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 300 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 400 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :compile_neu call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 100 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 200 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 300 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 400 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :compile_hw call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 1000 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 1002 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 7000 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 7002 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 7039 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 8000 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 9000 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :compile_lsc call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 8420 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 8520 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 8620 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 8730 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :compile_ct call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 138 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 238 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 6005 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 6006 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :compile_zj call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 9200 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :compile_zg call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 200 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 210 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :compile_dl call build_base.bat %1 %2 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 401C if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 4015 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% call build_ds.bat %1 %2 4019 if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL% EXIT /B 0 :end echo final result = %ERRORLEVEL%