新增沧田

This commit is contained in:
13038267101 2022-11-09 15:25:33 +08:00
parent e687b1dc93
commit 85a339c2d9
1 changed files with 25 additions and 1 deletions

View File

@ -15,6 +15,7 @@ enum oem
OEM_NONE = 0, OEM_NONE = 0,
OEM_HANWANG, OEM_HANWANG,
OEM_LISICHENG, OEM_LISICHENG,
OEM_CANGTIAN,
}; };
#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;
@ -90,6 +91,8 @@ int main()
vendor = OEM_HANWANG; vendor = OEM_HANWANG;
else if (wcsicmp(cmd->parameter(L"-oem"), L"lsc") == 0) else if (wcsicmp(cmd->parameter(L"-oem"), L"lsc") == 0)
vendor = OEM_LISICHENG; vendor = OEM_LISICHENG;
else if (wcsicmp(cmd->parameter(L"-oem"), L"ct") == 0)
vendor = OEM_CANGTIAN;
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";
} }
@ -136,6 +139,7 @@ static std::wstring oem_str(oem o)
GET_ENUM_NAME_W(OEM_NONE, o); GET_ENUM_NAME_W(OEM_NONE, o);
GET_ENUM_NAME_W(OEM_HANWANG, o); GET_ENUM_NAME_W(OEM_HANWANG, o);
GET_ENUM_NAME_W(OEM_LISICHENG, o); GET_ENUM_NAME_W(OEM_LISICHENG, o);
GET_ENUM_NAME_W(OEM_CANGTIAN, o);
} }
static oem from_str(const wchar_t* str) static oem from_str(const wchar_t* str)
{ {
@ -143,7 +147,7 @@ static oem from_str(const wchar_t* str)
GET_ENUM_VALUE_W(OEM_NONE, s); GET_ENUM_VALUE_W(OEM_NONE, s);
GET_ENUM_VALUE_W(OEM_HANWANG, s); GET_ENUM_VALUE_W(OEM_HANWANG, s);
GET_ENUM_VALUE_W(OEM_LISICHENG, s); GET_ENUM_VALUE_W(OEM_LISICHENG, s);
GET_ENUM_VALUE_W(OEM_CANGTIAN, s);
return OEM_NOT; return OEM_NOT;
} }
static int oem_code(oem o) static int oem_code(oem o)
@ -152,6 +156,8 @@ static int oem_code(oem o)
return 16; return 16;
else if (o == OEM_LISICHENG) else if (o == OEM_LISICHENG)
return 14; return 14;
else if (o == OEM_CANGTIAN)
return 18;
else else
return 10; return 10;
} }
@ -161,6 +167,8 @@ static oem oem_from_code(int code)
return OEM_HANWANG; return OEM_HANWANG;
else if (code == 14) else if (code == 14)
return OEM_LISICHENG; return OEM_LISICHENG;
else if (code == 18)
return OEM_CANGTIAN;
else else
return OEM_NONE; return OEM_NONE;
} }
@ -483,6 +491,8 @@ namespace rc
o = OEM_HANWANG; o = OEM_HANWANG;
else if (line.find(oem_str(OEM_LISICHENG)) != std::wstring::npos) else if (line.find(oem_str(OEM_LISICHENG)) != std::wstring::npos)
o = OEM_LISICHENG; o = OEM_LISICHENG;
else if (line.find(oem_str(OEM_CANGTIAN)) != std::wstring::npos)
o = OEM_CANGTIAN;
} }
bool found = false, is_oem = false; bool found = false, is_oem = false;
@ -718,6 +728,8 @@ namespace rc
os = L"hanvon"; os = L"hanvon";
else if (o == OEM_LISICHENG) else if (o == OEM_LISICHENG)
os = L"lanxum"; os = L"lanxum";
else if (o == OEM_CANGTIAN)
os = L"cts";
while (len > bgn) while (len > bgn)
{ {
@ -744,6 +756,8 @@ namespace rc
os = L"hanvon"; os = L"hanvon";
else if (o == OEM_LISICHENG) else if (o == OEM_LISICHENG)
os = L"lanxum"; os = L"lanxum";
else if (o == OEM_CANGTIAN)
os = L"cumtenn";
while (len > bgn) while (len > bgn)
{ {
@ -911,6 +925,8 @@ namespace rc
backend = L"hw"; backend = L"hw";
else if (o == OEM_LISICHENG) else if (o == OEM_LISICHENG)
backend = L"lsc"; backend = L"lsc";
else if (o == OEM_CANGTIAN)
backend = L"cts";
else else
backend = L"hg"; backend = L"hg";
backend += L"sane"; backend += L"sane";
@ -970,6 +986,8 @@ namespace rc
backend.insert(0, L"_hw"); backend.insert(0, L"_hw");
else if (o == OEM_LISICHENG) else if (o == OEM_LISICHENG)
backend.insert(0, L"_lsc"); backend.insert(0, L"_lsc");
else if (o == OEM_CANGTIAN)
backend.insert(0, L"_cts");
else else
backend.insert(0, L"_hg"); backend.insert(0, L"_hg");
@ -1006,6 +1024,8 @@ namespace rc
backend.insert(0, L"hw"); backend.insert(0, L"hw");
else if (o == OEM_LISICHENG) else if (o == OEM_LISICHENG)
backend.insert(0, L"lsc"); backend.insert(0, L"lsc");
else if (o == OEM_CANGTIAN)
backend.insert(0, L"cts");
else else
backend.insert(0, L"hg"); backend.insert(0, L"hg");
@ -1044,6 +1064,8 @@ namespace rc
target += L"hanvon\\"; target += L"hanvon\\";
else if (o == OEM_LISICHENG) else if (o == OEM_LISICHENG)
target += L"lanxum\\"; target += L"lanxum\\";
else if (o == OEM_CANGTIAN)
target += L"cumtenn\\";
else else
target += L"huagao\\"; target += L"huagao\\";
@ -1073,6 +1095,8 @@ namespace rc
target = L"hanvon"; target = L"hanvon";
else if (param->o == OEM_LISICHENG) else if (param->o == OEM_LISICHENG)
target = L"lanxum"; target = L"lanxum";
else if (param->o == OEM_CANGTIAN)
target = L"cumtenn";
target += tail; target += tail;
while ((bgn = cont.find(first, bgn)) != std::wstring::npos) while ((bgn = cont.find(first, bgn)) != std::wstring::npos)