2023-02-02 09:56:32 +00:00
REM build_all.bat all|hg|hw|lsc|cts... x86|x64
2022-07-15 10:19:47 +00:00
echo off
2023-02-02 09:56:32 +00:00
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
2023-03-10 09:39:05 +00:00
set BUILD_ZG = false
2023-02-02 09:56:32 +00:00
set BUILD_X86 = true
set BUILD_X64 = true
2022-08-05 09:34:18 +00:00
2022-07-27 09:05:46 +00:00
if " %OEM% " == " hw " (
2023-02-02 09:56:32 +00:00
set BUILD_HW = true
2022-07-27 09:05:46 +00:00
) else if "%OEM%" == "lsc" (
2023-02-02 09:56:32 +00:00
set BUILD_LSC = true
2022-11-09 07:39:39 +00:00
) else if "%OEM%" == "cts" (
2023-02-02 09:56:32 +00:00
set BUILD_CTS = true
) else if "%OEM%" == "zj" (
set BUILD_ZJ = true
2023-03-10 09:39:05 +00:00
)else if " %OEM% " == " zg " (
set BUILD_ZG = true
)else if " %OEM% " == " all " (
2023-02-02 09:56:32 +00:00
set BUILD_HG = true
set BUILD_HW = true
set BUILD_LSC = true
set BUILD_CTS = true
set BUILD_ZJ = true
2022-11-09 07:39:39 +00:00
)else (
2023-02-02 09:56:32 +00:00
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%
2023-02-03 02:57:23 +00:00
if %dev% NEQ " " (
call %dev% \..\..\..\vc\auxiliary\build\vcvars64.bat
2023-02-02 09:56:32 +00:00
)
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
2022-07-15 10:19:47 +00:00
)
2023-02-02 09:56:32 +00:00
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
)
2023-03-10 09:39:05 +00:00
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
)
2023-02-02 09:56:32 +00:00
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
)
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_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
2023-03-10 09:39:05 +00:00
: 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
2023-02-02 09:56:32 +00:00
: end
echo final result = %ERRORLEVEL%