linphone-android 编译

编译环境

uname-a

Linux ubuntu 3.8.0-30-generic #44~precise1-Ubuntu SMP Fri Aug 23 17:33:45 UTC 2013 i686 i686 i386 GNU/Linux

然后使用git下载linphone-android在命令行里面输入

git clone git://git.linphone.org/linphone-android.git --recursive

一定要下载完成然后打开看里面的readme

			   LINPHONE for ANDROID
			****************************

To build liblinphone for Android, you must:
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
1) download the Android ndk (>=r9d) from google and add it to your path (no symlink !!!).
2) install yasm, nasm, curl, ant, rsync and the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
	On 64 bits linux systems you'll need the ia32-libs package
	With the latest Debian (multiarch), you need this:
		dpkg --add-architecture i386
		aptitude update
		aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
	$ make
4) To install the generated apk into a plugged device, run
	$ make install
5) (Optional) To generate a liblinphone SDK zip containing a full jar and native libraries, run
	$ make linphone-sdk
6) (Optional) To generate a libmediastreamer2 SDK zip containing a full jar and native libraries, run
	$ make mediastreamer2-sdk

To run the tutorials:
1) open the res/values/non_localizable_custom.xml file and change the value of the show_tutorials_instead_of_app to true.
2) compile again using make && make install.
3) /!\ don't forget to put it back to false to run the linphone application normally. /!\

To create an apk with a different package name, you need to edit the custom_rules.xml file:
1) look for the property named "linphone.package.name" and change it value accordingly
2) also update the values in the AndroidManifest file where the comment <!-- Change package ! --> appears
3) update the path to the sounds in the linphonerc-factory files in the res folders
4) run again the Makefile script by calling "make"


			   TROUBLESHOOTING
			*****************************

If you encounter troubles with the make clean target and you are using the 8e android ndk, the solution can be found here: https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/3wIbb-h3nDU

If you built the app using eclipse, ensure you ran at least once the make command (see above steps 0 to 3) ! Else you'll have this exceptions:
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
...
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load linphone-armeabi-v7a: findLibrary returned null
...

			   CUSTOMIZATION
			*****************************

Some options can be passed to make, like "make SOME_OPTION=SOME_VALUE".

ENABLE_GPL_THIRD_PARTIES
	values: 0 (GPL third parties disabled) or 1 (GPL third parties enabled), default value: 1
	GPL third parties are: X264 and G729

BUILD_VIDEO
	values: 0 (no video) or 1 (video enabled), default value: 1

BUILD_X264
	values: 0 (don't build x264) or 1 (build x264), default value: 1

BUILD_AMRNB          
	values: 0 (don't build amrnb codec), light (try to use amrnb codec from android), full (build your own amrnb codec), default value: full

BUILD_AMRWB
	values: 0 (don't build amrwb codec), 1 (build your own amrwb codec): default value: 1

BUILD_ZRTP
	values: 0 (don't support ZRTP), 1 (support ZRTP), default value: 1

BUILD_SILK            
	values: 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec], default value: 1

BUILD_G729
	values: 0 (don't build g729 plugin), 1 (build g729) [g729 is nonfree patented audio codec, contact Sipro lab for more details]
	default value: 1

BUILD_TUNNEL
	values: 0 (don't build tunnel), 1 (build tunnel) [requires a non-free tunnel implementation in submodules/linphone/tunnel]
	default value: 0

BUILD_WEBRTC_AECM
	values: 0 (don't build echo canceler), 1 (build echo canceler)
	default value: 1

USE_JAVAH
	values: 0 (don't generate header), 1 (generate header for linphone_core_jni) [used to check errors at liblinphone compilation]
	default value: 1

BUILD_FOR_X86
	values: 0 (don't generate liblinphone libraries for x86 architecture), 1 (build liblinphone libraries for x86 architecture)
	default value: 1

BUILD_SQLITE
	values: 0 (don't build sqlite3), 1 (build sqlite3) [used to store chat messages inside liblinphone]
	default value: 1

BUILD_TLS
	values: 0 (don't build tls), 1 (do build tls), default value: 1

BUILD_WEBRTC_ISAC
	values: 0 (don't build isac), 1 (do build isac), default value: 1

BUILD_OPUS
	values: 0 (don't build opus), 1 (do build opus), default value: 1

BUILD_UPNP
	values: 0 (don't build upnp), 1 (do build upnp), default value: 1
下载JDK然后配置环境,然后下载SDK,最后下载NDK,然后配置profile文件看我的配置PATH

export JAVA_HOME=/usr/local/jdk1.7.0_45
export PATH=$PATH:$JAVA_HOME/bin:/usr/bin/g++:/home/bobo/Downloads/android-ndk-r9d:/home/bobo/Downloads/sdk/platform-tools:/home/bobo/Downloads/sdk/tools
配置好这些环境变量过后就安装上面说到的工具。

apt-get install yasm
apt-get install nasm
apt-get install curl
apt-get install ant
apt-get install autoconf
apt-get install automake
apt-get install aclocal
apt-get install libtoolize
apt-get install pkgconfig

把这些东西都安装好然后进入root权限,进入linphone-android文件夹,然后执行make命令,在这个过程中有可能这个extract-cfile.awk文件会下载失败,我们直接打开这个文件的地址下载了复制到linphone-android/submodules/libilbc-rfc3951/download文件下面。

如果没有问题就可以继续make命令了,过程中可能会出现perl的脚本错误。

然后输入

perl -MCPAN -e shell

一路默认安装下来。然后退出输入下面的语句。

perl -MCPAN -e 'install Bundle::LWP'

perl -MCPAN -e 'install LWP::Protocol::https'
所有的东西都安装完毕了,接下来就是make了。make完成过后所有的so都在libs这个文件下面。



  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值