|
|
@@ -49,7 +49,7 @@ bool CModTools::killAllChromium()
|
|
|
}
|
|
|
return true;
|
|
|
#else
|
|
|
- boost::process::child child_process("killall -9 cefclient");
|
|
|
+ boost::process::child child_process("sudo killall -9 cefclient");
|
|
|
child_process.wait();
|
|
|
return true;
|
|
|
#endif
|
|
|
@@ -92,8 +92,9 @@ std::pair<bool, std::string> CModTools::getMainUrl()
|
|
|
|
|
|
std::string CModTools::generateCefclientCmd(bool isExtend, std::string mainUrl)
|
|
|
{
|
|
|
- CSimpleStringA strChromiumPath;
|
|
|
- this->m_pEntity->GetFunction()->GetPath("Base", strChromiumPath);
|
|
|
+ CSimpleStringA strChromiumPath, basePath;
|
|
|
+ this->m_pEntity->GetFunction()->GetPath("Base", basePath);
|
|
|
+ strChromiumPath.Append("sudo ").Append(basePath);
|
|
|
strChromiumPath.Append(CSimpleStringA(SPLIT_SLASH_STR) + "bin" + SPLIT_SLASH_STR + "Chromium" + SPLIT_SLASH_STR);
|
|
|
|
|
|
CSimpleStringA strCmdLine = "";
|
|
|
@@ -109,7 +110,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 --cache-path=").Append(cachePath);
|
|
|
+ strCmdLine.Append(" --no-sandbox");
|
|
|
DbgEx("cmdline : %s", strCmdLine.GetData());
|
|
|
|
|
|
return strCmdLine.GetData();
|
|
|
@@ -152,6 +154,7 @@ void CModTools::cefClientGuardian(std::string cmdline)
|
|
|
boost::process::child child_process(cmdline);
|
|
|
DbgEx("open cefclient pid:%d, cmd:%s", child_process.id(), cmdline.c_str());
|
|
|
child_process.wait();
|
|
|
+ return;
|
|
|
}
|
|
|
catch (const std::exception& e)
|
|
|
{
|
|
|
@@ -160,7 +163,6 @@ void CModTools::cefClientGuardian(std::string cmdline)
|
|
|
}
|
|
|
catch (...)
|
|
|
{
|
|
|
- int i = 10;
|
|
|
return;
|
|
|
}
|
|
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|