WEBRTC Compilation Details--record + reprint
Original address: http://blog.csdn.net/temotemo/article/details/7056581
WEBRTC compiling
My environment:
Operating system: XP SP3
VS 2013
Tools required before compiling the source code
Get the source code tool:
1, first need to install the source of the tool SVN (Project code version management tools, Google also use this)
TortoiseSVN 1.6.12
http://sourceforge.net/projects/tortoisesvn/
2. Download and install Msysgit and Tortoisegit
Msysgit:http://code.google.com/p/msysgit/downloads/list
Select Git-1.7.4-preview20110204.exe, download and install
Tortoisegit:http://code.google.com/p/tortoisegit/downloads/list
Select the version that suits your system, download and install it (note: Tortoisegit is just a GUI and must be installed Msysgit)
The Git directory is found and configured automatically when the Tortoisegit is installed.
Manually add the bin directory in the Msysgit to the system environment variable path, for example my directory is "D:/programfiles/git/bin"
3. Download and install Python, it is recommended to install Python2.6, such as installed in C drive
Installation will automatically add the C:\Python26 execution directory into the system environment variable path.
(WebRTC is written in C + + Why use Python, because WEBRTC source and depot_tools There are many. py python programs for configuring projects, generating project files in various environments)
Official Request Note:
Http://www.webrtc.org/reference/getting-started/prerequisite-sw
1. Depot Tools
1. You'll need to the depot tools installed:
Https://sites.google.com/a/chromium.org/dev/developers/how-tos/depottools
2. You need git installed (needed for getting WebM source):
http://git-scm.com/
/*====================================================*/
All right, the external tools are almost ready.
4. Download and configure Depot_tools
Many people recommend that you set up a directory to store depot_tools and command access to that directory.
SVN Co Http://src.chromium.org/svn/trunk/tools/depot_tools
This should be done under Linux, but under the Windows system I find it easier to do this:
Recommended Action:
Because of the previous installation of SVN, git and other tools, so we can directly take the Depot_tools tool:
Back to the desktop, right-click
Choose SVN Checkout directly
Fill the http://src.chromium.org/svn/trunk/tools/depot_tools to the URL of respository, Checkout Directory can optionally specify the path you want to save (suggest that there is no Chinese path, because one will be added to the path of the system), the other default, and then click OK, automatically download, you can get the Depot_tools tool.
The play is coming! Get WEBRTC Source code:
Source URL is http://webrtc.googlecode.com/svn/trunk/
5. In order to capture the source code, you can create a WEBRTC source directory
Like D:\WebRTC.
General Operation : (not recommended)
Enter the directory with a DOS command, and then
SVN checkout http://webrtc.googlecode.com/svn/trunk/
After the download is complete, WEBRTC will get a default folder called Trunk, inside is the WEBRTC source, just the source code, and there is no compilation of the corresponding project files.
And then
>gclient config https://webrtc.googlecode.com/svn/trunk (to download 1 multi-g files, the speed is not good, you can go to play a game of DotA back)
>gclient Sync--force (sync project file)
> Gclient runhooks--force (production of various project files, like vs project files Webrtc.sln files, Linux makefile files)
Wait a minute... But I found a lot of students trying to compile WEBRTC in the DOS command into the operation there are a variety of problems 、、、
For example: Installing Subversion ...
[-] XMLHTTP 80072ee2:cannot make HTTP request (Operation timeout
... Failed to checkout SVN automatically.
Visit http://subversion.tigris.org to download the latestsubversion Clie
Nt
Before continuing. (This is a network connection problem, try a few more times)
F:\webrtc\webrtc>gclient.bat Confighttps://webrtc.googlecode.com/svn/trunk
Installing Python ... (This is a configuration problem)
And so on the maddening question. Originally we have already installed Python, SVN, how still need installing 、、、 and will let you wait for a long time, depressed bar!
Recommended Action:
But I do it better:
Select the WebRTC folder, right-click
Then choose Git Bashand then go directly to the directory: (e.g.)
OK, it is time to obtain WEBRTC source code to produce the project (if it is purely to obtain WEBRTC source code, can be done in accordance with the acquisition of Depot_tools, but we also need to obtain the source of the production of engineering documents)
First step, take source code: SVN checkout http://webrtc.googlecode.com/svn/trunk/(source file is not very large, dozens of m)
The second step, take the project related configuration files: gclient config https://webrtc.googlecode.com/svn/trunk (file is very large, 1G more, to wait a long time OH)
Step three, sync your project files with Google and get the latest project: Gclient sync--force
Fourth, the production of various platform project documents: Gclient Runhooks--force
Note: before the fourth step, if you need to install the DirectX SDK and SDK for Windows under Windows Platform 7.1
:
SDK 7.1:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8279
DirectX SDK:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812
Note again:
When installing SDK 7.1, be sure to note the installation path of SDK 7.1, as the WEBRTC project is specified in the configuration, the configuration file is in the. The. \trunk\src\build file named Common.gypi
That is, Google Default SDK 7.1 installed in the C drive, if the classmate you do not want to install in the C drive, then you need to modify this configuration file, otherwise, the implementation of the fourth step when there will be a variety of warning problems.
If you do not want to install the SDK, you can depend on the file from here:
SVN co http://vsfiltermod.googlecode.com/svn/trunk/src/BaseClasses, then put the file in this path: C:/programfiles/microsoft sdks/ Windows/v7.1/samples/multimedia/directshow/baseclasses
If you successfully completed the above four steps, and there is no problem in the fourth step, then congratulations, you can see in the trunk directory under the Windows System Platform Webrtc.sln Project project files. The Linux project file is in the Trunk\build install-build-deps.sh script. There are Mac OS and Android and so on ...
Linux platforms need to install something more:
g++ (>= 4.2)
Python (>= 2.4)
Libasound2-dev
Libpulse-dev
Libjpeg62-dev
Libxv-dev
Libgtk2.0-dev
Libexpat1-dev
For 32-bit builds on a 64-bit system:
Lib32asound2-dev
Ia32-libs
Well, I studied on vs 2008, opened Webrtc.sln, and then built the solution, so far there are 122 projects in the solution, audio engine, video engine, many test code, video chat test, API test, automated test, VP8 and H. Encode test, sound test, channel test 、、、, etc., all generated about half an hour or so ... 、、、 ok,enjoy!
Be aware of the configuration of the solution when compiling:
The following configuration is guaranteed: contains files DirectX sdk\include and $ (windowssdkdir) \include
Library files: DirectX sdk\lib\x86 DirectX sdk\lib sdks\windows\v7.1\lib
We'll have time to share these tests with you later.
??