原文地址:http://blog.csdn.net/tiplip/article/details/42047815

下载

  1. 代码下载:http://cefbuilds.com/CEF 3.2556.1368.g535c4fb

  2. 解压到本地:D:\Develop\CEF3\cef_binary_3.2526.1361.g456ea5a_windows32

配置

  1. 下载最新的CMake,比如http://www.onlinedown.net/softdown/254393_2.htm

  2. 安装CMake后运行gui,设置使用VC2012,操作过程可参考http://blog.sina.com.cn/s/blog_53b7ddf00101mjo7.html

编译

  1. 最后进入D:\Develop\CEF3\cef_binary_3.2526.1361.g456ea5a_windows32\build

  2. 使用VC2012打开cef.sln,在IDE下build solution

warning C4610/C4510

  1. typedef const struct __log_rec_spec {
  2. log_rec_type_t  type;
  3. u_int32_t   offset;
  4. const char  *name;
  5. const char  fmt[4];
  6. } DB_LOG_RECSPEC;

关闭这种警告C/C++,Advanced,Disable Specific Warnings:4100;4127;4244;4481;4512;4701;4702;4996;4510;4610

关于_HAS_EXCEPTIONS

CEF3项目默认的编译开关是_HAS_EXCEPTIONS=0,这会在有些情况下导致编译错误,比如有些Windows平台上的std库无法使用而产生的编译错误,这时候需要开启_HAS_EXCEPTIONS

设置:

_HAS_EXCEPTIONS=1  必须同时设置EHsc

Code Generation --> Enable C++ Exceptions: EHsc

配置命令行commandline

比如使用--disable-web-security,有两种使用方式

  1. 启动:cef.exe --disable-web-security
  2. 代码实现AppendSwitch,AppendArgument,在代码中使用前面的两个横线就不需要了,AppendSwitch("disable-gpu")

注意:--disable-web-security有可能会影响屏幕中iframe的尺寸,进而影响到css,@media screen and (max-width : 1024px),比如没有设置--disable-web-security,@media screen and (max-width : 1024px)中的样式不会包含到页面中,如果设置了--disable-web-security,@media screen and (max-width : 1024px)中的样式就会起作用,从而影响了页面的显示

关于iframe

比如我们想知道当前iframe的路径,使用js怎么做?

html

  1. <div class="panel-width-start" id="map">
  2. <iframe allowTransparency=true name="I2" id="site" frameborder="0" src="http://www.58.com/changecity/"></iframe>
  3. </div>

js

  1. var currentUrl = document.getElementById("site").contentWindow.location.href;

这样可以一直获取到iframe当前页面的url,运行CEF3必须使用--disable-web-security,否则js执行会失败,告诉你当前为跨域操作不允许

控件显示与manifest

如果修改既有的cefclient工程,比如你修改了项目的名称,可执行exe的文件名,这时需要注意Post-Build Event中需要做相应的修改

mt.exe -nologo -manifest "D:/Develop/CEF3/cef_binary_3.2623.1401.gb90a3be_windows32/cefclient/resources/win/cefclient.exe.manifest" "D:/Develop/CEF3/cef_binary_3.2623.1401.gb90a3be_windows32/cefclient/resources/win/compatibility.manifest" -outputresource:"D:/Develop/CEF3/cef_binary_3.2623.1401.gb90a3be_windows32/build/cefclient/Debug/UI_example.exe";#1

常见问题

  1. warning C4510:'ATL::_NoAddRefReleaseOnCComPtr<T>' : default constructor could not begenerated

配置时,关闭-DUSE_ATL=Off to CMake

  1. error C2220: warning treated as error - no 'object' file generated

解决办法:参考http://blog.csdn.net/home1410/article/details/6004089

即:报错的文件头部添加类似#pragma warning(disable: 4510 4610) // tiplip

编译错误

gdiplusimaging.h(74) error c4430 missing type specifier - int assumed

我在window_test_win.cc中需要用到gdiplus,于是添加#include <gdiplus.h>
编译报错

答案:http://stackoverflow.com/questions/3489373/visual-studio-c-2010-express-gets-errors-using-gdi

If you have this line somewhere before the inclusion of <windows.h>

#define WIN32_LEAN_AND_MEAN

Then comment it out.

#define WIN32_LEAN_AND_MEAN啥意思

支持flash

使用Chrome带的pepflashplayer.dll

以下两种方法的版本号可以省去,在CEF3.2623版本上测试有效

启用命令行

  1. --ppapi-flash-path="C:\\Program Files (x86)\\Google\\Chrome\\Application\\53.0.2785.143\\PepperFlash\\pepflashplayer.dll" --ppapi-flash-version=23.0.0.162

版本需要对于,比如都是32位的

使用代码

  1. command_line->AppendSwitchWithValue("ppapi-flash-path","pepflashplayer.dll");
  2. //command_line->AppendSwitchWithValue("ppapi-flash-version","23.0.0.162");

具体位置

void ClientAppBrowser::OnBeforeCommandLineProcessing

不使用代理

启动参数:

--no-proxy-server=1

自定义添加资源resource

cefclient.rc文件

比如添加网页html文件,手动添加如下一行

  1. IDS_ORDER_HTML          256                     "..\\root_lottery\\order.html"

然后编译build,会产生新的resource.h文件,如下所述

resource.h文件

有两处resource.h文件,

\cefclient\resources\win\resource.h,编译cefclient.rc产生

\cefclient\browser\resource.h,手动修改,数值来自上面的resource.h文件

支持Windows XP

官方论坛显示,最后一个支持Windows XP的CEF3版本号为,3.2623.1401.gb90a3be

使用VC2012编译XP版本时,需要选择Visual Studio 2012 - Windows XP (v110_xp)

这样编译出来的exe,如果出现浏览器黑屏,可以尝试启动选项:--disable-gpu

截屏Screen Capture

参考

http://stackoverflow.com/questions/38512422/add-suport-for-chromium-embedded-framework-to-screen-sharing

测试版本,2924上验证通过,使用--enable-media-stream --enable-usermedia-screen-capturing

测试网址

https://mgechev.github.io/jscapture/

支持HTTP HTTPS Mixed Content

比如给当前页面加载资源时,如果页面本身的url以https开始,那么加载http的资源时会报类似错误

  1. 2 Mixed Content: The page at 'https://www.xxxx.com' was loaded over HTTPS, but requested an insecure script

解决办法

  1. command_line->AppendSwitch("allow-running-insecure-content");

Render与Browser的进程间交互

自定义JS函数操作与Browser相关的功能,比如修改窗口,传递参数

参考:http://blog.csdn.net/foruok/article/details/50584985

JS binding中传递JSON给C++

参数传递

参考代码Cef_message_router.cc (libcef_dll\wrapper)    38985    2016/5/13

  1. if (name == config_.js_query_function) {
  2. if (arguments.size() != 1 || !arguments[0]->IsObject()) {
  3. exception = "Invalid arguments; expecting a single object";
  4. return true;
  5. }
  6. CefRefPtr<CefV8Value> arg = arguments[0];
  7. CefRefPtr<CefV8Value> requestVal = arg->GetValue(kMemberRequest);
  8. if (!requestVal.get() || !requestVal->IsString()) {
  9. exception = "Invalid arguments; object member '"+
  10. std::string(kMemberRequest) +"' is required and must "
  11. "have type string";
  12. return true;
  13. }

参数类型互换

参考:http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11104#

拖拽截取页面的图片

参考问答:http://stackoverflow.com/questions/28099145/creating-a-drag-select-screen-capture-for-google-chrome

demo:http://jsfiddle.net/x2xmjrya/

下载编译chromium支持MP3/MP4

2623.mp3.4_x_frame

背景

使用了VPN和http代理

参考

http://www.cnblogs.com/himax/p/how_to_build_cef3_on_windows.html

https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up

文件夹结构

设置环境变量

2785及更老版本使用GYP

  1. DEPOT_TOOLS_WIN_TOOLCHAIN=0
  2. GYP_DEFINES=buildtype=Official
  3. GYP_GENERATORS=ninja,msvs-ninja
  4. GYP_MSVS_VERSION=2015

2785以后的版本使用GN

  1. CEF_USE_GN=1
  2. GN_DEFINES=is_official_build=true
  3. GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*

如果需要支持MP3/MP4

  1. set CEF_USE_GN=1
  2. set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
  3. set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
  4. call cef_create_projects.bat

注意:编译过程中,最好关闭其他程序,因为最新official版本的编译需要占用大量的内存RAM,> 8G,理想的内存最好是 14G

以及Path

  1. Control Panel → System and Security → System → Advanced system settings
  2. Modify the PATH system variable to include D:\Work_area\CEF3\depot_tools

编译过程命令汇总

首次编译

  1. d:
  2. cd Work_area\CEF3
  3. set http_proxy=http://cn-proxy.jp.oracle.com:80
  4. gclient
  5. git config --global http.proxy %http_proxy%
  6. python automate-git.py --download-dir=D:\Work_area\CEF3\source --depot-tools-dir=D:\Work_area\CEF3\depot_tools --branch=2623  --checkout=b90a3be1860b0647e8a62c218ff7c054390365b1 --no-build

按照这个命令步骤,如果遇到问题

修改个别文件后的编译

直接在第一层目录下执行

  1. python automate-git.py --download-dir=c:\src\source --depot-tools-dir=c:\src\depot_tools --branch=2623  --checkout=b90a3be1860b0647e8a62c218ff7c054390365b1 --force-build

编译参数说明

  1. set http_proxy=http://www-proxy.us.oracle.com:80
  2. gclient
  3. git config --global http.proxy %http_proxy%
  4. python automate-git.py --download-dir=c:\src\source --depot-tools-dir=c:\src\depot_tools --branch=2623  --checkout=b90a3be1860b0647e8a62c218ff7c054390365b1 --force-build
  5. --branch=XXXX 指定cef的branch,指定后,会默认下载该branch的cef,以及最新版本的chromium再自动切换到对应版本
  6. --checkout 手动指定cef的commit(可选参数)
  7. --chromium-checkout 手动指定chromium的版本(可选参数)
  8. --no-debug-build 不生成Debug版本,即不生成开发需要的libcef_dll_wrapper库(可选参数)
  9. --force-clean 强制清除所有chromium的生成项,将源码回档到未编译前,清除后需要重新下载(可选参数)
  10. --force-build 强制进行编译,重新开始或者继续之前的工作(可选参数)
  11. --no-update 不再更新cef和chromium(可选参数)

可能遇到的错误及解决办法

执行gclient出现如下错误:

  1. C:\Windows\System32>gclient
  2. Installing python 2.7.6...
  3. Fetching from https://src.chromium.org/svn/trunk/tools/third_party/python276_bin
  4. .zip
  5. [-] XMLHTTP 80072ee2: Cannot make HTTP request (操作超时
  6. ... Failed to checkout python automatically.
  7. You should get the "prebaked" version at https://src.chromium.org/svn/trunk/tool
  8. s/third_party/
  9. 系统找不到指定的路径。

说明当前你的电脑可能是通过代理访问的,需要修改depot_tools\bootstrap\win\get_file.js如下:

  1. function Download(url, path, verbose) {
  2. if (verbose) {
  3. WScript.StdOut.Write(" *  GET " + url + "...");
  4. }
  5. try {
  6. xml_http = new ActiveXObject("MSXML2.ServerXMLHTTP");
  7. } catch (e) {
  8. WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number(e.number).toHex() +
  9. ": Cannot create Active-X object (" + e.description) + ").";
  10. WScript.Quit(1);
  11. }
  12. try {
  13. xml_http.open("GET", url, false);
  14. } catch (e) {
  15. WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number(e.number).toHex() +
  16. ": invalid URL.");
  17. WScript.Quit(1);
  18. }

改为

  1. function Download(url, path, verbose) {
  2. if (verbose) {
  3. WScript.StdOut.Write(" *  GET " + url + "...");
  4. }
  5. try {
  6. xml_http = new ActiveXObject("MSXML2.ServerXMLHTTP.6.0");
  7. } catch (e) {
  8. WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number(e.number).toHex() +
  9. ": Cannot create Active-X object (" + e.description) + ").";
  10. WScript.Quit(1);
  11. }
  12. try {
  13. xml_http.setProxy(2, "cn-proxy.jp.oracle.com:80");
  14. xml_http.open("GET", url, false);
  15. } catch (e) {
  16. WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number(e.number).toHex() +
  17. ": invalid URL.");
  18. WScript.Quit(1);
  19. }

执行

  1. python automate-git.py

错误

  1. python automate-git.py --download-dir=D:\Develop\CEF3\Compile\source --depot-tools-dir=D:\Develop\CEF3\Compile\depot_tools --branch=2357 --checkout=d66017718b0f0d44da42b706c3c2aa5c0c103852 --no-build
  1. D:\Develop\CEF3\Compile>python automate-git.py --download=D:\Develop\CEF3\Compil
  2. e\source --depot-tools-dir=D:\Develop\CEF3\Compile\depot_tools --branch=2357 --n
  3. o-build
  4. --> Download Directory: D:\Develop\CEF3\Compile\source
  5. --> Depot Tools Directory: D:\Develop\CEF3\Compile\depot_tools
  6. --> Updating depot_tools
  7. -------- Running "update_depot_tools.bat" in "D:\Develop\CEF3\Compile\depot_tool
  8. s"...
  9. fatal: unable to access 'https://chromium.googlesource.com/chromium/tools/depot_
  10. tools.git/': Failed connect to chromium.googlesource.com:443; No error
  11. Cannot rebase: You have unstaged changes.
  12. Please commit or stash them.
  13. Failed to update depot_tools.
  14. --> CEF Branch: 2357
  15. --> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
  16. --> CEF Source Directory: D:\Develop\CEF3\Compile\source\cef
  17. -------- Running "D:\Develop\CEF3\Compile\depot_tools\git.bat clone https://bitb
  18. ucket.org/chromiumembedded/cef.git D:\Develop\CEF3\Compile\source\cef" in "D:\De
  19. velop\CEF3\Compile\source"...
  20. Cloning into 'D:\Develop\CEF3\Compile\source\cef'...
  21. fatal: unable to access 'https://bitbucket.org/chromiumembedded/cef.git/': Faile
  22. d connect to bitbucket.org:443; No error
  23. Traceback (most recent call last):
  24. File "automate-git.py", line 662, in <module>
  25. depot_tools_dir)
  26. File "automate-git.py", line 55, in run
  27. shell=(sys.platform == 'win32'))
  28. File "D:\Develop\CEF3\Compile\depot_tools\python276_bin\lib\subprocess.py", li
  29. ne 540, in check_call
  30. raise CalledProcessError(retcode, cmd)
  31. subprocess.CalledProcessError: Command '['D:\\Develop\\CEF3\\Compile\\depot_tool
  32. s\\git.bat', 'clone', 'https://bitbucket.org/chromiumembedded/cef.git', 'D:\\Dev
  33. elop\\CEF3\\Compile\\source\\cef']' returned non-zero exit status 128

执行gclient前设置代理

  1. Microsoft Windows [版本 6.1.7601]
  2. 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
  3. C:\windows\system32>netsh
  4. netsh>winhttp
  5. netsh winhttp>show proxy
  6. 当前的 WinHTTP 代理服务器设置:
  7. 代理服务器:  http=cn-proxy.jp.oracle.com
  8. 绕过列表     :  (无)
  9. netsh winhttp>set proxy cn-proxy.jp.oracle.com:80
  10. 当前的 WinHTTP 代理服务器设置:
  11. 代理服务器:  cn-proxy.jp.oracle.com:80
  12. 绕过列表     :  (无)
  13. netsh winhttp>exit
  14. C:\windows\system32>set http_proxy=http://cn-proxy.jp.oracle.com:80
  15. C:\windows\system32>git config -global http.proxy %http_proxy%
  16. error: did you mean `--global` (with two dashes ?)
  17. C:\windows\system32>git config --global http.proxy %http_proxy%
  18. C:\windows\system32>git config --get http.proxy
  19. http://cn-proxy.jp.oracle.com:80
  20. C:\windows\system32>d:
  21. D:\>cd Develop\CEF3\Compile
  22. D:\Develop\CEF3\Compile>python automate-git.py --download-dir=D:\Develop\CEF3\Co
  23. mpile\source --depot-tools-dir=D:\Develop\CEF3\Compile\depot_tools --branch=2357
  24. --checkout=d66017718b0f0d44da42b706c3c2aa5c0c103852 --no-build
  25. --> Download Directory: D:\Develop\CEF3\Compile\source
  26. --> Depot Tools Directory: D:\Develop\CEF3\Compile\depot_tools
  27. --> Updating depot_tools
  28. -------- Running "update_depot_tools.bat" in "D:\Develop\CEF3\Compile\depot_tool
  29. s"...
  30. Cannot rebase: You have unstaged changes.
  31. Please commit or stash them.
  32. Failed to update depot_tools.
  33. --> CEF Branch: 2357
  34. --> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
  35. --> CEF Source Directory: D:\Develop\CEF3\Compile\source\cef
  36. -------- Running "D:\Develop\CEF3\Compile\depot_tools\git.bat clone https://bitb
  37. ucket.org/chromiumembedded/cef.git D:\Develop\CEF3\Compile\source\cef" in "D:\De
  38. velop\CEF3\Compile\source"...
  39. Cloning into 'D:\Develop\CEF3\Compile\source\cef'...
  40. remote: Counting objects: 32815, done.
  41. remote: Compressing objects: 100% (8915/8915), done.
  42. remote: Total 32815 (delta 27309), reused 28831 (delta 23803)
  43. Receiving objects: 100% (32815/32815), 9.83 MiB | 789.00 KiB/s, done.
  44. Resolving deltas: 100% (27309/27309), done.
  45. Checking connectivity... done.
  46. -------- Running "D:\Develop\CEF3\Compile\depot_tools\git.bat rev-parse HEAD" in
  47. "D:\Develop\CEF3\Compile\source\cef"...
  48. -------- Running "D:\Develop\CEF3\Compile\depot_tools\git.bat rev-parse d6601771
  49. 8b0f0d44da42b706c3c2aa5c0c103852" in "D:\Develop\CEF3\Compile\source\cef"...
  50. --> CEF Current Checkout: 6d7ee1e08439672050c2c5bd022fbcc2e79770d4
  51. --> CEF Desired Checkout: d66017718b0f0d44da42b706c3c2aa5c0c103852 (d66017718b0f
  52. 0d44da42b706c3c2aa5c0c103852)
  53. -------- Running "D:\Develop\CEF3\Compile\depot_tools\git.bat checkout d66017718
  54. b0f0d44da42b706c3c2aa5c0c103852" in "D:\Develop\CEF3\Compile\source\cef"...
  55. Checking out files: 100% (1049/1049), done.
  56. Note: checking out 'd66017718b0f0d44da42b706c3c2aa5c0c103852'.
  57. You are in 'detached HEAD' state. You can look around, make experimental
  58. changes and commit them, and you can discard any commits you make in this
  59. state without impacting any branches by performing another checkout.
  60. If you want to create a new branch to retain commits you create, you may
  61. do so (now or later) by using -b with the checkout command again. Example:
  62. git checkout -b new_branch_name
  63. HEAD is now at d660177... Update to Chromium version 43.0.2357.130
  64. --> CEF Output Directory: D:\Develop\CEF3\Compile\source\out_2357
  65. --> Creating directory D:\Develop\CEF3\Compile\source\chromium
  66. --> Writing file: D:\Develop\CEF3\Compile\source\chromium\.gclient
  67. -------- Running "gclient sync --nohooks --with_branch_heads --jobs 16" in "D:\D
  68. evelop\CEF3\Compile\source\chromium"...
  69. Cannot rebase: You have unstaged changes.
  70. Please commit or stash them.
  71. Failed to update depot_tools.
  72. [0:01:00] Still working on:
  73. [0:01:00]   src
  74. [0:01:14] Still working on:
  75. [0:01:14]   src
  76. [0:01:25] Still working on:
  77. [0:01:25]   src
  78. [0:01:35] Still working on:
  79. [0:01:35]   src
  80. [0:01:45] Still working on:

cipd.ps1错误

遇到如下红字的错误可以忽略

  1. The term 'git' is not recognized as the name of a cmdlet, function, script file
  2. , or operable program. Check the spelling of the name, or if a path was include
  3. d, verify that the path is correct and try again.
  4. At C:\src\depot_tools\cipd.ps1:31 char:25
  5. + $depot_tools_version = & <<<< git -C $myPath rev-parse HEAD 2>&1
  6. + CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFound
  7. Exception
  8. + FullyQualifiedErrorId : CommandNotFoundException

获取代码及依赖工具

报错

  1. 0> Failed to fetch file gs://chromium-gn/14b37907020b299b5c6bfae1d7fed7d7a92e4fe
  2. 6 for src/buildtools/win/gn.exe, skipping. [Err: Traceback (most recent call las
  3. t):
  4. File "c:\src\depot_tools\gsutil.py", line 160, in <module>
  5. sys.exit(main())
  6. File "c:\src\depot_tools\gsutil.py", line 157, in main
  7. clean=args.clean)
  8. File "c:\src\depot_tools\gsutil.py", line 125, in run_gsutil
  9. gsutil_bin = ensure_gsutil(force_version, target, clean)
  10. File "c:\src\depot_tools\gsutil.py", line 107, in ensure_gsutil
  11. target_zip_filename = download_gsutil(version, instance_dir)
  12. File "c:\src\depot_tools\gsutil.py", line 62, in download_gsutil
  13. u = urllib2.urlopen(url)
  14. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 127, in urlopen
  15. return _opener.open(url, data, timeout)
  16. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 404, in open
  17. response = self._open(req, data)
  18. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 422, in _open
  19. '_open', req)
  20. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 382, in _call_cha
  21. in
  22. result = func(*args)
  23. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 1222, in https_op
  24. en
  25. return self.do_open(httplib.HTTPSConnection, req)
  26. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 1184, in do_open
  27. raise URLError(err)
  28. urllib2.URLError: <urlopen error [Errno 10060] A connection attempt failed becau
  29. se the connected party did not properly respond after a period of time, or estab
  30. lished connection failed because connected host has failed to respond>
  31. ]
  32. Downloading 1 files took 21.630000 second(s)
  33. NOTICE: You have PROXY values set in your environment, but gsutil in depot_tools
  34. does not (yet) obey them.
  35. Also, --no_auth prevents the normal BOTO_CONFIG environment variable from being
  36. used.
  37. To use a proxy in this situation, please supply those settings in a .boto file p
  38. ointed to by the NO_AUTH_BOTO_CONFIG environment var.
  39. Failed to fetch file gs://chromium-gn/14b37907020b299b5c6bfae1d7fed7d7a92e4fe6 f
  40. or src/buildtools/win/gn.exe. [Err: Traceback (most recent call last):
  41. File "c:\src\depot_tools\gsutil.py", line 160, in <module>
  42. sys.exit(main())
  43. File "c:\src\depot_tools\gsutil.py", line 157, in main
  44. clean=args.clean)
  45. File "c:\src\depot_tools\gsutil.py", line 125, in run_gsutil
  46. gsutil_bin = ensure_gsutil(force_version, target, clean)
  47. File "c:\src\depot_tools\gsutil.py", line 107, in ensure_gsutil
  48. target_zip_filename = download_gsutil(version, instance_dir)
  49. File "c:\src\depot_tools\gsutil.py", line 62, in download_gsutil
  50. u = urllib2.urlopen(url)
  51. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 127, in urlopen
  52. return _opener.open(url, data, timeout)
  53. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 404, in open
  54. response = self._open(req, data)
  55. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 422, in _open
  56. '_open', req)
  57. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 382, in _call_cha
  58. in
  59. result = func(*args)
  60. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 1222, in https_op
  61. en
  62. return self.do_open(httplib.HTTPSConnection, req)
  63. File "c:\src\depot_tools\python276_bin\lib\urllib2.py", line 1184, in do_open
  64. raise URLError(err)
  65. urllib2.URLError: <urlopen error [Errno 10060] A connection attempt failed becau
  66. se the connected party did not properly respond after a period of time, or estab
  67. lished connection failed because connected host has failed to respond>
  68. ]
  69. Error: Command 'download_from_google_storage --no_resume --platform=win32 --no_a
  70. uth --bucket chromium-gn -s src/buildtools/win/gn.exe.sha1' returned non-zero ex
  71. it status 1 in c:\src\source\chromium
  72. Hook 'download_from_google_storage --no_resume --platform=win32 --no_auth --buck
  73. et chromium-gn -s src/buildtools/win/gn.exe.sha1' took 23.11 secs
  74. Traceback (most recent call last):
  75. File "automate-git.py", line 879, in <module>
  76. chromium_dir, depot_tools_dir)
  77. File "automate-git.py", line 55, in run
  78. shell=(sys.platform == 'win32'))
  79. File "C:\src\depot_tools\python276_bin\lib\subprocess.py", line 540, in check_
  80. call
  81. raise CalledProcessError(retcode, cmd)
  82. subprocess.CalledProcessError: Command '['gclient', 'sync', '--with_branch_heads
  83. ', '--jobs', '16']' returned non-zero exit status 2

批处理脚本RunDownloads.py.bat

注意代理https不是http

  1. @rem When Run Command [gclient runhooks]
  2. @rem Download_Failed===========================
  3. @rem download_from_google_storage --no_resume --platform=win32 --directory --recursive --no_auth --num_threads=16 --bucket chromium-apache-win32  --boto=E:\_ChromiumDev\gclient_chromium_src\.boto src/third_party/apache-win32
  4. @rem Download_Failed===========================
  5. set <span style="color:#FF0000;">https</span>_proxy=http://cn-proxy.jp.oracle.com:80
  6. call RunWget.bat  gs://chromium-gn/14b37907020b299b5c6bfae1d7fed7d7a92e4fe6 src/buildtools/win/gn.exe
  7. cmd

RunWget.bat

需要设置wget的环境变量路径Path,

SRC_DIR要根据自己的代码路径设置

  1. @echo off
  2. if "%1"=="" goto error
  3. @rem ##########
  4. @rem 2> File gs://chromium-apache-win32/11ba0c1941b9c46ad279f33c2db3e3c628197ae8 for
  5. @rem src/third_party/apache-win32\bin\httpd.exe does not exist, skipping.
  6. @rem 3> File gs://chromium-apache-win32/199cb003a5a40db260f29128ae630f298aaf7702 for
  7. @rem src/third_party/apache-win32\bin\libapriconv-1.dll does not exist, skipping.
  8. @rem ##########
  9. set SRC_DIR=D:\Work_area\CEF3\source\chromium
  10. @rem set param1=gs://chromium-apache-win32/11ba0c1941b9c46ad279f33c2db3e3c628197ae8
  11. @rem set param2=src/third_party/apache-win32\bin\httpd.exe
  12. set param1=%1
  13. set param2=%2
  14. echo [INFO][%time%] ==========Begin==================
  15. echo [INFO][%time%] gs_url=%param1%
  16. set baseurl=https://storage.googleapis.com/
  17. set baseurl=%baseurl%%param1:~5%
  18. echo [INFO][%time%] httpBaseUrl=%baseurl%
  19. :StartDownload
  20. @rem 进行一次 文件是否 覆盖的用户交互
  21. pushd .
  22. cd %SRC_DIR%
  23. set cover
  24. if "%cover%"=="" set cover=2
  25. if exist %param2% (
  26. if %cover%==2 (
  27. set /p cover=文件已存在,是否覆盖?[0=不覆盖 1=覆盖]:
  28. )
  29. )
  30. popd
  31. if not exist %param2% (
  32. goto :continue
  33. )
  34. if %cover%==1 goto :continue
  35. echo [INFO][%time%]================END================
  36. goto :eof
  37. :continue
  38. pushd .
  39. cd %SRC_DIR%
  40. wget --no-check-certificate %baseurl% -O %param2%
  41. echo [%time%][SUCCESS] Dwonloads to url:%param2%  success!!!
  42. echo [INFO][%time%]===============END=================
  43. popd
  44. goto :eof
  45. :error
  46. echo Help:
  47. echo     %0 [gs://name/hash] [saveToPath]
  48. pause

各个文件的相对位置结构

开始编译

错误skedge.cpp(231) warning C4334

  1. [4453/15559] CXX obj\third_party\skia\src\core\skia_library.SkEdge.obj
  2. FAILED: obj/third_party/skia/src/core/skia_library.SkEdge.obj
  3. ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Stu
  4. dio 14.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\ski
  5. a\src\core\skia_library.SkEdge.obj.rsp /c ..\..\third_party\skia\src\core\SkEdge
  6. .cpp /Foobj\third_party\skia\src\core\skia_library.SkEdge.obj /Fdobj\skia\skia_l
  7. ibrary.cc.pdb
  8. c:\src\source\chromium\src\third_party\skia\src\core\skedge.cpp(231): error C222
  9. 0: warning treated as error - no 'object' file generated
  10. c:\src\source\chromium\src\third_party\skia\src\core\skedge.cpp(231): warning C4
  11. 334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit sh
  12. ift intended?)
  13. [4458/15559] CXX obj\third_party\skia\src\core\skia_library.SkFlattenable.obj
  14. ninja: build stopped: subcommand failed.
  15. Traceback (most recent call last):
  16. File "automate-git.py", line 980, in <module>
  17. if options.buildlogfile else None)
  18. File "automate-git.py", line 55, in run
  19. shell=(sys.platform == 'win32'))
  20. File "C:\src\depot_tools\python276_bin\lib\subprocess.py", line 540, in check_
  21. call
  22. raise CalledProcessError(retcode, cmd)
  23. subprocess.CalledProcessError: Command '['ninja', '-C', 'out\\Debug', 'cefclient
  24. ']' returned non-zero exit status 1

解决

在文件source\chromium\src\skia\skia_common.gypi

\source\chromium\src\google_apis\google_apis.gyp

  1. # We would prefer this to be direct_dependent_settings,
  2. # however we currently have no means to enforce that direct dependents
  3. # re-export if they include Skia headers in their public headers.
  4. 'all_dependent_settings': {
  5. 'include_dirs': [
  6. '..',
  7. 'config',
  8. ],
  9. },
  10. 'msvs_disabled_warnings': [4244, 4267,<span style="color:#FF6666;"><strong> <span style="color:#FF0000;">4334</span></strong></span>, 4341, 4345, 4390, 4554, 4748, 4800],

error C2679

解决:gl_bindings_skia_in_process.cc和 gl_bindings_skia_in_process.hh已经死代码了。

ui/gl/BUILD.gn和gl.gyp去除这两个引用详见https://codereview.chromium.org/1673323002

  1. FAILED: obj/ui/gl/gl.gl_bindings_skia_in_process.obj
  2. ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Stu
  3. dio 14.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\ui\gl\gl.gl_bin
  4. dings_skia_in_process.obj.rsp /c ..\..\ui\gl\gl_bindings_skia_in_process.cc /Foo
  5. bj\ui\gl\gl.gl_bindings_skia_in_process.obj /Fdobj\ui\gl\gl.cc.pdb
  6. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(860): error C267
  7. 9: binary '=': no operator found which takes a right-hand operand of type 'overl
  8. oaded-function' (or there is no acceptable conversion)
  9. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  10. note: could be 'GrGLInterface::GLPtr<GrGLBufferDataProc> &GrGLInterface::GLPtr<
  11. GrGLBufferDataProc>::operator =(GrGLInterface::GLPtr<GrGLBufferDataProc> &&)'
  12. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  13. note: or       'GrGLInterface::GLPtr<GrGLBufferDataProc> &GrGLInterface::GLPtr<
  14. GrGLBufferDataProc>::operator =(const GrGLInterface::GLPtr<GrGLBufferDataProc> &
  15. )'
  16. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(112):
  17. note: or       'GrGLInterface::GLPtr<GrGLBufferDataProc> GrGLInterface::GLPtr<G
  18. rGLBufferDataProc>::operator =(FNPTR_TYPE)'
  19. with
  20. [
  21. FNPTR_TYPE=GrGLBufferDataProc
  22. ]
  23. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(860): note: whil
  24. e trying to match the argument list '(GrGLInterface::GLPtr<GrGLBufferDataProc>,
  25. overloaded-function)'
  26. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(861): error C267
  27. 9: binary '=': no operator found which takes a right-hand operand of type 'overl
  28. oaded-function' (or there is no acceptable conversion)
  29. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  30. note: could be 'GrGLInterface::GLPtr<GrGLBufferSubDataProc> &GrGLInterface::GLP
  31. tr<GrGLBufferSubDataProc>::operator =(GrGLInterface::GLPtr<GrGLBufferSubDataProc
  32. > &&)'
  33. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  34. note: or       'GrGLInterface::GLPtr<GrGLBufferSubDataProc> &GrGLInterface::GLP
  35. tr<GrGLBufferSubDataProc>::operator =(const GrGLInterface::GLPtr<GrGLBufferSubDa
  36. taProc> &)'
  37. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(112):
  38. note: or       'GrGLInterface::GLPtr<GrGLBufferSubDataProc> GrGLInterface::GLPt
  39. r<GrGLBufferSubDataProc>::operator =(FNPTR_TYPE)'
  40. with
  41. [
  42. FNPTR_TYPE=GrGLBufferSubDataProc
  43. ]
  44. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(861): note: whil
  45. e trying to match the argument list '(GrGLInterface::GLPtr<GrGLBufferSubDataProc
  46. >, overloaded-function)'
  47. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(891): error C267
  48. 9: binary '=': no operator found which takes a right-hand operand of type 'overl
  49. oaded-function' (or there is no acceptable conversion)
  50. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  51. note: could be 'GrGLInterface::GLPtr<GrGLFlushMappedBufferRangeProc> &GrGLInter
  52. face::GLPtr<GrGLFlushMappedBufferRangeProc>::operator =(GrGLInterface::GLPtr<GrG
  53. LFlushMappedBufferRangeProc> &&)'
  54. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  55. note: or       'GrGLInterface::GLPtr<GrGLFlushMappedBufferRangeProc> &GrGLInter
  56. face::GLPtr<GrGLFlushMappedBufferRangeProc>::operator =(const GrGLInterface::GLP
  57. tr<GrGLFlushMappedBufferRangeProc> &)'
  58. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(112):
  59. note: or       'GrGLInterface::GLPtr<GrGLFlushMappedBufferRangeProc> GrGLInterf
  60. ace::GLPtr<GrGLFlushMappedBufferRangeProc>::operator =(FNPTR_TYPE)'
  61. with
  62. [
  63. FNPTR_TYPE=GrGLFlushMappedBufferRangeProc
  64. ]
  65. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(891): note: whil
  66. e trying to match the argument list '(GrGLInterface::GLPtr<GrGLFlushMappedBuffer
  67. RangeProc>, overloaded-function)'
  68. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(920): error C267
  69. 9: binary '=': no operator found which takes a right-hand operand of type 'overl
  70. oaded-function' (or there is no acceptable conversion)
  71. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  72. note: could be 'GrGLInterface::GLPtr<GrGLMapBufferRangeProc> &GrGLInterface::GL
  73. Ptr<GrGLMapBufferRangeProc>::operator =(GrGLInterface::GLPtr<GrGLMapBufferRangeP
  74. roc> &&)'
  75. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(116):
  76. note: or       'GrGLInterface::GLPtr<GrGLMapBufferRangeProc> &GrGLInterface::GL
  77. Ptr<GrGLMapBufferRangeProc>::operator =(const GrGLInterface::GLPtr<GrGLMapBuffer
  78. RangeProc> &)'
  79. c:\src\source\chromium\src\third_party\skia\include\gpu\gl\grglinterface.h(112):
  80. note: or       'GrGLInterface::GLPtr<GrGLMapBufferRangeProc> GrGLInterface::GLP
  81. tr<GrGLMapBufferRangeProc>::operator =(FNPTR_TYPE)'
  82. with
  83. [
  84. FNPTR_TYPE=GrGLMapBufferRangeProc
  85. ]
  86. c:\src\source\chromium\src\ui\gl\gl_bindings_skia_in_process.cc(920): note: whil
  87. e trying to match the argument list '(GrGLInterface::GLPtr<GrGLMapBufferRangePro
  88. c>, overloaded-function)'
  89. [757/7473] CXX obj\ui\gl\gl.gl_bindings_autogen_gl.obj
  90. ninja: build stopped: subcommand failed.
  91. Traceback (most recent call last):
  92. File "automate-git.py", line 980, in <module>
  93. if options.buildlogfile else None)
  94. File "automate-git.py", line 55, in run
  95. shell=(sys.platform == 'win32'))
  96. File "C:\src\depot_tools\python276_bin\lib\subprocess.py", line 540, in check_
  97. call
  98. raise CalledProcessError(retcode, cmd)
  99. subprocess.CalledProcessError: Command '['ninja', '-C', 'out\\Debug', 'cefclient
  100. ']' returned non-zero exit status 1

error C4430

#解决egl语法错误
#修改h:\ws\source\chromium\src\third_party\swiftshader\include\egl\eglext.h
#在62行后加入
typedef EGLAttribKHR EGLAttrib;

  1. FAILED: obj/ui/gl/gl.egl_util.obj
  2. ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Stu
  3. dio 14.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\ui\gl\gl.egl_ut
  4. il.obj.rsp /c ..\..\ui\gl\egl_util.cc /Foobj\ui\gl\gl.egl_util.obj /Fdobj\ui\gl\
  5. gl.cc.pdb
  6. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(119): er
  7. ror C4430: missing type specifier - int assumed. Note: C++ does not support defa
  8. ult-int
  9. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(119): er
  10. ror C2143: syntax error: missing ',' before '*'
  11. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(120): er
  12. ror C2061: syntax error: identifier 'EGLAttrib'
  13. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(515): er
  14. ror C2061: syntax error: identifier 'EGLAttrib'
  15. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(518): er
  16. ror C2061: syntax error: identifier 'EGLAttrib'
  17. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(585): er
  18. ror C4430: missing type specifier - int assumed. Note: C++ does not support defa
  19. ult-int
  20. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(585): er
  21. ror C2143: syntax error: missing ',' before '*'
  22. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(586): er
  23. ror C4430: missing type specifier - int assumed. Note: C++ does not support defa
  24. ult-int
  25. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(586): er
  26. ror C2143: syntax error: missing ',' before '*'
  27. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(587): er
  28. ror C2061: syntax error: identifier 'EGLAttrib'
  29. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(588): er
  30. ror C2061: syntax error: identifier 'EGLAttrib'
  31. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(590): er
  32. ror C2061: syntax error: identifier 'EGLAttrib'
  33. c:\src\source\chromium\src\third_party\swiftshader\include\egl\eglext.h(591): er
  34. ror C2061: syntax error: identifier 'EGLAttrib'

Release下链接错误

  1. ffmpeg.lib(ffmpeg.wavdec.obj) : error LNK2001: unresolved external symbol _ff_w64_guid_data

chromium/third_party/ffmpeg /ffmpeg_generated.gni

  1. "libavformat/vorbiscomment.c",

改成

  1. "libavformat/vorbiscomment.c",
  2. "libavformat/w64.c",

chromium/third_party/ffmpeg /ffmpeg_generated.gypi

  1. 'libavformat/vorbiscomment.c',

改成

  1. 'libavformat/vorbiscomment.c',
  2. 'libavformat/w64.c',

参考:https://ffmpeg.org/pipermail/ffmpeg-devel/2016-May/194142.html

修改代码

  1. Refused to display in a frame because it set 'X-Frame-Options' to
  1. bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, const KURL& url, unsigned long requestIdentifier)
  2. {
  3. return false;
  4. }

运行错误

错误代码:

Error Code: -130 Failed to load web page (unknown error).

原因

IE的代理问题,比如可能是代理没设置对,或者不需要代理

CEF3版本升级需要porting的代码文件

比如从cef_binary_3.2454.1323.g71c7271_windows32 -->cef_binary_3.2704.1434.gec3e9ed_windows32

cefclient\browser\client_handler.cc

操作视窗,拖放客户区,缩放

  1. // Window Manipulator
  2. const char kDrag[]        = "kDrag";
  3. const char kRestore[]     = "kRestore";
  4. const char kMinimize[]    = "kMinimize";
  5. const char kMaximize[]    = "kMaximize";
  6. const char kFullscreen[]  = "kFullscreen";
  7. const char kShow[]        = "kShow";
  8. const char kHide[]        = "kHide";
  1. // Check for messages from the client renderer.
  2. std::string message_name = message->GetName();
  3. if (message_name == kFocusedNodeChangedMessage) {
  4. // A message is sent from ClientRenderDelegate to tell us whether the
  5. // currently focused DOM node is editable. Use of |focus_on_editable_field_|
  6. // is redundant with CefKeyEvent.focus_on_editable_field in OnPreKeyEvent
  7. // but is useful for demonstration purposes.
  8. focus_on_editable_field_ = message->GetArgumentList()->GetBool(0);
  9. return true;
  10. } else if (message_name == kDrag) { // Window Manipulator
  11. RootWindow::GetWindow(browser)->Drag();
  12. return true;
  13. } else if (message_name == kRestore) {
  14. RootWindow::GetWindow(browser)->Restore();
  15. return true;
  16. } else if (message_name == kMinimize) {
  17. RootWindow::GetWindow(browser)->Minimize();
  18. return true;
  19. } else if (message_name == kMaximize) {
  20. RootWindow::GetWindow(browser)->Maximize();
  21. return true;
  22. }
  1. bool ClientHandler::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
  2. const CefString& message,
  3. const CefString& source,
  4. int line) {

cefclient\browser\main_context_impl.cc

修改首页初始访问的URL

  1. // The default URL to load in a browser window.
  2. const char kDefaultUrl[] = "http://happ/index.html"; // "http://www.google.com";

cefclient\browser\resource_util_win.cc

如果需要添加资源,比如图标之类的才需要修改这里

cefclient\browser\root_window_win.cc

窗口的初始化,比如全屏,可缩放等窗口风格设置

VC2012编译CEF3-转的更多相关文章

  1. VC2012编译protobuf出错处理

    近来要学习protobuf的协议生成.须要从网上下载它的代码,从这个SVN地址下载: 个.因此编译提示上面的出错.仅仅须要把std;;tuple里的个数定义为10个就可以.,因此不支持5个以上的參数输 ...

  2. 在Windows下编译Cef3.2623并加入mp3、mp4支持(附带源码包和最终DLL)《转》

    https://blog.csdn.net/zhuhongshu/article/details/54193842 源码包下载地址:点我下载 最终Dll.Lib.PDB.头文件下载地址(release ...

  3. 如何在windows上编译Chromium (CEF3) 并加入MP3支持(二)

    时隔一年,再次编译cef3,独一无二的目的仍为加入mp3支持.新版本的编译环境和注意事项都已经发生了变化,于是再记录一下. 一.编译版本 cef版本号格式为X.YYYY.A.gHHHHHHH X为主版 ...

  4. CEF3.2623使用记录:windows编译

    CEF3.2623使用记录:windows编译 1:cef3.2623下载地址 2623是cef3最后一个支持xp系统的版本,且可以支持html的audio标签,可以用作对html音频的处理下载地址为 ...

  5. VC++编译zlib

    目录 第1章简介    1 第2章版本1.2.3    2 2.1 编译汇编代码    2 2.1.1 32位汇编    2 2.1.2 64位汇编    5 2.2 Visual C++ 6.0   ...

  6. cef-3.2623 build on vs2013

    1. 参文"在Windows下编译Cef3.2623并加入mp3.mp4支持(附带源码包和最终DLL)"下载包 http://blog.csdn.net/zhuhongshu/ar ...

  7. 在WAMPSERVER下增加多版本的PHP(PHP5.3,PHP5.4,PHP5.5)完美支持。

    WAMPServer可以让开发者在Windows系统下快速搭建WAMP环境,它支持多版本的Apache.MySQL.PHP之间的相互切换,互不影响,对于PHPer开发者来讲极为方便快速. 以下是在WA ...

  8. C++陷阱系列:让面试官倒掉的题

    http://blog.chinaunix.net/uid-22754909-id-3969535.html 今天和几位同仁一起探讨了一下C++的一些基础知识,在座的同仁都是行家了,有的多次当过C++ ...

  9. C++ 坑人系列(1): 让面试官晕倒的题目

     今天和几位同仁一起探讨了一下C++的一些基础知识,在座的同仁都是行家了,有的多次当过C++技术面试官.不过我出的题过于刁钻: 不是看起来太难,而是看起来极其容易,但是其实非常难! 结果一圈下来,3道 ...

随机推荐

  1. Maven私仓配置

    <?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://mav ...

  2. 【docker】elasticsearch-head无法连接elasticsearch的原因和解决,集群健康值:未连接,ElasticSearch——跨域访问的问题

    环境 ==================== 虚拟机启动 centos 7  ip:192.168.92.130 elasticsearch 5.6.9   port:9200  9201 elas ...

  3. OWIN and Katana

      OWIN(Open Web Interface for .NET)是在.net的web server和web应用之间定义了一套规范. Katana是微软实现了OWIN的一个Web Server的项 ...

  4. 数据校验DWZ与validator

    在做系统时经常会用到数据校验,数据校验可以自己写,也可以用现在成的,现在记录下两种类库使用方法, validato <!DOCTYPE HTML PUBLIC "-//W3C//DTD ...

  5. list去除重复数据

    在java里面要想去除list中的重复数据可以使用两种方式实现: 1. 循环list中的所有元素然后删除重复 public static List removeDuplicate(List list) ...

  6. ubuntu下如何查看软件安装目录以及安装版本

    1)aptitude show 软件名 例如aptitude show kde-runtime 显示如下 ****@ubuntu:~$ aptitude show kde-runtime 软件包: k ...

  7. iOS:UIToolBar、toolbarItems、BarButtonItem的几种关系

    工具栏:ToolBar 工具栏项目:Bar Button Item 调节按钮位置的固定调节:Fixed Space Bar Button Item 调节按钮位置的灵活调节:Flexible Space ...

  8. [14] 齿轮(Gear Wheel)图形的生成算法

    顶点数据的生成 bool YfBuildGearwheelVertices ( Yreal radius, Yreal assistRadius, Yreal height, Yuint slices ...

  9. mysql数据库查询优化

    上两周一直想办法提高查询速度,取得一点效果,解决了部分问题,记下来以便将来自己查看. 由于公司没有专门的DBA,我自己对mysql数据库也不是很熟悉,而且这个JAVA开发的网络审计系统的管理系统,是经 ...

  10. windows10(64位)Anaconda3+Python3.6搭建Tensorflow(cpu版本)及keras

    转自:windows10(64位)Anaconda3+Python3.6搭建Tensorflow(cpu版本)及keras 1.本来电脑安装的是anaconda3 5.3.1,但安装的python版本 ...