def getDylibs( self, filename ):
all_dylibs = []
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_LOAD_DYLIB']:
state = self.ST_DYNLIB
elif state == self.ST_DYNLIB:
if words[0:1] == ['name']:
path = words[1]
all_dylibs.append( path )
state = self.ST_IDLE
return all_dylibs
build_fix_install_rpath.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录