新增中性版本
This commit is contained in:
parent
06c45b5aab
commit
ecd94407da
|
@ -9,6 +9,7 @@ set BUILD_LSC=false
|
||||||
set BUILD_CTS=false
|
set BUILD_CTS=false
|
||||||
set BUILD_ZJ=false
|
set BUILD_ZJ=false
|
||||||
set BUILD_ZG=false
|
set BUILD_ZG=false
|
||||||
|
set BUILD_HGNEU=false
|
||||||
|
|
||||||
set BUILD_X86=true
|
set BUILD_X86=true
|
||||||
set BUILD_X64=true
|
set BUILD_X64=true
|
||||||
|
@ -24,6 +25,8 @@ if "%OEM%"=="hw" (
|
||||||
set BUILD_ZJ=true
|
set BUILD_ZJ=true
|
||||||
)else if "%OEM%" == "zg" (
|
)else if "%OEM%" == "zg" (
|
||||||
set BUILD_ZG=true
|
set BUILD_ZG=true
|
||||||
|
)else if "%OEM%" == "hgneu" (
|
||||||
|
set BUILD_HGNEU=true
|
||||||
)else if "%OEM%" == "all" (
|
)else if "%OEM%" == "all" (
|
||||||
set BUILD_HG=true
|
set BUILD_HG=true
|
||||||
set BUILD_HW=true
|
set BUILD_HW=true
|
||||||
|
@ -31,6 +34,7 @@ if "%OEM%"=="hw" (
|
||||||
set BUILD_CTS=true
|
set BUILD_CTS=true
|
||||||
set BUILD_ZJ=true
|
set BUILD_ZJ=true
|
||||||
set BUILD_ZG=true
|
set BUILD_ZG=true
|
||||||
|
set BUILD_HGNEU=true
|
||||||
)else (
|
)else (
|
||||||
set BUILD_HG=true
|
set BUILD_HG=true
|
||||||
set OEM=hg
|
set OEM=hg
|
||||||
|
@ -98,6 +102,12 @@ if "%BUILD_HG%"=="true" (
|
||||||
if %ERRORLEVEL% neq 0 goto end
|
if %ERRORLEVEL% neq 0 goto end
|
||||||
if "%BUILD_X64%"=="true" call :compile_hg hg x64
|
if "%BUILD_X64%"=="true" call :compile_hg hg x64
|
||||||
)
|
)
|
||||||
|
if "%BUILD_HGNEU%"=="true" (
|
||||||
|
if "%BUILD_X86%"=="true" call :compile_hgneu hgneu x86
|
||||||
|
if %ERRORLEVEL% neq 0 goto end
|
||||||
|
if "%BUILD_X64%"=="true" call :compile_hgneu hgneu x64
|
||||||
|
if %ERRORLEVEL% neq 0 goto end
|
||||||
|
)
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,6 +127,19 @@ REM parameters for all OEM compiling procedure are: oem cpu
|
||||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||||
EXIT /B 0
|
EXIT /B 0
|
||||||
|
|
||||||
|
:compile_hgneu
|
||||||
|
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
|
:compile_hw
|
||||||
call build_base.bat %1 %2
|
call build_base.bat %1 %2
|
||||||
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
if %ERRORLEVEL% neq 0 EXIT /B %ERRORLEVEL%
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
@echo off
|
@echo off
|
||||||
echo "Parameter 1:hg | lsc| hw | zj | cts"
|
echo "Parameter 1:hg | lsc| hw | zj | cts | hgneu"
|
||||||
echo "Parameter 2:x86 | x64 "
|
echo "Parameter 2:x86 | x64 "
|
||||||
|
|
||||||
set OEM=%1
|
set OEM=%1
|
||||||
|
@ -42,6 +42,11 @@ if "%OEM%" equ "cts" (
|
||||||
set CL=/DOEM_CANGTIAN /DBACKEND_NAME=ctssane
|
set CL=/DOEM_CANGTIAN /DBACKEND_NAME=ctssane
|
||||||
goto oem
|
goto oem
|
||||||
)
|
)
|
||||||
|
if "%OEM%" equ "hgneu" (
|
||||||
|
set OEM_DIR=huagaoneu
|
||||||
|
set CL=/DOEM_HUAGAO_NEU /DBACKEND_NAME=hgsane
|
||||||
|
goto oem
|
||||||
|
)
|
||||||
echo "Parameter 1:oem is fail"
|
echo "Parameter 1:oem is fail"
|
||||||
exit 1
|
exit 1
|
||||||
:oem
|
:oem
|
||||||
|
|
|
@ -50,6 +50,12 @@ if "%OEM%" equ "cts" (
|
||||||
set NAME=cumtenn%NAME%
|
set NAME=cumtenn%NAME%
|
||||||
goto oem
|
goto oem
|
||||||
)
|
)
|
||||||
|
if "%OEM%" equ "hgneu" (
|
||||||
|
set OEM_DIR=huagaoneu
|
||||||
|
set CL=/DOEM_HUAGAO_NEU /DPRODUCT_ID=%PID%
|
||||||
|
set NAME=%NAME%
|
||||||
|
goto oem
|
||||||
|
)
|
||||||
echo "Parameter 1:oem is fail"
|
echo "Parameter 1:oem is fail"
|
||||||
exit 1
|
exit 1
|
||||||
:oem
|
:oem
|
||||||
|
|
|
@ -347,8 +347,9 @@ namespace callback
|
||||||
std::string root(hg_sane_middleware::sane_path());
|
std::string root(hg_sane_middleware::sane_path());
|
||||||
HMODULE mod = NULL;
|
HMODULE mod = NULL;
|
||||||
|
|
||||||
root += "twainui.dll";
|
root += "HGTwainUI.dll";
|
||||||
mod = LoadLibraryA(root.c_str());
|
|
||||||
|
mod = LoadLibraryExA(root.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||||
if (!mod)
|
if (!mod)
|
||||||
{
|
{
|
||||||
std::wstring info(L"Load '" + local_trans::a2u(root.c_str(), CP_UTF8));
|
std::wstring info(L"Load '" + local_trans::a2u(root.c_str(), CP_UTF8));
|
||||||
|
|
Binary file not shown.
|
@ -17,7 +17,8 @@ enum oem
|
||||||
OEM_LISICHENG,
|
OEM_LISICHENG,
|
||||||
OEM_CANGTIAN,
|
OEM_CANGTIAN,
|
||||||
OEM_ZHONGJING,
|
OEM_ZHONGJING,
|
||||||
OEM_ZIGUANG
|
OEM_ZIGUANG,
|
||||||
|
OEM_HUAGAO_NEU
|
||||||
};
|
};
|
||||||
#define GET_ENUM_NAME_W(e, v) \
|
#define GET_ENUM_NAME_W(e, v) \
|
||||||
if(e == v) return L###e;
|
if(e == v) return L###e;
|
||||||
|
@ -99,6 +100,9 @@ int main()
|
||||||
vendor = OEM_ZHONGJING;
|
vendor = OEM_ZHONGJING;
|
||||||
else if (wcsicmp(cmd->parameter(L"-oem"), L"zg") == 0)
|
else if (wcsicmp(cmd->parameter(L"-oem"), L"zg") == 0)
|
||||||
vendor = OEM_ZIGUANG;
|
vendor = OEM_ZIGUANG;
|
||||||
|
else if (wcsicmp(cmd->parameter(L"-oem"), L"hgneu") == 0)
|
||||||
|
vendor = OEM_HUAGAO_NEU;
|
||||||
|
|
||||||
else
|
else
|
||||||
std::wcout << L" OEM '" << cmd->parameter(L"-oem") << L"' is not supported! set as OEM_NONE.\r\n";
|
std::wcout << L" OEM '" << cmd->parameter(L"-oem") << L"' is not supported! set as OEM_NONE.\r\n";
|
||||||
}
|
}
|
||||||
|
@ -148,6 +152,7 @@ static std::wstring oem_str(oem o)
|
||||||
GET_ENUM_NAME_W(OEM_CANGTIAN, o);
|
GET_ENUM_NAME_W(OEM_CANGTIAN, o);
|
||||||
GET_ENUM_NAME_W(OEM_ZHONGJING, o);
|
GET_ENUM_NAME_W(OEM_ZHONGJING, o);
|
||||||
GET_ENUM_NAME_W(OEM_ZIGUANG, o);
|
GET_ENUM_NAME_W(OEM_ZIGUANG, o);
|
||||||
|
GET_ENUM_NAME_W(OEM_HUAGAO_NEU, o);
|
||||||
}
|
}
|
||||||
static oem from_str(const wchar_t* str)
|
static oem from_str(const wchar_t* str)
|
||||||
{
|
{
|
||||||
|
@ -158,6 +163,7 @@ static oem from_str(const wchar_t* str)
|
||||||
GET_ENUM_VALUE_W(OEM_CANGTIAN, s);
|
GET_ENUM_VALUE_W(OEM_CANGTIAN, s);
|
||||||
GET_ENUM_VALUE_W(OEM_ZHONGJING, s);
|
GET_ENUM_VALUE_W(OEM_ZHONGJING, s);
|
||||||
GET_ENUM_VALUE_W(OEM_ZIGUANG, s);
|
GET_ENUM_VALUE_W(OEM_ZIGUANG, s);
|
||||||
|
GET_ENUM_VALUE_W(OEM_HUAGAO_NEU, s);
|
||||||
return OEM_NOT;
|
return OEM_NOT;
|
||||||
}
|
}
|
||||||
static int oem_code(oem o)
|
static int oem_code(oem o)
|
||||||
|
@ -756,6 +762,8 @@ namespace rc
|
||||||
os = L"microtek";
|
os = L"microtek";
|
||||||
else if (o == OEM_ZIGUANG)
|
else if (o == OEM_ZIGUANG)
|
||||||
os = L"unis";
|
os = L"unis";
|
||||||
|
else if (o == OEM_HUAGAO_NEU)
|
||||||
|
os = L"huagaoneu";
|
||||||
while (len > bgn)
|
while (len > bgn)
|
||||||
{
|
{
|
||||||
bgn += first.length();
|
bgn += first.length();
|
||||||
|
@ -787,6 +795,8 @@ namespace rc
|
||||||
os = L"microtek";
|
os = L"microtek";
|
||||||
else if (o == OEM_ZIGUANG)
|
else if (o == OEM_ZIGUANG)
|
||||||
os = L"unis";
|
os = L"unis";
|
||||||
|
else if (o == OEM_HUAGAO_NEU)
|
||||||
|
os = L"huagaoneu";
|
||||||
while (len > bgn)
|
while (len > bgn)
|
||||||
{
|
{
|
||||||
bgn += first.length();
|
bgn += first.length();
|
||||||
|
@ -1135,6 +1145,8 @@ namespace rc
|
||||||
target += L"microtek\\";
|
target += L"microtek\\";
|
||||||
else if (o == OEM_ZIGUANG)
|
else if (o == OEM_ZIGUANG)
|
||||||
target += L"unis\\";
|
target += L"unis\\";
|
||||||
|
else if (o == OEM_HUAGAO_NEU)
|
||||||
|
target += L"huagaoneu\\";
|
||||||
else
|
else
|
||||||
target += L"huagao\\";
|
target += L"huagao\\";
|
||||||
|
|
||||||
|
@ -1170,6 +1182,8 @@ namespace rc
|
||||||
target = L"microtek";
|
target = L"microtek";
|
||||||
else if (param->o == OEM_ZIGUANG)
|
else if (param->o == OEM_ZIGUANG)
|
||||||
target = L"unis";
|
target = L"unis";
|
||||||
|
else if (param->o == OEM_HUAGAO_NEU)
|
||||||
|
target = L"huagaoneu";
|
||||||
target += tail;
|
target += tail;
|
||||||
|
|
||||||
while ((bgn = cont.find(first, bgn)) != std::wstring::npos)
|
while ((bgn = cont.find(first, bgn)) != std::wstring::npos)
|
||||||
|
|
Loading…
Reference in New Issue