From ff02ee1bab81eeccdf29938f1007abaf756e615e Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 29 Oct 2011 09:30:44 +0000 Subject: [PATCH] Let's not include any system frameworks on OSX --- direct/src/p3d/Packager.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index a32d6a8153..2c57167c51 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -1082,8 +1082,12 @@ class Packager: # Alter the dependencies to have a relative path rather than absolute for filename in framework_deps: - if self.__locateFrameworkLibrary(filename) == file.filename: + loc = self.__locateFrameworkLibrary(filename) + if loc == file.filename: os.system('install_name_tool -id "%s" "%s"' % (os.path.basename(filename), file.filename.toOsSpecific())) + elif loc.toOsSpecific().startswith("/System/"): + # Let's keep references to system frameworks absolute + os.system('install_name_tool -change "%s" "%s" "%s"' % (filename, loc.toOsSpecific(), file.filename.toOsSpecific())) else: os.system('install_name_tool -change "%s" "%s" "%s"' % (filename, os.path.basename(filename), file.filename.toOsSpecific())) @@ -1147,6 +1151,10 @@ class Packager: # aren't commonly on the library path either. filename = self.__locateFrameworkLibrary(filename) filename.setBinary() + + # Let's skip system frameworks + if filename.toOsSpecific().startswith("/System/"): + continue else: # It's just a normal library - find it on the path. filename = Filename.fromOsSpecific(filename) @@ -2333,7 +2341,6 @@ class Packager: 'libsystem.b.dylib', 'libmathcommon.a.dylib', 'libmx.a.dylib', 'libstdc++.6.dylib', 'libobjc.a.dylib', 'libauto.dylib', - 'tcl', 'tk', ] # As above, but with filename globbing to catch a range of