美文网首页
cef框架下问题处理汇总

cef框架下问题处理汇总

作者: 爱写诗的程序员zxp | 来源:发表于2020-08-19 11:38 被阅读0次

    1、忽略证书错误提示,cef默认为false,但是并没有弹窗提示要去选择操作,所以会导致某一些需要验证证书的界面打不开。
    解决:

    settings.ignore_certificate_errors = true;
    

    2、本地化问题
    解决:

      const char* loc = "zh-CN";
      CefString(&settings.locale).FromASCII(loc);
      CefString(&settings.accept_language_list).FromASCII(loc);
      cef_string_from_ascii(loc, strlen(loc), &settings.locale);
    

    3、cef70中flash无法自动打开问题

    void QCefRenderApp::OnBeforeCommandLineProcessing(const CefString &process_type, CefRefPtr<CefCommandLine> command_line)
    {
        //flash
        command_line->AppendSwitchWithValue("enable-system-flash", "1");        //这一句就够了
    //    command_line->AppendSwitchWithValue("ppapi-flash-version", "99.0.0.999");
    //    command_line->AppendSwitchWithValue("ppapi-flash-path", "plugins\\pepflashplayer64_32_0_0_344.dll");
    }
    

    4、编译cef出错

    错误  1   error MSB3073: 命令“setlocal
    mt.exe -nologo -manifest "E:/CEF_Source/cef81/tests/cefclient/resources/win/cefclient.exe.manifest" "E:/CEF_Source/cef81/tests/cefclient/resources/win/compatibility.manifest" -outputresource:"E:/CEF_Source/cef81/out/tests/cefclient/Debug/cefclient.exe";#1
    if %errorlevel% neq 0 goto :cmEnd
    :cmEnd
    endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
    :cmErrorLevel
    exit /b %1
    :cmDone
    if %errorlevel% neq 0 goto :VCEnd
    setlocal
    D:\CMake\bin\cmake.exe -E copy_if_different E:/CEF_Source/cef81/Debug/chrome_elf.dll E:/CEF_Source/cef81/out/tests/cefclient/Debug/chrome_elf.dll
    if %errorlevel% neq 0 goto :cmEnd ...
    
    解决办法:根据 image.png

    拷贝该文件下所有文件到指定文件夹即可。

    相关文章

      网友评论

          本文标题:cef框架下问题处理汇总

          本文链接:https://www.haomeiwen.com/subject/qpyrjktx.html