change build bat script for oem unis and hgsetver tool code
This commit is contained in:
parent
4d09295584
commit
4b9694e8e8
|
@ -8,6 +8,7 @@ set BUILD_HW=false
|
|||
set BUILD_LSC=false
|
||||
set BUILD_CTS=false
|
||||
set BUILD_ZJ=false
|
||||
set BUILD_ZG=false
|
||||
|
||||
set BUILD_X86=true
|
||||
set BUILD_X64=true
|
||||
|
@ -21,7 +22,9 @@ if "%OEM%"=="hw" (
|
|||
set BUILD_CTS=true
|
||||
) else if "%OEM%" == "zj" (
|
||||
set BUILD_ZJ=true
|
||||
) else if "%OEM%" == "all" (
|
||||
)else if "%OEM%" == "zg" (
|
||||
set BUILD_ZG=true
|
||||
)else if "%OEM%" == "all" (
|
||||
set BUILD_HG=true
|
||||
set BUILD_HW=true
|
||||
set BUILD_LSC=true
|
||||
|
@ -83,6 +86,12 @@ if "%BUILD_ZJ%"=="true" (
|
|||
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
|
||||
|
@ -160,6 +169,15 @@ EXIT /B 0
|
|||
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
|
||||
|
||||
|
||||
:end
|
||||
echo final result = %ERRORLEVEL%
|
||||
|
|
|
@ -32,6 +32,11 @@ if "%OEM%" equ "zj" (
|
|||
set CL=/DOEM_ZHONGJING /DBACKEND_NAME=zjsane
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "zg" (
|
||||
set OEM_DIR=unis
|
||||
set CL=/DOEM_ZIGUANG /DBACKEND_NAME=unissane
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "cts" (
|
||||
set OEM_DIR=cumtenn
|
||||
set CL=/DOEM_CANGTIAN /DBACKEND_NAME=ctssane
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@echo off
|
||||
echo "Parameter 1:hg | lsc| hw | zj | cts"
|
||||
echo "Parameter 1:hg | lsc| hw | zj | cts | zg"
|
||||
echo "Parameter 2:x86 | x64 "
|
||||
echo "Parameter 3: 100 | 200 ... "
|
||||
|
||||
|
@ -38,6 +38,12 @@ if "%OEM%" equ "zj" (
|
|||
set NAME=microtek%NAME%
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "zg" (
|
||||
set OEM_DIR=unis
|
||||
set CL=/DOEM_ZIGUANG /DPRODUCT_ID=%PID%
|
||||
set NAME=unis%NAME%
|
||||
goto oem
|
||||
)
|
||||
if "%OEM%" equ "cts" (
|
||||
set OEM_DIR=cumtenn
|
||||
set CL=/DOEM_CANGTIAN /DPRODUCT_ID=%PID%
|
||||
|
|
Binary file not shown.
|
@ -17,6 +17,7 @@ enum oem
|
|||
OEM_LISICHENG,
|
||||
OEM_CANGTIAN,
|
||||
OEM_ZHONGJING,
|
||||
OEM_ZIGUANG
|
||||
};
|
||||
#define GET_ENUM_NAME_W(e, v) \
|
||||
if(e == v) return L###e;
|
||||
|
@ -96,6 +97,8 @@ int main()
|
|||
vendor = OEM_CANGTIAN;
|
||||
else if (wcsicmp(cmd->parameter(L"-oem"), L"zj") == 0)
|
||||
vendor = OEM_ZHONGJING;
|
||||
else if (wcsicmp(cmd->parameter(L"-oem"), L"zg") == 0)
|
||||
vendor = OEM_ZIGUANG;
|
||||
else
|
||||
std::wcout << L" OEM '" << cmd->parameter(L"-oem") << L"' is not supported! set as OEM_NONE.\r\n";
|
||||
}
|
||||
|
@ -144,6 +147,7 @@ static std::wstring oem_str(oem o)
|
|||
GET_ENUM_NAME_W(OEM_LISICHENG, o);
|
||||
GET_ENUM_NAME_W(OEM_CANGTIAN, o);
|
||||
GET_ENUM_NAME_W(OEM_ZHONGJING, o);
|
||||
GET_ENUM_NAME_W(OEM_ZIGUANG, o);
|
||||
}
|
||||
static oem from_str(const wchar_t* str)
|
||||
{
|
||||
|
@ -153,6 +157,7 @@ static oem from_str(const wchar_t* str)
|
|||
GET_ENUM_VALUE_W(OEM_LISICHENG, s);
|
||||
GET_ENUM_VALUE_W(OEM_CANGTIAN, s);
|
||||
GET_ENUM_VALUE_W(OEM_ZHONGJING, s);
|
||||
GET_ENUM_VALUE_W(OEM_ZIGUANG, s);
|
||||
return OEM_NOT;
|
||||
}
|
||||
static int oem_code(oem o)
|
||||
|
@ -165,6 +170,8 @@ static int oem_code(oem o)
|
|||
return 18;
|
||||
else if (o == OEM_ZHONGJING)
|
||||
return 20;
|
||||
else if (o == OEM_ZIGUANG)
|
||||
return 17;
|
||||
else
|
||||
return 10;
|
||||
}
|
||||
|
@ -178,6 +185,8 @@ static oem oem_from_code(int code)
|
|||
return OEM_CANGTIAN;
|
||||
else if (code == 20)
|
||||
return OEM_ZHONGJING;
|
||||
else if (code == 17)
|
||||
return OEM_ZIGUANG;
|
||||
else
|
||||
return OEM_NONE;
|
||||
}
|
||||
|
@ -745,6 +754,8 @@ namespace rc
|
|||
os = L"cumtenn";
|
||||
else if (o == OEM_ZHONGJING)
|
||||
os = L"microtek";
|
||||
else if (o == OEM_ZIGUANG)
|
||||
os = L"unis";
|
||||
while (len > bgn)
|
||||
{
|
||||
bgn += first.length();
|
||||
|
@ -774,6 +785,8 @@ namespace rc
|
|||
os = L"cumtenn";
|
||||
else if (o == OEM_ZHONGJING)
|
||||
os = L"microtek";
|
||||
else if (o == OEM_ZIGUANG)
|
||||
os = L"unis";
|
||||
while (len > bgn)
|
||||
{
|
||||
bgn += first.length();
|
||||
|
@ -944,6 +957,8 @@ namespace rc
|
|||
backend = L"cts";
|
||||
else if (o == OEM_ZHONGJING)
|
||||
backend = L"zj";
|
||||
else if (o == OEM_ZIGUANG)
|
||||
backend = L"unis";
|
||||
else
|
||||
backend = L"hg";
|
||||
backend += L"sane";
|
||||
|
@ -1007,6 +1022,8 @@ namespace rc
|
|||
backend.insert(0, L"_cts");
|
||||
else if (o == OEM_ZHONGJING)
|
||||
backend.insert(0, L"_zj");
|
||||
else if (o == OEM_ZIGUANG)
|
||||
backend.insert(0, L"_unis");
|
||||
else
|
||||
backend.insert(0, L"_hg");
|
||||
|
||||
|
@ -1026,7 +1043,13 @@ namespace rc
|
|||
{
|
||||
prev = L"_zjsane_";
|
||||
if (cont.find(prev) == std::wstring::npos)
|
||||
return false;
|
||||
{
|
||||
prev = L"_unissane_";
|
||||
if (cont.find(prev) == std::wstring::npos)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1056,6 +1079,8 @@ namespace rc
|
|||
backend.insert(0, L"cts");
|
||||
else if (o == OEM_ZHONGJING)
|
||||
backend.insert(0, L"zj");
|
||||
else if (o == OEM_ZIGUANG)
|
||||
backend.insert(0, L"unis");
|
||||
else
|
||||
backend.insert(0, L"hg");
|
||||
|
||||
|
@ -1072,9 +1097,14 @@ namespace rc
|
|||
{
|
||||
prev = L"cts_scanner_";
|
||||
if (cont.find(prev) == std::wstring::npos)
|
||||
return false;
|
||||
{
|
||||
prev = L"unis_scanner_";
|
||||
if (cont.find(prev) == std::wstring::npos)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1103,6 +1133,8 @@ namespace rc
|
|||
target += L"cumtenn\\";
|
||||
else if (o == OEM_ZHONGJING)
|
||||
target += L"microtek\\";
|
||||
else if (o == OEM_ZIGUANG)
|
||||
target += L"unis\\";
|
||||
else
|
||||
target += L"huagao\\";
|
||||
|
||||
|
@ -1136,6 +1168,8 @@ namespace rc
|
|||
target = L"cumtenn";
|
||||
else if (param->o == OEM_ZHONGJING)
|
||||
target = L"microtek";
|
||||
else if (param->o == OEM_ZIGUANG)
|
||||
target = L"unis";
|
||||
target += tail;
|
||||
|
||||
while ((bgn = cont.find(first, bgn)) != std::wstring::npos)
|
||||
|
|
Loading…
Reference in New Issue