使用windows10+linphone-desktop最新版 编译linphone PC版

2017年2月26日星期日


使用windows10+linphone-desktop最新版
感谢这篇帖子的帮助
http://blog.csdn.net/liccon/article/details/54755005


下载源码
 
下来后只有7M,代码不全
因为凡是clone下载带submodules的源码,初次clone的代码是不全的
 
需要进一步执行
git submodule sync && git submodule update --init –recursive
才能下载各个子模块。


Git最好使用64位的。32位的里面没有git submodule命令。


执行这一步非常慢,中间经常断掉。
也不能直接用git clone去下载子模块,这样下载下来,放到指定位置是不行的。


下载完是1G多,压缩后是1.02G
 


然后执行python.exe prepare.py desktop
出现错误
 
说是sh.exe不能在PATH中,否则会执行不了。


刚才是在Git Bash上运行的。
现在用msys.bat来运行试一试。问题依旧存在
现在用命令行cmd.exe来运行试一试。问题依旧存在
修改环境变量,将能定位到sh.exe的路径去掉。解决了。
 
 
现在用vs2015打开sln文件吧。
 
开始编译,睡觉去。


睡醒一看,21个错
 
一个一个解决吧。
 
从CMakeError.log看,貌似因为360阻止了它的一些动作。
把360退出。再编译试试。
错误减少到4个了
 
找到第一个错误
 
C:linplinphone-desktopsubmoduleselle-sip esterelle_sip_message_tester.c : error C2220: 警告被视为错误 - 没有生成“object”文件 [C:linplinphone-desktopWORKdesktopBuildellesip esterelle_sip_tester.vcxproj]
20>C:linplinphone-desktopsubmoduleselle-sip esterelle_sip_message_tester.c : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [C:linplinphone-desktopWORKdesktopBuildellesip esterelle_sip_tester.vcxproj]
20>    belle_sip_refresher_tester.c
20>    belle_sip_register_tester.c
20>    belle_sip_resolver_tester.c
20>    belle_sip_tester.c
20>    belle_sip_uri_tester.c
20>    cast_test.c
20>    正在生成代码...
20>  已完成生成项目“C:linplinphone-desktopWORKdesktopBuildellesip esterelle_sip_tester.vcxproj”(默认目标)的操作 - 失败。
20>  已完成生成项目“C:linplinphone-desktopWORKdesktopBuildellesipALL_BUILD.vcxproj”(默认目标)的操作 - 失败。
20>
20>  生成失败。


将错误文件打开,用vs2015保存关闭一下。
再单独编译出错工程
 
 
结果可以了。
看不到刚才出错的提示了,无奈,还得重新编译一下了。
InitializeBuildStatus:
1>    正在对“Win32Debugms2-html-docms2-html-doc.tlogunsuccessfulbuild”执行 Touch 任务。
1>  CustomBuild:
1>    Building Custom Rule C:/linp/linphone-desktop/submodules/linphone/mediastreamer2/help/CMakeLists.txt
1>    CMake does not need to re-run because C:linplinphone-desktopWORKdesktopBuildms2helpCMakeFilesgenerate.stamp is up-to-date.
1>    Generating doc/html/index.html
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe”已退出,代码为 -1073741819。 [C:linplinphone-desktopWORKdesktopBuildms2helpms2-html-doc.vcxproj]
1>  已完成生成项目“C:linplinphone-desktopWORKdesktopBuildms2helpms2-html-doc.vcxproj”(默认目标)的操作 - 失败。
1>  已完成生成项目“C:linplinphone-desktopWORKdesktopBuildms2ALL_BUILD.vcxproj”(默认目标)的操作 - 失败。


这个CustomBuild到底是干什么的?


EP_m2在configure 时提示:
1>  loading initial cache file C:/linp/linphone-desktop/WORK/desktop//tmp/EP_ms2/EP_ms2-cache-Debug.cmake
1>  -- Could NOT find Opus (missing:  OPUS_LIBRARIES)
1>  CMake Warning at CMakeLists.txt:210 (message):
1>    Could not find opus library, mediastreamer2 will be compiled without the
1> OPUS codec.


虽然只是个警告,但是试试,也行能解决问题呢
于是,下载安装opus
git clone git://git.opus-codec.org/opus.git
然后在opus目录下进行autogen和configure:
./autogen.sh
./configure –prefix=/mingw –disable-shared –enable-static
然后编译并安装到Mingw环境:
make
make install


这个办法没用


解决办法,修改
C:linplinphone-desktopsubmoduleslinphonemediastreamer2help
下的CMakeLists.txt
将出错的动作注释掉。这个动作是生成html,去掉也没有什么影响。
 
证明有效。EP_ms2这个工程单独编译通过。
遗憾的是不知道出错原因是什么。


然后,整个都编译通过了
在C:linplinphone-desktopOUTPUTdesktop,下生成linphone.exe,双击运行
---------------------
作者:霍普金斯
来源:CSDN
原文:https://blog.csdn.net/zzygchsh/article/details/58601648
版权声明:本文为博主原创文章,转载请附上博文链接!

原文地址:https://www.cnblogs.com/zhanying999666/p/10285950.html