1. 下载安装svn客户端,例如TortoiseSVN。安装完后,svn执行目录自动被添加入系统环境变量PATH中。
2. 下载并安装msysgit和Tortoisegit
msysgit下载地址:http://code.google.com/p/msysgit/downloads/list
Tortoisegit下载地址:http://code.google.com/p/tortoisegit/downloads/list
选择适合自己系统的版本,下载并安装(注:Tortoisegit只是一个gui,必须安装msysgit)
Tortoisegit安装时会找到git目录并自动配置好。把msysgit中bin目录手动添加到系统环境变量PATH中,比如我的目录是“D:/Program Files/Git/bin”
3. 下载并安装Python,建议安装Python2.6
下载地址:http://www.python.org/download/releases/2.6/。安装后Python执行目录自动被添加入系统环境变量PATH中。
4. 下载并配置depot_tools
建立一个存放depot_tools的目录,command进入该目录
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
下载后把depot_tools目录手动添加到系统环境变量PATH中
5. 建立WebRTC的源码目录
比如E:/Developer/WebRTC/
6. 打开cmd,进入第5步建立的源码目录
7. 执行: gclient config https://webrtc.googlecode.com/svn/trunk
或者 gclient.bat config https://webrtc.googlecode.com/svn/trunk
8. 执行: gclient sync –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
或者 gclient.bat sync –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
9. 执行: gclient runhooks –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
或者 gclient.bat runhooks –force (注意这里是两个- -,wordpress会把它变成一个全角的长—)
10. 源码目录下应该已经含有webrtc.sln
- webrtc 会用到Windows SDK 7.1,如果不想安装SDK,可以从这里下所依赖的文件:svn co http://vsfiltermod.googlecode.com/svn/trunk/src/BaseClasses,然后把文件放置在这个路 径:C:/Program Files/Microsoft SDKs/Windows/v7.1/Samples/multimedia/directshow/baseclasses (感谢乐得思蜀的方案)我的系统为Windows 7 32bit,不知为何在第8步只能执行gclient.bat sync –force才成功,直接执行gclient sync –force无法成功。
- 如果你只安装了Visual Studio 2010,那么在gclient sync –force执行到最后会提示”Do not know how to convert MSVS attribute UseOfMFC”,可能对2010支持还不好,因为我系统里还有Visual Sduidio 2005,所以没有碰到这个问题,但是不用担心,因为最终的webrtc.sln照样会生成的,不影响看代码。
- 如果遇到git –version return 1错误,应该是git目录没配置到PATH环境变量中,配置好后重启机器。
- 如果你用的是Visual C++ express,那对不起,你还需要安装一下WinDDK。
- 如果你碰到下面这个错误,我可以很高兴的告诉你,你的问题跟我碰到的一模一样,不一样的可能是,我花了N长时间才找出原因,你只要看到我这篇文章就可以搞定了。
[code]—— Build started: Project: peerconnection_client, Configuration: Debug Win32 ——
video_render_module.lib(video_render_windows_impl.obj) : error LNK2001: unresolved external symbol _CLSID_DxDiagProvider
video_render_module.lib(video_render_windows_impl.obj) : error LNK2001: unresolved external symbol _IID_IDxDiagProvider
video_render_module.lib(video_render_direct3d9.obj) : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "private: int __thiscall webrtc::VideoRenderDirect3D9::InitializeD3D(struct HWND__ *,struct _D3DPRESENT_PARAMETERS_ *)" (?InitializeD3D@VideoRenderDirect3D9@webrtc@@AAEHPAUHWND__@@PAU_D3DPRESENT_PARAMETERS_@@@Z)
E:\workspace\webtrc\trunk\Debug\peerconnection_client.exe : fatal error LNK1120: 3 unresolved externals</div>
<div>[/code]
video_render_module.lib(video_render_windows_impl.obj) : error LNK2001: unresolved external symbol _CLSID_DxDiagProvider
video_render_module.lib(video_render_windows_impl.obj) : error LNK2001: unresolved external symbol _IID_IDxDiagProvider
video_render_module.lib(video_render_direct3d9.obj) : error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "private: int __thiscall webrtc::VideoRenderDirect3D9::InitializeD3D(struct HWND__ *,struct _D3DPRESENT_PARAMETERS_ *)" (?InitializeD3D@VideoRenderDirect3D9@webrtc@@AAEHPAUHWND__@@PAU_D3DPRESENT_PARAMETERS_@@@Z)
E:\workspace\webtrc\trunk\Debug\peerconnection_client.exe : fatal error LNK1120: 3 unresolved externals</div>
<div>[/code]
错误原因:安装了错误版本的DirectX SDK,去下载安装Microsoft DirectX SDK (June 2010)
在WinXP下有可能会碰到这个问题:
E:\Developer\webrtc>gclient config https://webrtc.googlecode.com/svn/trunk
Installing git (avg 1-2 min download) ...
[-] SHELL.APPLICATION 80070002: Failed to open zip file.
... Failed to checkout git automatically.
Please visit http://code.google.com/p/msysgit to download the latest git client before continuing.
You can also get the "prebacked" version used at http://src.chromium.org/svn/trunk/tools/
解决方法是:
regsvr32 %WINDIR%\system32\zipfldr.dll
你好,你的意思是添加那个文件吗,还是运行
你问的是哪个文件?如果是gclient是执行;如果是添加host文件,那不需要执行,修改后重启浏览器即可。
这个错误是什么问题?
d:\workspace\webrtc>gclient config https://webrtc.googlecode.com/svn/trunk
Installing git (avg 1-2 min download) …
Installing subversion …
Installing python …
svn: This client is too old to work with working copy ‘D:\cygwin\opt\google\depot_tools’. You need to get a newer Subversion client, or to downgrade this working copy.
See http://subversion.tigris.org/faq.html#working-copy-format-change for details.
… Failed to checkout python automatically.
Please visit http://python.org to download the latest python 2.x client before continuing.
You can also get the “prebacked” version used at http://src.chromium.org/svn/trunk/tools/third_party/
为避免一些不必要的麻烦,msysgit和svn这两个包建议使用webrtc官方网站上放的那个版本,下载地址:http://src.chromium.org/svn/trunk/tools/third_party/。
今天在家里另一台Notebook里下载webrtc,结果总是报这个下载错误,查了半天,结果是由于这个depot_tools我是用tortoise svn来check out出来的。
E:\workspace\webrtc>gclient config https://webrtc.googlecode.com/svn/trunk
Installing python …
svn: This client is too old to work with working copy ‘D:\cygwin\depot_tools’. You need to get a newer Subversion client, or to downgrade this working copy.
See http://subversion.tigris.org/faq.html#working-copy-format-change for details.
… Failed to checkout python automatically.
Please visit http://python.org to download the latest python 2.x client before continuing.
You can also get the “prebacked” version used at http://src.chromium.org/svn/trunk/tools/third_party/
‘D:\cygwin\depot_tools\python’ 不是内部或外部命令,也不是可运行的程序或批处理文件。
解决方法也很简单,再用命令行重新下载即可。
Pingback: LINK : fatal error LNK1104: cannot open file ‘atlthunk.lib’ | RG4.NET
my trouble:
D:\webRTC>gclient config https://webrtc.googlecode.com/svn/trunk
Installing git (avg 1-2 min download) …
Fetching from https://src.chromium.org/svn/trunk/tools/third_party/git-1.8.0_bin.zip
Installing subversion …
Fetching from https://src.chromium.org/svn/trunk/tools/third_party/svn_bin.zip
Installing python 2.7.6…
Fetching from https://src.chromium.org/svn/trunk/tools/third_party/python276_bin.zip
D:\webRTC>gclient sync –force
Error: 1> This url is unreachable: https://webrtc.googlecode.com/svn/trunk
D:\webRTC>gclient sync –force
Error: 1> This url is unreachable: https://webrtc.googlecode.com/svn/trunk
this “url is unreachable” error is due to the GFW in China, to avoid it you can simply add webrtc’s svn site to your host if you are trying to fetch the source code on Windows. Here is mine:
[code]
74.125.237.1 dl-ssl.google.com
[/code]
当我执行下面命令的时候出现这个错误,这个怎么解决?
E:\webrtc>gclient.bat config https://webrtc.googlecode.com/svn/trunk
error: non-monotonic index .git/objects/pack/._pack-f84bc6c570003a85a15530da1bfa
6966204420a7.idx
This issue could be resolved by simply deleting ._*.
How about this error?
Installing git 1.9.0.chromium.5 (avg 1-2 min download) …
Fetching from https://commondatastorage.googleapis.com/chrome-infra/git-1.9.0.chromium.5_bin.zip
[-] XMLHTTP 80072efe: Cannot make HTTP request (The connection with the server was terminated abnormally
… Failed to checkout git automatically.
Please visit http://code.google.com/p/msysgit to download the latest git
client before continuing.
You can also get the “prebaked” version used at https://commondatastorage.googleapis.com/chrome-infra/git-1.9.0.chromium.5_bin.zip
In most cases, this error was due to the connection between your host and server can not be established properly. Could it be restricted?
Try visit https://commondatastorage.googleapis.com/chrome-infra/git-1.9.0.chromium.5_bin.zip directly from a browser to confirm it.