def getRPaths( self, filename ):
all_rpaths = []
res = subprocess.run( ['otool', '-l', filename], stdout=subprocess.PIPE, universal_newlines=True )
state = self.ST_IDLE
for line in res.stdout.split('\n'):
words = line.strip().split()
if state == self.ST_IDLE:
if words == ['cmd','LC_RPATH']:
state = self.ST_RPATH
elif state == self.ST_RPATH:
if words[0:1] == ['path']:
path = words[1]
all_rpaths.append( path )
state = self.ST_IDLE
return all_rpaths
build_fix_install_rpath.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录