Ubuntu14.04 compile WebRTC For Android code 2014-07-24, ubuntu14.04webrtc

Source: Internet
Author: User
Tags vps

Ubuntu14.04 compile WebRTC For Android code 2014-07-24, ubuntu14.04webrtc


I haven't written a blog for almost a year. Recently, I developed an instant messaging project based on Google's open-source WebRTC project. During this project, I encountered some problems when downloading WebRTC code, this is a record here, and we hope to help kids who encounter similar problems in the WebRTC code being downloaded and compiled.


1) Prepare the environment

1. Ubuntu14.04 LTS System

2. it is very important to prepare a stable VPN or VPS with a high speed. Everyone understands that most download code failures are caused by failure to access the google service. (I used Digital Ocean. I tried a few VPNs before, but they all ended up failing. The eggs were broken, either unstable or slow, it takes up to 15 hours for the download to succeed)

3. Install and download $ tools required to compile webrtc code

A. jdk (my sun jdk1.6.0 _ 45)

Jdk download path: http://ghaffarian.net/downloads/Java/JDK/

Configure to Environment Variables

B. git (version 1.9.1)

Install: sudo apt-get install git

C. gclient

1. Install: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

2. configure it to environment variables. If you do not know how to configure it, google.

D. install the following tool (sudo apt-get install ..)

G ++ (>=4.2)

Python (>=2.4)

Libnss3-dev> = 3.12

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


2). Download the code

1. Synchronize WebRTC code

1. Create the WebRTC directory

Mkdir WebRTC

Cd WebRTC

2. initialize gclient

Gclient config http://webrtc.googlecode.com/svn/trunk

3. Configure the target system version

Echo "target_ OS = ['android', 'unix ']">. gclient

4. sync code

Gclient sync -- nohooks

(The code I synced is as large as 7.1G, including NDK, SDK, and other tools. Previously, VPN was used and VPS was used, it took more than six minutes ...... nima, domestic programmers are hard-pressed)

NOTE: If Still working on or other information appears for a long time, do not interrupt or close it. It is Still running. If it is interrupted, all previously downloaded items will be deleted, then you have to sync it again.


3) Compile the code

1. Set the compiling environment

1. cd trunk

2. source./build/android/envsetup. sh

3. export GYP_DEFINES = "$ GYP_DEFINES OS = android"

2. Download the packages or tools on which compilation depends (here a lot of things will be downloaded, such as Ant .)

./Build/install-build-deps.sh (under the trunk directory)

3. Compile (under the trunk directory)

Compile Debug: ninja-C out/Debug

Compile the Release version: ninja-C out/Release


Based on the above steps, if the network can normally access the google service, there will generally be no other problems. If there is a problem, don't be afraid, generally, you can find the cause based on the error message. I don't know about google.

After the compilation is successful, you can see the corresponding demo installation package in the out/Debug or out/Release directory, such as the Debug directory, where there is a AppRTCDemo-debug.apk and WebRTCDemo-debug.apk


The code of the AppRTCDemo program is trunk/talk/examples/android /.


Note: What is the difference between AppRTCDemo and WebRTCDemo?

WebRTCDemo is only a point-to-point in the LAN. If you know the ip address and port number of the other party, you can fight against it without a server. AppTRCDemo requires a server, which can be a LAN or WAN.


The latest code downloaded on July 15, July 23, 2014 has not been compiled before the 7.1 GB. If someone cannot download the code for various reasons, I will share it with you, because the code is still on your own machine, back up a copy to the cloud disk.


AppRTCDemo project source code:

Click Open Link


WebRTC source code: (the code is not compiled before. It is estimated that the code is about GB after compilation. Please download the code and compile it yourself)

Link: click open link password: vp7b


The last one is provided, with a picture showing the truth.









Can I use ubuntu for android? If you can, add a tutorial.

...... Not decisive yet !!!
However, the native ubuntu can be loaded into the mobile phone through an image and connected and used with the VNC Client.
Currently, the source code for downloading ubuntu OS is not available yet. The first ubuntu OS will be available on CES at the beginning of today. If the source code is open and can be used stably, at least one quarter is required.
It seems that ubuntu for android will be faster. XDA already has this forum. As for the deep integration of rom, I believe it will take up to a month after the official ubuntu website provides download.

Experts on the kneeling side provide three types of game source code fish written with eclipse for Android: <big fish eat fish>

Kneel down, this is really not
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.