资源简介
用vs2015编译通过的pjproject-2.8,并且添加了SipekSdk引用的pjsipdll.dll项目
代码片段和文件信息
import sys
import os
REMOVE_THESE = [“-I/usr/include“ “-I/usr/include/“ “-L/usr/lib“ “-L/usr/lib/“]
class Pkg:
def __init__(self pkg_name):
self.name = pkg_name
self.priority = 0
self.vars = {}
def parse(self pkg_config_path):
f = None
for pkg_path in pkg_config_path.split(‘:‘):
if pkg_path[-1] != ‘/‘:
pkg_path += ‘/‘
fname = pkg_path + self.name + ‘.pc‘
try:
f = open(fname “r“)
break
except:
continue
if not f:
#sys.stderr.write(“pkgconfig.py: unable to find %s.pc in %s\n“ % (self.name pkg_config_path))
return False
for line in f.readlines():
line = line.strip()
if not line:
continue
if line[0]==‘#‘:
continue
pos1 = line.find(‘=‘)
pos2 = line.find(‘:‘)
if pos1 > 0 and (pos1 < pos2 or pos2 < 0):
pos = pos1
elif pos2 > 0 and (pos2 < pos1 or pos1 < 0):
pos = pos2
else:
continue
name = line[:pos].lower()
value = line[pos+1:]
self.vars[name] = value
f.close()
for name in self.vars.keys():
value = self.vars[name]
while True:
pos1 = value.find(“${“)
if pos1 < 0:
break
pos2 = value.find(“}“)
if pos2 < 0:
break
value = value.replace(value[pos1:pos2+1] self.vars[value[pos1+2:pos2]])
self.vars[name] = value
return True
def requires(self):
if not ‘requires‘ in self.vars:
return []
deps = []
req_list = self.vars[‘requires‘]
for req_item in req_list.split(‘‘):
req_item = req_item.strip()
for i in range(len(req_item)):
if “=<>“.find(req_item[i]) >= 0:
deps.append(req_item[:i].strip())
break
return deps
def libs(self):
if not ‘libs‘ in self.vars:
return []
return self.vars[‘libs‘].split(‘ ‘)
def cflags(self):
if not ‘cflags‘ in self.vars:
return []
return self.vars[‘cflags‘].split(‘ ‘)
def calculate_pkg_priority(pkg pkg_dict loop_cnt):
if loop_cnt > 10:
sys.stderr.write(“Circular dependency with pkg %s\n“ % (pkg))
return 0
reqs = pkg.requires()
prio = 1
for req in reqs:
if not req in pkg_dict:
continue
req_pkg = pkg_dict[req]
prio += calculate_pkg_priority(req_pkg pkg_dict loop_cnt+1)
return prio
if __name__ == “__main__“:
pkg_names = []
pkg_dict = {}
commands = []
exist_check = False
for i in range(1len(sys.argv)):
if sys.argv[i][0] == ‘-‘:
cmd = sys.argv[i]
commands.append(cmd)
if cmd==‘--exists‘:
exist_check = True
elif cmd==“--help“:
print “This is not very helpful is it“
sys.exit(0)
elif cmd==“--version“:
print “0.1“
sys.exit(0)
else:
pkg_names.append(sys.argv[i])
# Fix search path
PKG_CONFIG_PATH = os.getenv(“PKG_CONFIG_PATH“ ““).strip()
if not PKG_CONFIG_PATH:
PKG_CONFIG_PATH=“/usr/local/lib/pkgconfig:/usr/lib/pkgconfig“
PKG_CONFIG_PATH = PKG_CONFIG_PATH.replace(“;“ “:“)
# Parse files
for pkg_name in pkg_names:
pkg = Pkg(pkg_name)
相关资源
- F650A_SIP_V2.0.0P1T3.bin.zip
- sip原理与应用高清版
- 北邮计算机网络实验-用开源代码实验
- 基于Qt5.9.1(MSVC) PJSIP网络电话源代码
- win10加VS2017下编译pjproject2.7库成功的工
- winsip 3.0
- sipp 压力测试 原创脚本
- sip资料(Sip揭秘.pdf、SIP协议精解.pd
- VOIP技术构架第二版高清扫描版PDF
- winsip 3.2.2
- SPAD SiPM 激光雷达sensor 技术简介
- 基于osip/eXosip协议栈实现的sip客户端
- GB28181模拟设备和自动化测试工具
- 阿里云opensips.zip
- sip安卓电话4款
- Cadence高速电路设计Allegro Sigrity SIPIE
- opensips局域网搭建配套资料.7z
- PJSUA开发文档中文版
- FreeSwitch指南(中文高清版)
- xlite+汉化版+sip server2008以及序列号
- SIP视频会议服务器的设计与实现
- Resiprocate源码分析
- 基于SIP协议的IP电话呼叫过程 配套抓
- SIP信令压缩的研究及其在3G无线网中的
- SIP协议的RFC文档 rfc3261
- 基于VoiP的网络电话开题报告
- pjsip客户端与服务端sip通信样例
- 基于exosip的语音电话聊天
- peers0.43源代码
- 3M SIP2 标准协议文档
评论
共有 条评论