|
|
@@ -61,10 +61,25 @@ std::pair<bool, std::string> CModTools::getMainUrl()
|
|
|
this->m_pEntity->GetFunction()->GetPath("Base", strChromiumPath);
|
|
|
strChromiumPath.Append(CSimpleStringA(SPLIT_SLASH_STR) + "bin" + SPLIT_SLASH_STR + "Chromium" + SPLIT_SLASH_STR);
|
|
|
|
|
|
+ //get major version
|
|
|
+ CSystemStaticInfo sysInfo;
|
|
|
+ m_pEntity->GetFunction()->GetSystemStaticInfo(sysInfo);
|
|
|
+ auto majorVersion = sysInfo.MachineVersion.GetMajor();
|
|
|
+
|
|
|
+
|
|
|
auto configRet = ReadCenterConfigStr();
|
|
|
CSimpleStringA strUrl;
|
|
|
bool isOpenExtend = false;
|
|
|
- if (std::get<1>(configRet).Compare(""))
|
|
|
+ if(majorVersion >= 5)
|
|
|
+ {
|
|
|
+ auto mainUrl = std::get<3>(configRet);
|
|
|
+ std::vector<std::string> urlArr;
|
|
|
+ urlArr.push_back(mainUrl.GetData());
|
|
|
+ DetectActiveHttp(urlArr);
|
|
|
+ strUrl = mainUrl;
|
|
|
+ isOpenExtend = false;
|
|
|
+ }
|
|
|
+ else if (std::get<1>(configRet).Compare(""))
|
|
|
{
|
|
|
auto mainUrl = std::get<1>(configRet);
|
|
|
auto exUrl = std::get<2>(configRet);
|
|
|
@@ -110,7 +125,8 @@ std::string CModTools::generateCefclientCmd(bool isExtend, std::string mainUrl)
|
|
|
CSimpleStringA cachePath;
|
|
|
this->m_pEntity->GetFunction()->GetPath("Temp", cachePath);
|
|
|
cachePath.Append(CSimpleStringA(SPLIT_SLASH_STR) + "cefCache");
|
|
|
- //strCmdLine.Append(" --hide-controls=true --cache-path=").Append(cachePath);
|
|
|
+ //strCmdLine.Append(" --hide-controls=true")
|
|
|
+ strCmdLine.Append(" --cache-path=").Append(cachePath);
|
|
|
strCmdLine.Append(" --no-sandbox");
|
|
|
DbgEx("cmdline : %s", strCmdLine.GetData());
|
|
|
|
|
|
@@ -201,8 +217,8 @@ void CModTools::RestartProxyServer(){
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA> CModTools::ReadCenterConfigStr(CSimpleStringA entityName){
|
|
|
- CSimpleStringA str = "", strNew = "", strEx = "";
|
|
|
+std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA, CSimpleStringA> CModTools::ReadCenterConfigStr(CSimpleStringA entityName){
|
|
|
+ CSimpleStringA str = "", strNew = "", strEx = "", strFulture = "";
|
|
|
CSmartPointer<IConfigInfo> spCerConfig;
|
|
|
ErrorCodeEnum err = this->m_pEntity->GetFunction()->OpenConfig(Config_CenterSetting, spCerConfig);
|
|
|
if (entityName == "")
|
|
|
@@ -213,10 +229,11 @@ std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA> CModTools::ReadCenter
|
|
|
table.AddEntryString(entityName, "UserMgrUrl", str, "");
|
|
|
table.AddEntryString(entityName, "UserMgrUrlNoSidebar", strNew, "");
|
|
|
table.AddEntryString(entityName, "UserMgrUrlNoSidebarMuti", strEx, "");
|
|
|
+ table.AddEntryString(entityName, "UserMgrUrlFulture", strFulture, "");
|
|
|
if (Error_Succeed == table.Load(spCerConfig))
|
|
|
- DbgEx(CSimpleString::Format("read centersetting config : UserMgrUrl-%s, UserMgrUrlNoSidebar-%s, UserMgrUrlNoSidebarMuti-%s",
|
|
|
- str.GetData(), strNew.GetData(), strEx.GetData()));
|
|
|
- return std::make_tuple(str, strNew, strEx);
|
|
|
+ DbgEx(CSimpleString::Format("read centersetting config : UserMgrUrl-%s, UserMgrUrlNoSidebar-%s, UserMgrUrlNoSidebarMuti-%s, UserMgrUrlFulture-%s",
|
|
|
+ str.GetData(), strNew.GetData(), strEx.GetData(), strFulture.GetData()));
|
|
|
+ return std::make_tuple(str, strNew, strEx, strFulture);
|
|
|
}
|
|
|
|
|
|
std::pair<CSimpleStringA, int> CModTools::ReadConfig() {
|