From a96759d9e990c67e58269202158169d8f2f5ea4f Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 6 Jun 2015 12:51:47 -0700 Subject: [PATCH] Tools: Collapse install_name_tool calls in deploy-mac --- Tools/deploy-mac.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tools/deploy-mac.py b/Tools/deploy-mac.py index 9009c79d1c..8305a43046 100755 --- a/Tools/deploy-mac.py +++ b/Tools/deploy-mac.py @@ -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()