diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-05-08 03:55:18 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-05-08 03:55:18 (GMT) |
commit | faf56929006daa3c5d7a5f83ca965b54e6ceb968 (patch) | |
tree | 99fad8e7dd5e9a9b29dc8f3fcf3cd6740f1b0450 /scripts/macosx-sanity-check.py | |
parent | 397a0209cc911a4a0497650fa08798ddca00339c (diff) |
Added check for 32-bit and 64-bit version
git-svn-id: http://svn.clifford.at/openscad/trunk@532 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'scripts/macosx-sanity-check.py')
-rwxr-xr-x | scripts/macosx-sanity-check.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/macosx-sanity-check.py b/scripts/macosx-sanity-check.py index 1b5a7b7..a085bda 100755 --- a/scripts/macosx-sanity-check.py +++ b/scripts/macosx-sanity-check.py @@ -67,6 +67,18 @@ def validate_lib(lib): if re.search("LC_DYLD_INFO_ONLY", output): print "Error: Requires Snow Leopard: " + lib return False + + p = subprocess.Popen(["lipo", lib, "-verify_arch", "x86_64"], stdout=subprocess.PIPE) + output = p.communicate()[0] + if p.returncode != 0: + print "Error: x86_64 architecture not supported: " + lib + return False + + p = subprocess.Popen(["lipo", lib, "-verify_arch", "i386"], stdout=subprocess.PIPE) + output = p.communicate()[0] + if p.returncode != 0: + print "Error: i386 architecture not supported: " + lib + return False return True if __name__ == '__main__': @@ -77,6 +89,7 @@ if __name__ == '__main__': # processed is a dict {libname : [parents]} - each parent is dependant on libname processed = {} pending = [executable] + processed[executable] = [] while len(pending) > 0: dep = pending.pop() if DEBUG: print "Evaluating " + dep |