|
@@ -196,6 +196,13 @@ namespace Chromium {
|
|
|
|
|
|
std::pair<bool, std::string> CModTools::GenerateErrPage(ERR_PAGE_REASON errType, std::tuple < std::string, std::string> norParam, std::tuple<std::string, std::string, std::string, DWORD, DWORD> exParam)
|
|
|
{
|
|
|
+ auto generate_url_prefix = []() -> CSimpleStringA {
|
|
|
+#if defined(RVC_OS_WIN)
|
|
|
+ return CSimpleStringA("");
|
|
|
+#else
|
|
|
+ return CSimpleStringA("\\");
|
|
|
+#endif
|
|
|
+ };
|
|
|
auto errUrlRet = getErrUrl(errType);
|
|
|
CSimpleStringA errPagePathBase = errUrlRet.second.c_str();
|
|
|
CSimpleStringA errPageParams(true);
|
|
@@ -215,25 +222,26 @@ namespace Chromium {
|
|
|
{
|
|
|
errPageParams.Append(CSimpleStringA("showlimit=1"));
|
|
|
if (m_withMin) {
|
|
|
- errPageParams.Append(CSimpleStringA("\\&showmin=1"));
|
|
|
+ errPageParams.Append(CSimpleStringA(generate_url_prefix())).Append(CSimpleStringA("&showmin=1"));
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case ERR_PAGE_REASON::ErrNotify:
|
|
|
{
|
|
|
- errPageParams.Append(CSimpleStringA("reason=")).Append(std::get<0>(exParam).c_str()).Append("\\&errmsg=").Append(std::get<1>(exParam).c_str());
|
|
|
+ errPageParams.Append(CSimpleStringA("reason=")).Append(std::get<0>(exParam).c_str())
|
|
|
+ .Append(CSimpleStringA(generate_url_prefix())).Append("&errmsg=").Append(std::get<1>(exParam).c_str());
|
|
|
if (std::get<2>(exParam).length() > 5 && showRebootTime)
|
|
|
- errPageParams.Append("\\&reboottime=").Append(std::get<2>(exParam).c_str());
|
|
|
+ errPageParams.Append(CSimpleStringA(generate_url_prefix())).Append("&reboottime=").Append(std::get<2>(exParam).c_str());
|
|
|
|
|
|
- errPageParams.Append(CSimpleStringA("\\&showlimit=")).Append(std::to_string((unsigned long long)1).c_str());
|
|
|
- errPageParams.Append(CSimpleStringA("\\&terminalno=")).Append(std::get<0>(norParam).c_str());
|
|
|
- errPageParams.Append(CSimpleStringA("\\&errtime=")).Append(std::get<1>(norParam).c_str());
|
|
|
+ errPageParams.Append(CSimpleStringA(generate_url_prefix())).Append(CSimpleStringA("&showlimit=")).Append(std::to_string((unsigned long long)1).c_str());
|
|
|
+ errPageParams.Append(CSimpleStringA(generate_url_prefix())).Append(CSimpleStringA("&terminalno=")).Append(std::get<0>(norParam).c_str());
|
|
|
+ errPageParams.Append(CSimpleStringA(generate_url_prefix())).Append(CSimpleStringA("&errtime=")).Append(std::get<1>(norParam).c_str());
|
|
|
|
|
|
CSimpleStringA strSysCode = CSimpleStringA::Format("0x%X", std::get<3>(exParam));
|
|
|
CSimpleStringA strUsrCode = CSimpleStringA::Format("0x%X", std::get<4>(exParam));
|
|
|
|
|
|
- errPageParams.Append(CSimpleStringA("\\&syscode=")).Append(strSysCode);
|
|
|
- errPageParams.Append(CSimpleStringA("\\&usercode=")).Append(strUsrCode);
|
|
|
+ errPageParams.Append(CSimpleStringA(generate_url_prefix())).Append(CSimpleStringA("&syscode=")).Append(strSysCode);
|
|
|
+ errPageParams.Append(CSimpleStringA(generate_url_prefix())).Append(CSimpleStringA("&usercode=")).Append(strUsrCode);
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
@@ -457,7 +465,7 @@ namespace Chromium {
|
|
|
std::string CModTools::generateCefclientCmd(bool isExtend, std::string mainUrl)
|
|
|
{
|
|
|
CSimpleStringA strChromiumPath = GetCefHead(this->m_pEntity), strCmdLine = "";
|
|
|
- strCmdLine.Append(strChromiumPath).Append(CEFCLIENT_NAME).Append(" --url=").Append(mainUrl.c_str());
|
|
|
+ strCmdLine.Append(strChromiumPath).Append(" --url=").Append(mainUrl.c_str());
|
|
|
|
|
|
if (isExtend) {
|
|
|
//not support
|
|
@@ -500,7 +508,7 @@ namespace Chromium {
|
|
|
#if defined(RVC_OS_WIN)
|
|
|
CSimpleStringA cachePath;
|
|
|
CSimpleStringA strChromiumPath = GetCefHead(this->m_pEntity), strCmdLine = "";
|
|
|
- strCmdLine.Append(strChromiumPath).Append(CEFCLIENT_NAME).Append(" --url=").Append(mainUrl.c_str());
|
|
|
+ strCmdLine.Append(strChromiumPath).Append(" --url=").Append(mainUrl.c_str());
|
|
|
this->m_pEntity->GetFunction()->GetPath("Temp", cachePath);
|
|
|
cachePath.Append(CSimpleStringA(SPLIT_SLASH_STR)).Append("cefCache_").Append(m_strCacheHead.length() > 0 ? m_strCacheHead.c_str() : "").Append(m_specialPage_temp_name.c_str());
|
|
|
//strCmdLine.Append(" --hide-controls=true")
|