Skip to content

Commit

Permalink
Tools: Collapse install_name_tool calls in deploy-mac
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Jun 6, 2015
1 parent 14dbe7e commit a96759d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/deploy-mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,19 @@ def updateMachO(bin, execPath, root):
qtPath = findQtPath(oldPath)
if verbose:
print('Found Qt path at {}.'.format(qtPath))
args = [installNameTool]
for path, oldExecPath, newExecPath in toUpdate:
if path != bin:
updateMachO(path, execPath, root)
if verbose:
print('Updating Mach-O load from {} to {}...'.format(oldExecPath, newExecPath))
subprocess.check_call([installNameTool, '-change', oldExecPath, newExecPath, bin])
args.extend(['-change', oldExecPath, newExecPath])
else:
if verbose:
print('Updating Mach-O id from {} to {}...'.format(oldExecPath, newExecPath))
subprocess.check_call([installNameTool, '-id', newExecPath, bin])
args.extend(['-id', newExecPath])
args.append(bin)
subprocess.check_call(args)

if __name__ == '__main__':
parser = argparse.ArgumentParser()
Expand Down

0 comments on commit a96759d

Please sign in to comment.