Mercurial > hg > mxe-octave-anirudha
changeset 3217:a3a6870253d7
[Darwin] darwin_files/standalone.py: Enable running of script on the same application bundle more than once
author | Anirudha Bose <ani07nov@gmail.com> |
---|---|
date | Sat, 21 Sep 2013 16:52:09 +0530 |
parents | 488d0100db6e |
children | e36a4b5c9719 |
files | darwin_files/standalone.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/darwin_files/standalone.py +++ b/darwin_files/standalone.py @@ -21,8 +21,7 @@ ## Resources folder. ## * Shared libraries like libcholmod.so, libumfpack.so, and others which end with .so ## extension are not assigned any path in the Mach-O headers during compilation. This is -## likely to happen while using MXE. This script can fix such errors too, but make sure -## you do not use this script on the same App Bundle more than once. +## likely to happen while using MXE. This script can fix such errors too. from __future__ import print_function from macholib.MachO import MachO @@ -46,7 +45,7 @@ command = 'install_name_tool -change "%s" "@executable_path/../%s" ./%s\n'%(other,relative_name,path) print(command) os.system(command) - elif other.endswith(".so"): + elif other.endswith(".so") and not other.startswith("@executable_path"): command = 'install_name_tool -change "%s" "@executable_path/../lib/%s" ./%s\n'%(other,other,path) print(command) os.system(command)